Correct use of PEP 508 environment markers in setup.cfg Correct use of PEP 508 environment markers in setup.cfg python-3.x python-3.x

Correct use of PEP 508 environment markers in setup.cfg


One character. That's all you were missing. You had platform_system="Darwin" instead of platform_system=="Darwin" (the very last line of your install_requires). It works fine this way:

[metadata]name = foobarversion = 1.6.5+0.1.0[options]packages = find:install_requires =    ham >= 0.1.0    eggs >= 8.1.2    spam >= 1.2.3; platform_system=="Darwin"    i-love-spam >= 1.2.0; platform_system=="Darwin"

It's not necessary but your setup.py could be simplified too.

import setuptoolssetup(setup_requires=['setuptools>=36.0'])

Unlike those commenting before, I like using setup.cfg. It's clean and easy. If you want to use the information from setup.cfg at runtime, it's easy to parse:

from setuptools.config import read_configurationconf_dict = read_configuration('/home/user/dev/package/setup.cfg')

More setup.cfg info