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
Incorrect requirement metadata in sdist package of flake8 #592
Comments
In GitLab by @zvezdan on Jun 19, 2017, 20:01 mentioned in commit zvezdan/flake8@d8ab148b881f4e309474b9c1a84fae7f0fd807be |
In GitLab by @zvezdan on Jun 19, 2017, 20:03 mentioned in merge request !191 |
In GitLab by @zvezdan on Jun 19, 2017, 20:07 The merge request was sent (!191). |
In GitLab by @zvezdan on Jun 20, 2017, 02:42 mentioned in commit zvezdan/flake8@4b3c4f41bbceabbd8b2d1661772903cbc06c2bb5 |
In GitLab by @zvezdan on Jun 23, 2017, 20:30 @sigmavirus24 I forgot to mention that I did test that the package gets released with correct metadata after the patch in !191 is applied. |
In GitLab by @zvezdan on Jul 10, 2017, 18:15 mentioned in commit zvezdan/flake8@8c5b1093631358d81b7b53cc23f9a4e353fe31e5 |
In GitLab by @zvezdan on Jul 10, 2017, 18:23 mentioned in commit zvezdan/flake8@a7068ad374b01c3a6040d3f1e3f5ae4bde494e27 |
In GitLab by @sigmavirus24 on Jul 27, 2017, 16:49 closed |
In GitLab by @zvezdan on Jun 19, 2017, 19:59
Please describe how you installed Flake8
Using a fresh virtualenv in
./venv
directory:Please provide the exact, unmodified output of
flake8 --bug-report
Please describe the problem or feature
The dependencies necessary for Python 2 use of flake8 are missing:
configparser
andenum34
.If this is a bug report, please explain with examples (and example code) what you expected to happen and what actually happened.
Download flake8-3.3.0.tar.gz released on pypi.python.org.
The
src/flake8.egg-info/require.txt
metadata in the sdist package of flake8 has this info:It should contain instead:
This happened because the
setup.py
uses conditional code, such as this:If the sdist is built with Python 3, these conditions are skipped and the dependencies are not recorded in the package metadata at all. If the package were built with Python 2, the dependencies would have been recorded because the conditions would have been satisfied.
However, a better approach is to use
extras_require
to ensure the correct metadata is saved in the sdist regardless of the Python version used.The correct metadata is crucial for build systems that need sdist to re-build packages (wheels) for the internal use in the environment guaranteed to be the same as the one where they will be deployed.
I prepared RB and will refer to this issue in it.
The text was updated successfully, but these errors were encountered: