-
Notifications
You must be signed in to change notification settings - Fork 471
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
2.2.2: codespell script installed in wrong location #2592
Comments
Looks as well like test suite is installed as well (conten of the codespell_lib/tests/) |
Because in pyproject.toml already is |
Is this an issue with codespell itself, or the Fedora package of codespell? |
I'm not using Fedora. |
Just checked and in Fedora spec file in %install is line which removes test suite from buildroot. |
Sorry, I noticed the I am not sure how to reproduce this issue, or where to find documentation on duplicates in |
And my wrong as well. I shoud change %dist macro value as well to not confuse peopel like you 😋
My typical build proceduyte which uses pap517 consist from:
|
The command line option Logs of "python3.8 -Bm build -w --no-isolation", directly on Ubuntu 18.04
I do not see I do see the
I am surprised changing
I cannot keep the current pace of changes in Python packaging, it is a poorly documented mess. Do you know of any documentation on migrating from |
To clarify, is this a regression, meaning you can reproduce this issue with version 2.2.2 but not earlier versions? |
Yes. Prev version had no such issues. |
Have you made sure As I wrote, I cannot easily reproduce this issue on my machine (maybe because I cannot use the |
Here is list of modules with versions installed in build env Package Version
-------------------- --------------
appdirs 1.4.4
attrs 22.1.0
Brlapi 0.8.3
build 0.9.0
chardet 5.0.0
contourpy 1.0.6
cssselect 1.1.0
cycler 0.11.0
distro 1.8.0
dnspython 2.2.1
extras 1.0.0
fixtures 4.0.0
fonttools 4.38.0
gpg 1.17.1-unknown
importlib-resources 5.9.0
iniconfig 1.1.1
kiwisolver 1.4.4
libcomps 0.1.19
louis 3.23.0
lxml 4.9.1
matplotlib 3.6.2
numpy 1.23.1
olefile 0.46
packaging 21.3
pbr 5.9.0
pep517 0.13.0
Pillow 9.3.0
pip 22.2.2
pkgutil_resolve_name 1.3.10
platformdirs 2.5.2
pluggy 1.0.0
py 1.11.0
PyGObject 3.42.2
pyparsing 3.0.9
pyrsistent 0.19.2
pytest 7.1.3
python-dateutil 2.8.2
rpm 4.17.0
scour 0.38.2
setuptools 65.5.1
setuptools-scm 7.0.5
six 1.16.0
testtools 2.5.0
tomli 2.0.1
traitlets 5.4.0
typing_extensions 4.3.0
wheel 0.37.1
zipp 3.9.0 |
Again, my suggestion is to update Python packages. In your case, See Python Packaging User Guide:
|
Did you truy try to use pep517 build procedure? |
I want only to say that none of those modiules are involved in pep517 based build procedure. |
FYI: I've updated pip and wheel and as expected pep517 based still fails with the same error message. |
We really need a way to reproduce this, not abstract things like Did you try try to use pep517 build procedure? I have done what you suggested and am unable to reproduce the issue at hand:
Speaking for myself here, I cannot spend more time trying to find a way to reproduce this. I don't know enough about Python packing, and cannot spend time learning more in the short term, to be able to infer the root cause of this issue. |
Could you pelase show me results of what you done? |
See details in #2592 (comment). |
Just FTR .. Debian actibvely is switching now to pep517 and Fedora is in that porocess more than year. I have 100% of my packages with python modules (+1.05k total) switched to pep517. [tkloczko@devel-g2v SPECS]$ grep BUG: python-*spec| grep pep517
python-flexmock.spec:# BUG: pep517 build issue https://github.com/flexmock/flexmock/issues/120
python-frozenlist.spec:# BUG: pep517 build fails https://github.com/aio-libs/frozenlist/issues/296 temporary stay on sdist source tar ball
python-hidapi.spec:# BUG: pep517 buld is broken https://github.com/trezor/cython-hidapi/issues/133
python-jupyterlite.spec:# BUG: pep517 build fails https://github.com/jupyterlite/jupyterlite/issues/652
python-kiwisolver.spec:# BUG: pep517 warnings https://github.com/nucleic/kiwi/issues/139
python-multipledispatch.spec:# BUG: missing six in venv for pep517 based build https://github.com/mrocklin/multipledispatch/issues/120
python-openstackdocstheme.spec:# BUG: pep517 warnings
python-pep517.spec:# BUG: flake8 tests are failing https://github.com/pypa/pep517/issues/127
python-plotly.spec:# BUG: pep517 build fails when used VCS tar ball https://github.com/plotly/plotly.py/issues/3669
python-pydantic.spec:# BUG: pep517 build is broken https://github.com/samuelcolvin/pydantic/issues/3577
python-pyjson5.spec:# BUG: pep517 build fails https://github.com/Kijewski/pyjson5/issues/29
python-pytest-toolbox.spec:# BUG: pep517 build fails https://github.com/samuelcolvin/pytest-toolbox/issues/53 |
I understand that, and I wish I could help, but I have absolutely no clue how to reproduce this issue. I cannot find |
All what you need to do is:
All that needs to be bone in git tree where is (redundant) bin/ directory. |
Please help understand what you mean exactly by a “git tree where is (redundant) bin/ directory”. Should we remove
Logs of "python -sBm build -w --no-isolation", inside a python3.8 venv on Ubuntu 18.04
|
Actually, if you have a patch or a clue how to fix this issue, why not create a merge request? It might be easier for me to understand. |
So as you see still existin in git repo bin/ content is not needed. |
All what you need to do is remove from git repo bin/. |
Fixes codespell-project#2592.
Fixes codespell-project#2592.
Yes, that is exactly what I had understood from your explanation at some point, and I had already tried removing I suspect I might need to fix this: Lines 15 to 17 in 1302d79
Providing a merge request and a link to documentation would have been so much easier for both of us |
Again .. you have already in pyproject.toml Lines 50 to 51 in 1302d79
This part is responsble for generating that script. Everything elese can be removed. |
Not sure about the test suite, though. Should I remove it? The Python Packaging User Guide seems to imply they should not be excluded, at least from source distributions:
|
I've mentioned about pyprojecto.toml entry first time here: |
What about the test suite? |
Please do not remove it. Just move from codespell_lib/tests/ to tests/ (that may require some test suite adjustments in test suite is fyou are using relative imports). |
Looks like test suite in current form does not contain any relative paths import lines so just move codespell_lib/tests/ to tests/ shoud skip include test suite files in .whl. |
If I understand correctly:
I think we want to keep |
pypa/setuptools-scm#190 might be of interest. |
Coud you at least try to move test suite files to tests/ in your workig directory to see result? |
Sure, I can do that. It is worth trying, but in the end, we need an alternative solution. |
The issue remains that all these changes break some targets in the
|
Using |
Source distributions such as sdist must include test directories. Note that all files matching the pattern `test/test*.py` (or perhaps `tests/test*.py` with an `s`?) are included implicitly: https://packaging.python.org/guides/using-manifest-in/#how-files-are-included-in-an-sdist Binary distributions such as wheel must exclude test directories. This seems to be done implicitly for top-level `tests/` directories only. I do not know how to explicitly exclude files from binary distributions. This setuptools issue might be of interest: pypa/setuptools-scm#190 I change `codespell_lib/tests/` to a top-level `tests/` directory as a workaround. Not that I like it, but I currently lack an alternative. Fixes (partially) codespell-project#2592.
Yes, we know, this is exactly what I have suggested: |
And finally back to removing Help is welcome to fix the Lines 15 to 17 in 1302d79
|
Fixes codespell-project#2592.
Fixes codespell-project#2592.
It is +100 commits since last release and it would be a bit hard to integrate that with my build procedure. Thank you 👍 |
During package 2.2.2 I found that
codespell
script is not installed in bindir.The text was updated successfully, but these errors were encountered: