Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'python_requires' field is ignored in setup.cfg (not in setup.py). #1787

Closed
Steap opened this issue Jun 16, 2019 · 3 comments · Fixed by #1847
Closed

The 'python_requires' field is ignored in setup.cfg (not in setup.py). #1787

Steap opened this issue Jun 16, 2019 · 3 comments · Fixed by #1847
Labels
bug Needs Implementation Issues that are ready to be implemented.

Comments

@Steap
Copy link
Contributor

Steap commented Jun 16, 2019

I'm using setuptools version '41.0.1.post20190616' (commit 8aeff6b).

$ cd /tmp/setup/py
$ cat setup.py
from setuptools import setup
setup(python_requires='invalid')
$ python setup.py install
error in setup command: 'python_requires' must be a string containing valid version specifiers; Invalid specifier: 'invalid'

$ cd /tmp/setup/cfg
$ cat setup.cfg
[metadata]
python_requires=invalid
$ python setup.py install
running install
running bdist_egg
running egg_info
writing UNKNOWN.egg-info/PKG-INFO
writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
writing top-level names to UNKNOWN.egg-info/top_level.txt
reading manifest file 'UNKNOWN.egg-info/SOURCES.txt'
writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying UNKNOWN.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/UNKNOWN-0.0.0-py3.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing UNKNOWN-0.0.0-py3.7.egg
Copying UNKNOWN-0.0.0-py3.7.egg to /tmp/setup/cfg/v/lib/python3.7/site-packages
Adding UNKNOWN 0.0.0 to easy-install.pth file

Installed /tmp/setup/cfg/v/lib/python3.7/site-packages/UNKNOWN-0.0.0-py3.7.egg
Processing dependencies for UNKNOWN==0.0.0
Finished processing dependencies for UNKNOWN==0.0.0
$ echo $?
0

I thing "python setup.py install" should also fail when using setup.cfg.

@jayvdb
Copy link
Contributor

jayvdb commented Aug 1, 2019

#999 was about a similar thing, so maybe this is a regression.

@benoit-pierre
Copy link
Member

Note that python_requires belong in the [options] section. Still the same issue though.

It's not a regression, but something that should have been taken into account when implementing #999.

@benoit-pierre benoit-pierre added bug Needs Implementation Issues that are ready to be implemented. labels Aug 24, 2019
@benoit-pierre
Copy link
Member

Related: #1633.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Implementation Issues that are ready to be implemented.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants