summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* distutils-r1.eclass: Support flit_scm backendMichał Górny2022-04-211-0/+9
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: don't call copy_egg_info if USE_PEP517=setuptoolsSam James2022-04-111-1/+1
| | | | | | Fixes: 6451cf647f04b31a56ea2dc8c3f84a70c2468f87 Thanks-to: Ionen Wolkens <ionen@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: Bump min. dependency versionsMichał Górny2022-04-111-9/+11
| | | | | | | | | Bump min. dependency versions to match oldest stable in ::gentoo, in order to avoid requiring developers to repeat them in BDEPEND with higher version. Closes: https://github.com/gentoo/gentoo/pull/24965 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Print deprecation warning for distutils buildsMichał Górny2022-04-111-0/+9
| | | | | | | | | | Print deprecation warnings for non-PEP517 builds using plain distutils. This is a small subset of Python packages overall, and the first step towards deprecating legacy build support. Transitioning pure distutils packages is also important to avoid .egg-info collisions when we switch from CPython distutils to setuptools-vendored distutils. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Introduce distutils_write_namespaceMichał Górny2022-04-111-0/+41
| | | | | | | | Introduce a distutils_write_namespace helper that can be used to temporarily write a namespace __init__.py as needed to run tests when legacy dev-python/namespace-* packages are installed. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Skip build_ext when there no .c/.pyx filesMichał Górny2022-04-111-1/+11
| | | | | | | | | Skip issuing build_ext when there appears to be no .c/.pyx files. Since starting setuptools is expensive, this gives a major speedup to building pure Python packages. If the check misfires, the worst that can happen is that C extensions will be built serialized. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Call build_ext instead of build in PEP517 modeMichał Górny2022-04-111-1/+5
| | | | | | | | | | | | | | Call `setup.py build_ext` instead of the wholesale `build` in PEP517 mode. After all, the call is not strictly necessary; it is only done in order to build C extensions in parallel (PEP517 backend does not support specifying job count). By skipping the other tasks build command does (and then repeats via PEP517 call), the ebuild can build a few seconds faster. Since this is a potentially breaking change (but very unlikely to actually break anything), let's test it behind GPEP517_TESTING. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Update namespace package doc URLMichał Górny2022-04-111-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>