I am not an expert in python, but I am trying to understand a bit more about it and if my current knowledge is correct.
For requirement.txt we have markers that can be added to the file, if I understand correctly those markers are used to express what environment I want it to work on, for example, sys_platform=“windows” I need the dependency for windows and the same for python version and others.
From PEP 345 – Metadata for Python Software Packages 1.2 | peps.python.org we have those markers
python_version = ‘%s.%s’ % (sys.version_info, sys.version_info) python_full_version = sys.version.split() os.name = os.name sys.platform = sys.platform platform.version = platform.version() platform.machine = platform.machine() platform.python_implementation = platform.python_implementation()
Now, we also have compatibility tags from PEP 425 – Compatibility Tags for Built Distributions | peps.python.org, the names are similar to the markers, so I am a bit confused, are they the same? some tags we have are
So I have some questions:
- Are markers equivalents of the compatibility tags, for example, sys_platform is the platform tag or the ABI tag to the python_version marker? is there any equivalent between those values?
- If I want to know what’s the real dependency I am using how I can know, I mean if I am using “pandas” how I can know using either compatibility tags or markers that I am using, for example, the one for mac for python 2.7 in the requirements.txt?
- Can I set those markers/tags when installing a dependency?
- I want to have more specific information about the component I am using, maybe compatibility tags in the requirements.txt, is that possible?