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

pre-commit hook is missing wheel dependency when run on Python 3.12 #168

Closed
antonagestam opened this issue Dec 17, 2023 · 2 comments
Closed

Comments

@antonagestam
Copy link

check-manifest...........................................................Failed
- hook id: check-manifest
- exit code: 2

['/home/runner/.cache/pre-commit/repo8fuzuijz/py_env-python3/bin/python', '-m', 'build', '--sdist', '.', '--outdir', '/tmp/check-manifest-5cmbeyme-sdist', '--no-isolation'] failed (status 1):
* Getting build dependencies for sdist...
running egg_info
creating src/immoney.egg-info
writing src/immoney.egg-info/PKG-INFO
writing dependency_links to src/immoney.egg-info/dependency_links.txt
writing requirements to src/immoney.egg-info/requires.txt
writing top-level names to src/immoney.egg-info/top_level.txt
writing manifest file 'src/immoney.egg-info/SOURCES.txt'
reading manifest file 'src/immoney.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'src/immoney.egg-info/SOURCES.txt'

ERROR Missing dependencies:
	wheel
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching '.editorconfig'
warning: no previously-included files matching '*' found under directory '.github'
warning: no previously-included files found matching '*.yaml'
warning: no previously-included files found matching '*.yml'
warning: no previously-included files found matching 'generate-currencies.py'
warning: no previously-included files found matching 'generate-requirements.txt'

Error: Process completed with exit code 1.

Adding additional_dependencies: [ wheel==0.42.0 ] is effective as workaround.

antonagestam added a commit to antonagestam/immoney that referenced this issue Dec 17, 2023
Additionally bumps to use Python 3.12 in various CI checks.

Adds an additional dependency on wheel for check-manifest, see:
mgedmin/check-manifest#168
@mgedmin
Copy link
Owner

mgedmin commented Dec 18, 2023

If you use --no-build-isolation, you're supposed to install all the build requirements yourself, so this is working as designed. The design, and also especially the description of the option, are not necessarily good, though.

I find the option confusing myself (especially the default: True bit added by argparse to the --help message, since it means "use build isolation by default" but looks like it says "use --no-build-isolation by default", augh!). All it does is make check-manifest pass --no-isolation to python -m build, which makes it skip the part where it creates a fresh virtualenv and installs all the packages listed in build-system.requires.

I think the worst part is where the README snippet that speaks about build requirements says "outside of pip / setuptools / wheels", which used to be preinstalled by virtualenv/venv, as that is no longer the case since Python 3.12.

I'll try to at least update the README and the --help message.

@antonagestam
Copy link
Author

@mgedmin Got it, thanks for the insight 👍

mgedmin added a commit that referenced this issue Dec 18, 2023
Stop assuming that setuptools/wheel will always be preinstalled and
don't need to be explicitly listed as build requirements; this is not
the case in Python 3.12.

Stop using ArgumentDefaultsHelpFormatter, it makes the help message for
--no-build-isolation extra confusing.

Clarify that 'patterns' in --ignore et al. mean glob patterns rather
than regexes or something.

Use an exact version instead of `... # pick a valid tag / revision` in
the README, I trust my `make check-readme` (part of `make release`) to
remind me to update it.

See #168.
@mgedmin mgedmin closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants