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

distutils-r1.eclass: wheel reuse #36672

Closed
wants to merge 8 commits into from

Conversation

mgorny
Copy link
Member

@mgorny mgorny commented May 14, 2024

distutils-r1 updates related to https://bugs.gentoo.org/931689.

Includes some example ebuilds with explicit IUSE=stable-api (still not sure if we should do that).

Includes EPYTEST_FLAGS, as requested by @asarubbo.

Includes updates for scikit-build-core 0.9.4. Since it's ~arch, I went straight for requiring the new version.

@mgorny mgorny added assigned PR successfully assigned to the package maintainer(s). work in progress The PR is not yet ready to be merged. noci Skip CI for this pull request labels May 14, 2024
@mgorny mgorny self-assigned this May 14, 2024
@mgorny mgorny removed the assigned PR successfully assigned to the package maintainer(s). label May 14, 2024
@mgorny mgorny changed the title distutils-r1.eclass: wheel reuse WIP distutils-r1.eclass: wheel reuse May 14, 2024
@mgorny mgorny removed the work in progress The PR is not yet ready to be merged. label May 14, 2024
@mgorny mgorny removed their assignment May 14, 2024
@mgorny mgorny removed the noci Skip CI for this pull request label May 14, 2024
@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels May 14, 2024
@mgorny mgorny removed the assigned PR successfully assigned to the package maintainer(s). label May 14, 2024
@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. and removed no bug found No Bug/Closes found in the commits. labels May 14, 2024
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-14 12:40 UTC
Newest commit scanned: 8fabfdc
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/1b02856649/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-14 13:31 UTC
Newest commit scanned: 39449a3
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/37b736a3ae/output.html

@mgorny mgorny removed the assigned PR successfully assigned to the package maintainer(s). label May 15, 2024
@mgorny
Copy link
Member Author

mgorny commented May 15, 2024

That said, when this is reviewed and all, I think I'll only push the eclass bits and leave IUSE=stable-api out for now. It's hacky and from a quick diffoscope run, doesn't seem to yield real benefit.

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @mgorny
Areas affected: ebuilds, eclasses
Packages affected: dev-python/psutil, dev-python/pyproject-fmt-rust

dev-python/psutil: @gentoo/python
dev-python/pyproject-fmt-rust: @gentoo/python

Linked bugs

Bugs linked: 931689, 905863


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. and removed bug linked Bug/Closes found in footer, and cross-linked with the PR. labels May 15, 2024
Copy link
Member

@thesamesam thesamesam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok but not tested. I assume you have with all DISTUTILS_EXT on your system at least

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-15 16:11 UTC
Newest commit scanned: ae97fe8
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/8ca61adf49/output.html

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-15 17:01 UTC
Newest commit scanned: c8ce243
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/b999c1dd78/output.html

eclass/distutils-r1.eclass Show resolved Hide resolved
eclass/python-utils-r1.eclass Show resolved Hide resolved
eclass/python-utils-r1.eclass Show resolved Hide resolved
@mgorny
Copy link
Member Author

mgorny commented May 17, 2024

Actually, I need to add some more logic to prevent this from breaking ebuilds that call distutils-r1_python_compile multiple times.

Store the created wheel path in DISTUTILS_WHEEL_PATH when returning
from distutils_pep517_install.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
If the package is creating at least one pure Python wheel, check whether
the baseline package contents (i.e. everything but compiled Python
modules, extensions and .dist-info) match between implementations.
This is meant to ensure that we can safely optimize builds by reusing
pure Python wheels from previous builds.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
Support reusing the wheels built for earlier Python implementations
if they are compatible with the subsequent implementations being built.
This includes pure Python wheels in packages that do not set
DISTUTILS_EXT, and stable ABI wheels.

Closes: https://bugs.gentoo.org/931689
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://bugs.gentoo.org/905863
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
@mgorny
Copy link
Member Author

mgorny commented May 17, 2024

Switched to an associative array, and matched wheels to source directories. That should prevent a wrong wheel from being used.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-17 08:01 UTC
Newest commit scanned: f241da5
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/ad958cc6f8/output.html

Fix epytest to call `die -n` after performing the cleanup, rather than
before.  This ensures that stray cache files are cleaned up even if
we're actually going to die, e.g. when using
`FEATURES=test-fail-continue`.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2024-05-17 13:46 UTC
Newest commit scanned: 5e85bd7
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/f6f8cebea2/output.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR.
Projects
None yet
5 participants