summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* distutils-r1: fix test runner for setup.pyAlexey Sokolov2020-05-011-1/+2
| | | | | | | It didn't fail under nonfatal (e.g. by virtx) if the test failed. Closes: https://github.com/gentoo/gentoo/pull/15590 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Pass --skip-build when installingMichał Górny2020-04-141-1/+1
| | | | | | | | | | | | | | | Explicitly pass --skip-build in order to prevent distutils from rebuilding files when installing. This is especially relevant to some packages that build extensions, and the extensions get built again in src_install(). Technically, this can break some customized build systems that write implementation-specific data into source directory, and right now the implied rebuild caused it to be rewritten when installing. With this patch, the newest version of the file would be installed for all interpreters. I am not aware of any such packages, though. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Replace python_export with getterMichał Górny2020-03-221-5/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Align min. setuptools version to current stableMichał Górny2020-03-161-2/+2
| | | | | Closes: https://bugs.gentoo.org/712502 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Fix sphinx check for plugins useMichał Górny2020-03-061-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Make /usr/lib/pypy/share warning fatalMichał Górny2020-03-051-3/+1
| | | | | | | | All the share-related issues should have been fixed by the PyPy patch by now, and since PyPy target is not stable, there is really no need to be very graceful here. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Do not require distutils-r1_python_install_allMichał Górny2020-03-051-11/+0
| | | | | | | | Stop requiring ebuilds to call distutils-r1_python_install_all default function. It just calls einstalldocs these days, and it is unlikely that more magic will ever be added there. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*-r1.eclass, distutils-r1.eclass: Link to Python GuideMichał Górny2020-03-051-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add pyproject.toml supportMichał Górny2020-02-201-0/+29
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Switch test deps to PYTHON_MULTI_USEDEPMichał Górny2020-02-091-6/+16
| | | | | Closes: https://bugs.gentoo.org/704522 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Switch setuptools dep to PYTHON_MULTI_USEDEPMichał Górny2020-02-091-4/+12
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Look for entry_points in setup.cfgMichał Górny2020-01-171-0/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Fix detection of setuptools entry_pointsSebastian Pipping2020-01-131-1/+1
| | | | | | Closes: https://bugs.gentoo.org/705362 Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sebastian Pipping <sping@gentoo.org>
* distutils-r1.eclass: Permit DISTUTILS_USE_SETUPTOOLS=manualMichał Górny2019-12-241-2/+5
| | | | | | | | | Add a new DISTUTILS_USE_SETUPTOOLS option to permit manually setting the dependencies correctly and suppressing the check. Requested by Arfrever. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Depend on setuptools by defaultMichał Górny2019-12-071-6/+76
| | | | | | | | | | | | Add a new DISTUTILS_USE_SETUPTOOLS top variable, and make it default to BDEPEND-ing on dev-python/setuptools (which should be correct for the majority of packages). Packages that either need RDEPEND or no dependency at all can override it. Also add a check for correct value in esetup.py. This should make it easy for developers to adjust the new variable in their packages. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Handle missing BUILD_DIR for any-r1 APIMichał Górny2019-12-011-1/+5
| | | | | | | | | | | When any-r1 API is used for *_all sub-phases, an implementation that was not selected by the user may be used. In this case, DISTUTILS_IN_SOURCE_BUILD will not create the BUILD_DIR for this implementation; however, the phase runner will still try to enter it and fail. Handle this gracefully by falling back to ${S}. Closes: https://bugs.gentoo.org/701506 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add distutils_enable_sphinx helper functionMichał Górny2019-11-251-0/+96
| | | | | | | Add a helper function to easily take care of the most common dev-python/sphinx usage for HTML doc building. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: distutils_enable_tests, add 'setup.py' optionMichał Górny2019-11-201-0/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: distutils_enable_tests, handle no deps betterMichał Górny2019-11-161-11/+12
| | | | | | | Do not set IUSE or other variables if the test runner does not have any deps, and RDEPEND is empty. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add distutils_enable_tests to ease testingMichał Górny2019-11-101-0/+60
| | | | | | | Add a helpful function to handle adding common stuff for the most common test runners. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Add new pypy path to addpredictMichał Górny2019-10-201-0/+2
| | | | | Closes: https://bugs.gentoo.org/698024 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Block installing '.pytest_cache'Michał Górny2019-07-181-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: Fix pypy prefix check for new pathsMichał Górny2019-02-161-1/+10
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* distutils-r1.eclass: addpredict /usr/lib/${EPYTHON}Mike Gilbert2018-11-261-0/+1
| | | | | | | | This works around sandbox failures with python3.7, which moved from /usr/$(get_libdir) to /usr/lib. Bug: https://bugs.gentoo.org/671948 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* distutils-r1.eclass: add @SUPPORTED_EAPISMichał Górny2018-08-151-0/+1
|
* distutils-r1.eclass: Enable parallel builds in py3.5+Michał Górny2018-07-201-3/+19
| | | | | | | | | | | Python 3.5+ introduces parallel build support in distutils. Take advantage of that by passing appropriate -j option. Since distutils does not support an equivalent of --load-average, default to the number of CPUs+1 when unspecified. In order to avoid breaking stable systems, introduce the new behavior only for EAPI 7 ebuilds, or older EAPI ebuilds with unstable implementations (Python 3.7 and PyPy 3).
* distutils-r1.eclass: Enable EAPI 7 supportMichał Górny2018-05-071-5/+9
| | | | | Support EAPI 7. Move PYTHON_DEPS from DEPEND to BDEPEND. Fix trailing slash uses for D/ED.
* distutils-r1.eclass: Call python via ${EPYTHON}, not full pathMichał Górny2018-05-071-2/+2
|
* distutils-r1.eclass: Remove xdg_environment_reset in EAPI 7Michał Górny2018-05-071-3/+4
| | | | | Limit xdg_environment_reset call to EAPIs 5 & 6. It should no longer be necessary with ENV_UNSET done in EAPI 7.
* eclass: misc spelling fixesMike Frysinger2018-03-281-2/+2
|
* distutils-r1.eclass: Reuse python_setup for common phasesMichał Górny2017-05-291-13/+13
| | | | | | | | | | | | Rewrite the python_*_all() phase running code to reuse python_setup instead of hacking on top of python_foreach_impl. The resulting code is a bit simpler but most importantly, it avoids duplication of code from python-r1 and ensures that distutils-r1 common phases are directly altered by changes in python_setup. The code still needs to reimplement some of the internals. However, it is mostly limited to code specific to distutils-r1, and should be more maintainable.
* distutils-r1.eclass: Remove QA-warning for DISTUTILS_NO_PARALLEL_BUILDMichał Górny2017-05-291-9/+0
| | | | | The variable was deprecated and the warning put in place in Dec 2014. It is no longer used in any ebuild in ::gentoo.
* distutils-r1.eclass: Use _python_impl_matches()Michał Górny2017-05-291-7/+10
| | | | Update the missed occurence of pattern matching with the new framework.
* distutils-r1.eclass: Namespace & doc _clean_egg_infoMichał Górny2017-05-161-5/+9
| | | | | | | Prefix the _clean_egg_info function with an appropriate namespace, and document its purpose with eclassdoc format. Be more verbose on the exact problem being solved; remove URL to old upstream bug tracker that no longer exists.
* distutils-r1.eclass: Warn if *-nspkg.pth files are installedMichał Górny2017-05-161-0/+29
| | | | | | | | | | | | | Add a check for *-nspkg.pth files indicating implicit setuptools namespace hack. While they kept namespaces somewhat working without requiring explicit support in ebuilds, they were unreliable. They frequently required additional hacks (distutils_install_for_testing) to get the tests working, and they have proven even more broken for Python 3.5+. For this reason, those files were deprecated in favor of proper, explicit namespace support. If they are found to exist, the developer should ensure to remove them to avoid issues.
* Drop $Id$ per council decision in bug #611234.Robin H. Johnson2017-02-281-1/+0
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* distutils-r1.eclass: Reject EAPI=4 explicitlyMichał Górny2017-02-171-2/+2
|
* eclass/distutils-r1.eclass: Remove setting egg-base due to absolute path errorsBrian Dolbec2017-01-121-5/+0
| | | | | In setuptools and new python releases, this causes the SOURCES.txt to include all egg-info files with absolute paths. Without this setting these files are not included in that file and everything works and installs correctly.
* distutils-r1.eclass: make *_install_for_testing install proper egg-infoMathy Vanvoorden2016-11-141-0/+2
| | | | | | | | | | | | | Currently distutils_install_for_testing does not install the complete egg-info into ${TEST_DIR}. This was first noticed by W. Trevor King and reported in bug #524322. Based on info found in the related upstream setuptools bug I added the necessary call to setuptools to create the complete egg_info. Without this certain packages (like cryptography) fail during testing because they use introspection but the metadata isn't available. Bug: https://bugs.gentoo.org/524322
* distutils-r1.eclass: reset XDG env varsMike Gilbert2016-07-031-1/+2
| | | | Bug: https://bugs.gentoo.org/577704
* distutils-r1.eclass: Do not modify the HOME variableMike Gilbert2016-06-051-6/+0
| | | | | This was only necessary when we ran phases in parallel. Also, PMS says this variable should not be modified.
* distutils-r1.eclass: Move creation of .pydistutils.cfg to esetup.pyMike Gilbert2016-06-051-5/+10
| | | | | | | | | | | | | Also remove .pydistutils.cfg from HOME before returning. This config should only be needed when we are invoking setup.py. The esetup.py wrapper provides a normalized way for doing this; if ebuilds call setup.py without the wrapper, they are now also responsible for setting the build directory if necessary. This change allows us to stop overriding the HOME variable, and prevents leakage of eclass-specifc configuration to the general ebuild environment.
* distutils-r1.eclass: Strip the trailing slash from DMike Gilbert2016-06-051-2/+2
| | | | This just looks nicer in build logs.
* Revert "distutils-r1.eclass: Do not modify the HOME variable"Mike Gilbert2016-05-281-0/+6
| | | | | | This reverts commit 3bcfb71425f15e237d6002ff3626e2e169df3f05. This change can break ebuilds that call esetup.py in src_test.
* distutils-r1.eclass: Do not modify the HOME variableMike Gilbert2016-05-211-6/+0
| | | | | This was only necessary when we ran phases in parallel. Also, PMS says this variable should not be modified.
* distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is usedMichał Górny2016-05-211-5/+7
| | | | | | | | | | | | Do not apply PATCHES and user patches (either via the EAPI 6 default or pre-EAPI 5 code) when DISTUTILS_OPTIONAL is being used. In this case, distutils functions are usually called conditionally, in a subdirectory, while both PATCHES and user patches are usually intended to be applied top-level. There is no ebuild relying on distutils-r1_src_prepare applying patches with DISTUTILS_OPTIONAL. In fact, there are ebuilds which work around this behavior.
* distutils-r1.eclass: Do not rely on INSDESTTREE, #173630Michał Górny2016-05-141-4/+6
|
* distutils-r1.eclass: _copy_egg_info(), 'cp -R' for BSD compat, #568692Michał Górny2015-12-191-1/+1
| | | | | | | Use 'cp -R' for distutils-r1_copy_egg_info() as the '-r' option triggers triggers undesired '-L' behavior wrt symbolic links. Fixes: https://bugs.gentoo.org/show_bug.cgi?id=568692
* distutils-r1.eclass: Unset local functions after useMichał Górny2015-12-091-0/+1
|
* distutils-r1.eclass: Enable EAPI 6Michał Górny2015-11-281-1/+1
|