-
Notifications
You must be signed in to change notification settings - Fork 13
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
pre_compile fails when installed using setuptools instead of PEP517 #52
Comments
Thank you very much @bnavigator for reporting this problem. Just a quick question, if I change to |
I would have expected so, but it doesn't. My assumption was wrong. There is a difference between the .egg-info and .dist-info. The Dist Info:
egg-info:
Seems like |
https://docs.python.org/3/library/importlib.metadata.html#distribution-versions and https://setuptools.pypa.io/en/latest/deprecated/python_eggs.html#sources-txt-source-files-manifest seem to contradict each other here. In line with #50 it might be worth not to rely on |
Update: With importlib_metadata 4.11.4 overriding the importlib.metadata from Python 3.10.5, the filelist changes, but ist still wrong:
|
Ideally, Setuptools would not generate egg-info, and would instead generate dist-info with a RECORD. If it did that, then |
I wish we would live in an ideal world 😆 |
@bnavigator what is the motivation behind using the deprecated It should be possible to support this use case, however there will be an increase in complexity and maintenance effort, which I would like to avoid... It non trivial to satisfy these constraints simultaneously: a) my desire to avoid double bookkeeping, b) (potential) lack of symlinks on Windows, c) Legacy installation methods like |
No motivation at all. It's the legacy way of packaging and so far the default when generating recipes for a rpm build. I switched to PEP517 and made the error go away. The easiest way to avoid future errors like this is to remove the setup.py completely and force your users to use PEP517. Ironically I only stumbled over this because I am updating the setuptools package itself and validate-pyproject is in the dependency graph for the test suite. |
Thank you very much for the information @bnavigator. I think I will follow this direction. |
With PEP 660 implemented in setuptools, this should be safe. Closes #52.
When using the legacy setuptools
python setup.py
from the PyPI published sdist, setuptools installs avalidate_pyproject-*.egg-info
(also pre-packaged in the sdist),or*. This clashes withvalidate_pyproject-0.9.dist-info
(setup.py bdist_wheel
)pre_compile.load_licenses()
which looks for the hard-coded dist_namevalidate-pyproject
. Note the difference in-
vs_
.validate-pyproject/src/validate_pyproject/pre_compile/__init__.py
Line 116 in d87a602
validate-pyproject/src/validate_pyproject/__init__.py
Line 11 in d87a602
Workaround: Use a PEP517 installer like
pip
orbuild
+install
.* Edit:
validate_pyproject-0.9.dist-info
is also the one installed with a PEP517 frontend and found fine byimportlib.metadata.files('validate-pyproject')
The text was updated successfully, but these errors were encountered: