summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* distutils-r1.eclass: Let gpep517 compile bytecode when 9+ is usedMichał Górny2022-08-021-10/+26
| | | | | | | | | | | | Use the new --optimize option of gpep517 >= 9 when it is installed, and remove the python_optimize call then. This conditional logic is meant to give some additional testing while gpep517-9 is still in ~arch. Note that this also removes python_optimize call for "no" mode. However, this mode is used only by a handful of ebuilds, so if any of them needs an explicit python_optimize call, we can quickly fix them. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Pass EPREFIX to addpredictMichał Górny2022-08-021-2/+2
| | | | | | Pointed out by Arfrever. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Bump dev-python/sip dependencyMichał Górny2022-08-021-1/+1
| | | | | Bug: https://bugs.gentoo.org/851840 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Require gpep517 >= 8Michał Górny2022-08-021-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Update pyproject.toml advice for PEP517 modeMichał Górny2022-08-021-4/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Update .pyc addpredicts for pypy3.9Michał Górny2022-07-261-2/+1
| | | | | | | Update the addpredicts for legacy mode to cover pypy3.9 directory, and remove the rule for stale Portage directory. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove unneccess. addpredict for PEP517 modeMichał Górny2022-07-261-7/+0
| | | | | | | We do not unset PYTHONDONTWRITEBYTECODE in the PEP517 mode, so we shouldn't need to be adding addpredicts for that. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Bump minimal dep versionsMichał Górny2022-07-261-5/+5
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: support >=dev-util/maturin-0.13.0Ionen Wolkens2022-07-121-6/+16
| | | | | | | | | | | | | | | | pep517 mode had some options changed around (as part of 1.0 release roadmap), notably adds --jobs/--profile, and removes --cargo-extra-args. --jobs is semi-optional given cargo.eclass handles that, but will be useful in the event don't use cargo.eclass (e.g. vendored crates), or if maturin ever uses it internally for non-cargo bits. Errors out on unrecognized options, so split in two blocks with intend to cleanup the old once a 0.13.x is stable rather than do messy per-option conditions (likely won't stable .0, releases are frequent). Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
* distutils-r1.eclass: make QA check conditional on 'diff' presenceSam James2022-06-291-13/+18
| | | | | | | | We get trouble when bootstrapping Prefix otherwise as diffutils may not be installed yet. This is a bit less churn than adding the BDEPEND, not that there's a strong argument either way. Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: Adjust minimal dep versions to current stableMichał Górny2022-06-291-18/+30
| | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: Print gpep517 invocations verboselyMichał Górny2022-06-291-8/+18
| | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: Introduce distutils_wheel_installMichał Górny2022-06-291-12/+33
| | | | | | | | | Split the wheel installation logic from distutils_pep517_install into a new distutils_wheel_install function. Also intended for expert use only. Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: List wheel filename in install einfoMichał Górny2022-06-121-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: add initial meson-python PEP517 supportSam James2022-06-121-0/+14
| | | | | Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Update function docsMichał Górny2022-06-121-11/+22
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Warn about direct foreach_impl calls in d-r1Michał Górny2022-06-121-0/+1
| | | | | | | Warn if python_foreach_impl is called directly from within a phase function that is already covered by a distutils-r1 sub-phase. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add assertions for bindir correctnessMichał Górny2022-06-121-3/+27
| | | | | | | | | | | | | The eclass code in distutils-r1_python_install makes some assumptions specific to _distutils-r1_post_python_compile being called, and scriptdir not being modified since. Make them more explicit by: 1) explicitly removing the files that we expect to have been created, 2) verifying that both the copied and the original scriptdir have the same list of files. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Introduce DISTUTILS_USE_PEP517=no modeMichał Górny2022-06-081-1/+28
| | | | | | | | | | | | | | | | Introduce a new DISTUTILS_USE_PEP517 value "no" that stands for "no build system". This is primarily meant to replace the legacy distutils-r1 logic used for bootstrapping baseline PEP 517 packages. At the same time, it provides a convenient replacement for some of the uses of python-r1. In this mode, the eclass does not add PEP 517-specific dependencies and the default python_compile() is a no-op. However, it does set dependencies, REQUIRED_USE and enables sub-phase usage (with respect to DISTUTILS_OPTIONAL). It also permits using distutils_enable_{sphinx,tests}. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Move python_optimize call to post-installMichał Górny2022-06-081-14/+18
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Future-proof python_install() for empty rootMichał Górny2022-06-081-1/+8
| | | | | | | Account for the possibility that ${BUILD_DIR}/install does not contain any files to merge, in preparation for DISTUTILS_USE_PEP517=no. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Move venv creation to post-compileMichał Górny2022-06-081-27/+38
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Revert "Move venv/merge-root logic to post-phases"Michał Górny2022-06-071-73/+51
| | | | | | | Reverts: de2e1bee2462fccc445b845a889b006f888c6b1d Closes: https://bugs.gentoo.org/850418 Closes: https://bugs.gentoo.org/850433 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Revert "Introduce DISTUTILS_USE_PEP517=no mode"Michał Górny2022-06-071-29/+1
| | | | | Reverts: e897148019dc484622c8c6a44153dd45694d8a99 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Warn about setuptools legacy backendMichał Górny2022-06-071-1/+7
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Ban DISTUTILS_IN_SOURCE_BUILD in PEP517 modeMichał Górny2022-06-071-0/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add "_trial_temp" to forbidden package namesMichał Górny2022-06-071-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: small docs format fixesArthur Zamarin2022-06-071-3/+6
| | | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Introduce DISTUTILS_USE_PEP517=no modeMichał Górny2022-06-071-1/+29
| | | | | | | | | | | | | | | | Introduce a new DISTUTILS_USE_PEP517 value "no" that stands for "no build system". This is primarily meant to replace the legacy distutils-r1 logic used for bootstrapping baseline PEP 517 packages. At the same time, it provides a convenient replacement for some of the uses of python-r1. In this mode, the eclass does not add PEP517-specific dependencies and does not export default python_compile() and python_install() implementations. However, it does set dependencies, REQUIRED_USE and enables sub-phase usage (with respect to DISTUTILS_OPTIONAL). It also permits using distutils_enable_{sphinx,tests}. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Move venv/merge-root logic to post-phasesMichał Górny2022-06-071-51/+73
| | | | | | | | Move the PEP517 venv logic, install executable wrapping and root-merging logic all into post-phases. This will enable the ebuilds that do not use the standard phase implementations to use them. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Make *-nspkg.pth warning fatal for EAPI 9+Michał Górny2022-06-071-0/+4
| | | | | | | | | Now that we've essentially removed non-implicit namespace packages from Gentoo and setuptools upstream has deprecated their old solution, it's time to make this check fatal. Unfortunately, I did not think of it when adding PEP517 mode, so let's do that in EAPI 9. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove the obsolete pypy/share checkMichał Górny2022-06-071-12/+0
| | | | | | | | The PyPy 'share' directory check was necessary because of the historical prefix logic that we patched in Gentoo. All modern versions of PyPy use '/usr' as sys.prefix natively, so the check is no longer needed. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Move install QA checks to post-phase functionMichał Górny2022-06-071-23/+31
| | | | | | | | Perform the install QA check (the invalid package name check) in a post- phase function. This enables it to be performed even when distutils-r1_python_install is not used. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Call egg-info cleanup via post-test phaseMichał Górny2022-06-071-3/+12
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Support internal post-python_* phase functionsMichał Górny2022-06-071-0/+6
| | | | | | | | | Support running additional post-python_* phase functions for internal usage. The goal is to replace some of the inline logic in distutils-r1_python_* functions that relies on the user calling them and additional calls to python_foreach_impl. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Update license stripping for hatchMichał Górny2022-05-111-3/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Introduce sipbuild backend supportMichał Górny2022-05-111-2/+51
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Move setup from src_configure to prepare_allMichał Górny2022-05-091-3/+3
| | | | | | | | | | Move a few minor setup calls from distutils-r1_src_configure() to distutils-r1_python_prepare_all(). Since we do not declare default configure sub-phases, it is easy to override src_configure() entirely and accidentally skip these steps. We already warn for missing distutils-r1_python_prepare_all() call, so let's move them there. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Print buildsys package versions to aid debugMichał Górny2022-05-091-0/+92
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Support DISTUTILS_ARGS in PEP517 modeMichał Górny2022-05-091-5/+27
| | | | | | Use gpep517 --config-json support to pass DISTUTILS_ARGS in PEP517 mode. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Utilize the new makeopts_jobs defaultMichał Górny2022-05-011-5/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Support pbr backendMichał Górny2022-05-011-0/+9
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Unleash dev-python/gpep517Michał Górny2022-04-251-70/+15
| | | | | | Switch the distutils-r1.eclass to gpep517 code branches unconditionally. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Limit dev-python/installer versionMichał Górny2022-04-251-0/+1
| | | | | | | | dev-python/installer has made incompatible changes in 0.5.1 that breaks the non-gpep517 code path. Add a version limit prior to bumping, in case we end up reverting gpep517 changes. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: support maturin backendIonen Wolkens2022-04-251-0/+17
| | | | | Signed-off-by: Ionen Wolkens <ionen@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: use case for system-specific build quirksIonen Wolkens2022-04-251-36/+39
| | | | | | | With only indentation changes. Signed-off-by: Ionen Wolkens <ionen@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Account for func args when counting makejobsMichał Górny2022-04-251-1/+1
| | | | | | | | Account for distutils-r1_python_compile arguments when counting makejobs. This is needed to correctly detect forced "-j1", e.g. in dev-python/pandas. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Run build_ext only with --jobs -gt 1Michał Górny2022-04-251-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Run build_ext only if there are 2+ filesMichał Górny2022-04-251-4/+8
| | | | | | | | Run parallel build_ext only if there are at least two potential source files to compile. This call is expensive and parallel builds do not benefit us if there is only one file to compile. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: "build" dir warn makes sense for pep517 onlyMichał Górny2022-04-211-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>