I'm creating a package that has 'typing;python_version<"3.5"'
in it's install_requires
. Apparently, this kind of dependency specification has only been implemented in recent versions of setuptools
. If the setuptools
on the user's machine is old they'll get:
'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in typing;python_version<"3.5" at ;python_version<"3.5"
The easy solution is to tell the users to pip install 'setuptools>=36.2.1'
before pip install my-package
. (Note that 36.2.1
is just a version that I know works, not necessarily the the absolute minimum requirement)
But is there any way to specify this requirement in setup.py
so that it gets done automatically? Adding setuptools>=36.2.1
to install_requires
and setup_requires
did not work. It says Installed /tmp/pip-si2fqg-build/.eggs/setuptools-38.2.5-py3.3.egg
and then gives the same error above.
typing
requirement and therefore that wheel won't install correctly on older python versions. – Deviation