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

Add wheel as dependency to check-manifest #126

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Conversation

sfmig
Copy link
Contributor

@sfmig sfmig commented Oct 28, 2024

Problem

With Python 3.12, pre-commit run check-manifest returns an error of missing dependencies.
image

According to this issue this is due to a change in behaviour in Python 3.12, in which apparently wheel is no longer preinstalled with virtualenv / venv. See release notes too.

Proposed solution

Option 1: adding wheel as an additional dependency in .pre-commit-config.yaml. This is implemented in this PR.

  - repo: https://github.com/mgedmin/check-manifest
    rev: "0.49"
    hooks:
        - id: check-manifest
          args: [--no-build-isolation]
          additional_dependencies: [setuptools-scm, wheel]

Option 2: specifying a language version for Python in check-manifest. Feels less flexible.

  - repo: https://github.com/mgedmin/check-manifest
    rev: "0.49"
    hooks:
        - id: check-manifest
          args: [--no-build-isolation]
          language_version: "3.12"
          additional_dependencies: [setuptools-scm]

Questions

  • In CI, we run check-manifest with Python 3.10 and without the --no-build-isolation flag.

  • Do we need to make CI and the pre-commit hook more similar? Why do we run the --no-build-isolation flag in the pre-commits?

  • This is only a problem if the system or python interpreter in the same environment as the pre-commit tool is 3.12, so not sure if we should fix this already?

@adamltyson
Copy link
Member

Option 1 sounds sensible to me

@sfmig sfmig marked this pull request as ready for review October 29, 2024 10:29
@sfmig sfmig requested review from a team and removed request for alessandrofelder November 27, 2024 11:16
@adamltyson adamltyson merged commit f80a989 into main Nov 28, 2024
13 checks passed
@sfmig sfmig deleted the smg/check-manifest-py312 branch November 28, 2024 11:54
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

Successfully merging this pull request may close these issues.

2 participants