summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* distutils-r1.eclass: Pass ninja options to scikit-build-coreMichał Górny4 days1-0/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Update scikit-build-core to 0.9.4Michał Górny4 days1-5/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Support reusing prior wheels when compatibleMichał Górny4 days1-0/+38
| | | | | | | | | | 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>
* distutils-r1.eclass: Add a QA warning for pure Python file mismatchMichał Górny4 days1-0/+40
| | | | | | | | | | 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>
* distutils-r1.eclass: Store created wheels in DISTUTILS_WHEELSMichał Górny4 days1-0/+11
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Set DISTUTILS_WHEEL_PATH in PEP517 installMichał Górny4 days1-1/+8
| | | | | | | Store the created wheel path in DISTUTILS_WHEEL_PATH when returning from distutils_pep517_install. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Pass arguments to scikit-build-coreMichał Górny2024-04-191-0/+43
| | | | | | | | | | | | Support passing DISTUTILS_ARGS to scikit-build-core, along with some standard arguments that: - ensure that CFLAGS, CXXFLAGS, CPPFLAGS and so on, are respected - respect CMAKE_BUILD_TYPE, along with the default of RelWithDebInfo - enable verbose builds - disable stripping Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Document DISTUTILS_ARGS for maturin & mesonMichał Górny2024-04-191-0/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove more junk from .dist-infoMichał Górny2024-04-011-3/+12
| | | | | Closes: https://bugs.gentoo.org/927818 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Fix `det unittest` with 3.12 onlyMichał Górny2024-04-011-4/+4
| | | | | Closes: https://bugs.gentoo.org/926964 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Refactor `distutils_enable_tests pytest`Michał Górny2024-04-011-11/+9
| | | | | | | | Refactor `distutils_enable_tests pytest` to move `test_pkgs` logic straight into pytest block, as it is not used by any other variant anymore. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove nosetests supportMichał Górny2024-04-011-8/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Run pdm.pep517.api via pdm-backendMichał Górny2024-04-011-17/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Bump minimal dep versionsMichał Górny2024-04-011-14/+14
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Set setuptools build config for all backendsMichał Górny2024-03-121-23/+19
| | | | | | | | | | | | | | | | | | Create the build config and set DIST_EXTRA_CONFIG independently of the PEP517 backend used (but only in PEP517 mode). This ensures that our build directory (and parallel build) is respected when backend values other than `setuptools` are used, particularly standalone build in dev-python/setuptools, custom backends wrapping setuptools and other PEP517 that might use setuptools internally. As an immediate benefit, this stops new versions of dev-python/setuptools from installing their `build` tree into site-packages. Thanks to Eli Schwartz for noticing this and bringing to our attention. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/35695 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: wire up meson-python to meson.eclassEli Schwartz2024-03-081-1/+15
| | | | | | | | | | | | | | | | | | | The meson-python build backend -- as the name suggests -- uses meson under the hood. We have a meson eclass which does lots of useful things pertinent to meson. Make sure it gets invoked, by prying out the options that meson_src_configure would use and setting passing them as our seed values for gpep517. [sam: Tweak '=' style.] [sam: Tweak mesonargs->MESONARGS for final version of e9189344b971f7ee0e2bec36650c57dbade4f122.] [sam: Update local variable list.] [mgorny: Add local variables for LTO filtering.] Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/35554 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Make vars local before calling filter-ltoMichał Górny2024-03-081-0/+4
| | | | | | | Make LTO filtering local to the compilation code. This avoids disabling LTO for non-Python parts of an ebuild. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Move filter-lto into DISTUTILS_EXT blockMichał Górny2024-03-081-6/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Limit DISTUTILS_EXT logic to compile & testMichał Górny2024-03-081-1/+7
| | | | | | | | | | | Perform the environment modifications specific to DISTUTILS_EXT to python_compile and python_test phases. These are the only phases where we expect extension builds to be called. This allows us to limit the scope of localized CPPFLAGS, as we both want to avoid leaking changes to non-Python parts of the build and let ebuilds to manipulate flags at their leisure, particularly prior to python_compile. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove -Werror... hack (now in cython)Michał Górny2024-03-081-5/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass, distutils-r1.eclass: Add EPYTEST_TIMEOUTMichał Górny2024-01-051-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add support for dev builds in setuptools-rustMichał Górny2024-01-051-1/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Call gpep517 via EPYTHONMichał Górny2023-12-171-3/+3
| | | | | | | | | | | Call gpep517 via EPYTHON, in order to make it possible to use any plugins that were installed during python_compile() in python_test(). This is used in dev-python/setuptools-gettext that is tested via building an example project relying on the plugin. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/34312 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: mark DISTUTILS_EXT as @PRE_INHERITSam James2023-12-141-0/+1
| | | | | | We set DEPEND and IUSE based on it. Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: workaround cython bug for Modern CSam James2023-12-141-0/+5
| | | | | | | | | | | Pass -Wno-error=incompatible-pointer-types for now to avoid many dupes for the same cython bug. Bug: https://github.com/cython/cython/issues/2747 Bug: https://bugs.gentoo.org/918983 Bug: https://bugs.gentoo.org/919261 Bug: https://bugs.gentoo.org/919277 Signed-off-by: Sam James <sam@gentoo.org>
* distutils-r1.eclass: Silence pydevd warningsMichał Górny2023-11-191-0/+3
| | | | | | | | | Set `PYDEVD_DISABLE_FILE_VALIDATION` to silence warnings about frozen modules from dev-python/pydevd. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/33888 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add pytest-xdist dep if EPYTEST_XDIST is setMichał Górny2023-11-071-0/+3
| | | | | | | Make `distutils_enable_tests pytest` automatically add the `dev-python/pytest-xdist` dependency if `EPYTEST_XDIST` is set. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Refactor d_e_t to permit multiple test packagesMichał Górny2023-11-071-6/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Refactor `d_e_t unittest` (NFC)Michał Górny2023-11-071-9/+8
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Make use of gpep517's new build-wheel --prefix argJames Le Cuirot2023-10-091-1/+2
| | | | | | This fixes cross-prefix installations. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* distutils-r1.eclass: teach setuptools to respect (some) build optionsEli Schwartz2023-09-141-38/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, setup.py was handled by: - manually passing makejobs, with a heuristic to guess whether it was a time saver to do so. - rm -rf'ing the build directory in between python versions to prevent cross-version contamination This is because in PEP 517 mode, it doesn't accept build options specific to a setuptools phase. So a crude hack is to just build_ext twice, once explicitly and once internally as part of bdist_wheel, and pray that in the latter case it detects that there's nothing to do. Unfortunately, sometimes build_ext does NOT detect that there is nothing to do -- e.g. for codegen tools such as mypyc, that produce *.c files which are different every time you try building. As for build directories, those were given up on as hopeless. There's a better hack which is to set a magic environment variable for a setup.cfg file which is parsed additionally to the one provided by the project. It can contain additional settings, such as the build-base and parallelism, which means that bdist_wheel intrinsically builds extensions in parallel the only time it is called. And we can set the output directory for all build artifacts to outside of the source tree, so it is no longer necessary to delete them (which among other things, makes debugging difficult). This is similar to .pydistutils.cfg, but is processed later and can be in arbitrary locations. Since we store it in the per-impl build directory we don't need to wipe it after using it to avoid leakage. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: append scikit-build-core to documentation.Benda Xu2023-08-191-0/+2
| | | | | | | | To complete 5b29e5b1a393c21db9974de5c2d01e6dc482d4b9. Signed-off-by: Benda Xu <heroxbd@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/32354 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: wheel dep moved into setuptoolsMichał Górny2023-07-171-3/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Disable LTO when using cargo.eclassMichał Górny2023-07-171-0/+7
| | | | | | | | | Strip LTO flags when cargo.eclass is inherited. This means that Rust extensions are being built, and linking them with C/C++ style LTO results in broken shared libraries. Closes: https://bugs.gentoo.org/910220 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Update addpredict for PyPy3.10Michał Górny2023-07-171-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove --reflink=auto from calls to cpViolet Purcell2023-07-171-1/+1
| | | | | | | | --reflink=auto has become the default behaviour in coreutils 9, and it is not compatible with BSD userland. Signed-off-by: Violet Purcell <vimproved@inventati.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Include setuptools-rust version in outputMichał Górny2023-07-021-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add scikit-build-core backendMichał Górny2023-07-021-0/+13
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Bump minimum dep versionsMichał Górny2023-07-021-5/+5
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: drop dead prefix targetsSam James2023-06-031-2/+0
| | | | | Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add support for pdm-backendMichał Górny2023-06-031-0/+16
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove support for old meson-pythonMichał Górny2023-06-031-36/+15
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Remove support for old maturinMichał Górny2023-06-031-29/+15
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Do not force stdlib distutils on py3.12+Michał Górny2023-06-031-3/+5
| | | | | | | | Do not force SETUPTOOLS_USE_DISTUTILS=stdlib on Python 3.12+ (in non-PEP517 mode), as stdlib no longer supplies distutils there. Thanks to Sam for the report! Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Bump min dep versionsArthur Zamarin2023-05-291-9/+9
| | | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Include dev-python/cython version in logMichał Górny2023-05-291-0/+5
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Use CYTHON_FORCE_REGEN=1Michał Górny2023-05-291-0/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Use config_settings with maturinIonen Wolkens2023-05-231-7/+29
| | | | | | | | | | | | | Replaces the deprecated MATURIN_PEP517_ARGS and will also allow ebuilds to enable/disable cargo --features through DISTUTILS_ARGS like the rest should the need arise. Support was technically added in 0.15.3, but 1.0.0 allows passing an array rather than only a to-be-shlex.split string. Signed-off-by: Ionen Wolkens <ionen@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31143 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Use unittest-or-fail on Python < 3.12 onlyMichał Górny2023-05-231-1/+8
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Rename dev-python/{jupyter_packaging → jupyter-packaging}Michał Górny2023-05-201-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>