summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* python*-r1.eclass: Check for invalid impl patternsMichał Górny2020-08-071-0/+34
| | | | | | | | | | | | | Check for invalid implementation patterns passed to python_gen* functions, python_setup, etc. Currently the functions silently ignore pattern mismatches which is fine for patterns matching historical implementations but also hides errors in patterns. After this change, each pattern must match at least one current or historical implementation. If no match is found, the function dies indicating developer's mistake. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Fix eclassdoc tag orderMichał Górny2020-07-041-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Enable python3_9Michał Górny2020-05-251-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Restore old CPython version reqsMichał Górny2020-04-301-7/+5
| | | | | Closes: https://bugs.gentoo.org/720048 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Fix PYTHON_LIBS for py3.8+Michał Górny2020-04-191-2/+6
| | | | | | | | | | | Python 3.8+ provides two pkg-config files: python-3.8 for building Python extensions and python-3.8-embed for embedding Python in other programs. The former no longer lists -lpython*, resulting in empty PYTHON_LIBS. Since our consumers are more likely to want it non-empty if they already query it, switch to the latter file. Closes: https://bugs.gentoo.org/718344 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Bump python:3.7 depMichał Górny2020-04-141-1/+1
| | | | | | Hopefully it resolves package issues that were caused by 3.7.6. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Bump minimal Python versionsMichał Górny2020-03-271-10/+8
| | | | | | | | | Bump minimal Python versions to current stable to save ebuilds from having to hack around the dependencies. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/15135 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Mark python_export privateMichał Górny2020-03-221-124/+26
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Replace python_export with gettersMichał Górny2020-03-221-11/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Make python_wrapper_setup privateMichał Górny2020-03-221-1/+16
| | | | | | | | This function was never meant to be a part of the public API. Correct the mistake by renaming it to _python_wrapper_setup(), and adding a QA warning under the old name. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Create python3-embed.pc wrapperMichał Górny2020-03-161-1/+7
| | | | | Closes: https://bugs.gentoo.org/712526 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Do not create 'python.pc' wrapperMichał Górny2020-03-161-3/+2
| | | | | | | Do not create 'python.pc', only 'python[23].pc'. This seems to match what other distributions are doing. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove leftover from virtual/pypy*Michał Górny2020-03-051-17/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Update docs to use python_setupMichał Górny2020-03-051-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Mark _python_check_locale_sanity @INTERNALMichał Górny2020-03-051-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*-r1.eclass, distutils-r1.eclass: Link to Python GuideMichał Górny2020-03-051-3/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Eliminate virtual/pypyMichał Górny2019-12-301-2/+2
| | | | | | | Depend on dev-python/pypy directly, as that's the common package with the new layout. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove PYTHON_TARGETS="jython2_7"Michał Górny2019-12-301-3/+2
| | | | | | | | | Jython was supported as an experimental implementation but due to interoperability issues and very slow development, its (re-)deployment in ebuilds never took off. Now that Python 2.7 is going away, there's no point in keeping its future support. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove PYTHON_TARGETS="pypy"David Seifert2019-12-301-3/+3
| | | | | | | | | | * With the EOL of CPython 2, we also want to remove support for PyPy (i.e. PyPy for Python 2). This change does not affect PyPy3, i.e. Pypy for Python 3. Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove PYTHON_TARGETS="python3_5"David Seifert2019-12-301-3/+3
| | | | | | | | | | | * Python 3.5 will go EOL on 2020-09-13 and in order to reduce testing and maintenance burden, we want to keep the number of active Py3 impls below four. https://devguide.python.org/#status-of-python-branches Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Constrain to EAPI >= 5David Seifert2019-12-301-28/+9
| | | | | Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*r1.eclass: Reliably allow empty <pattern>s to gen funcsMichał Górny2019-12-071-2/+4
| | | | | | | | | Reliably allow empty pattern lists (equivalent to no restrictions) in all pattern-based generator functions, notably python_gen_cond_dep. Previously, only some of the functions accepted them while others failed via _python_impl_matches function. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Introduce a build_sphinx() helperMichał Górny2019-11-251-0/+25
| | | | | | | Introduce a helper to build HTML docs using Sphinx, providing for Intersphinx cleanup and HTML_DOCS appending. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Fix early return in _python_impl_matchesMichał Górny2019-11-241-3/+2
| | | | | | | | Fix _python_impl_matches() not to return early on unsuccessful -2/-3 match. This caused constructs such as '$(python_gen_cond_dep ... -2 python3_{5,6,7})' to ignore arguments following '-2'. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Enable python3.8Michał Górny2019-11-111-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Fix python_optimize to take all of sys.pathMichał Górny2019-11-011-1/+1
| | | | | | | | | Make sure to append NUL to every path in sys.path, rather than using it as a separator between output entries. This fixes a bug when the last path entry was silently discarded, and the function stopped working with PyPy as a result. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Disable python3_4Michał Górny2019-03-211-3/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Revert "Block also pythonX.Y in wrappers"Michał Górny2018-09-181-11/+1
| | | | | | | This turned out to be overzealous and broke calling external programs that were using different Python version. Reverts: 7f291f5759959bc338ca0b52b169871f0dccf9a9
* python-utils-r1.eclass: Block also pythonX.Y in wrappersMichał Górny2018-09-181-1/+11
| | | | | | | | | | | | Improve the wrapper blocking logic to block specific Python versions as well rather than just 2/3. In other words, for eselected pythonX.Y both pythonZ (Z = X^1) and python*.* (!= X.Y) will be blocked. Hopefully this will catch more build systems that hardcode Python versions rather than respecting what we're giving them. This will work only for build systems respecting PATH. Build systems (and ebuilds) using /usr/bin path directly will still be able to use other Python versions.
* python-utils-r1.eclass: add @SUPPORTED_EAPISMichał Górny2018-08-151-0/+1
|
* python-utils-r1.eclass: add python3_7 supportMike Gilbert2018-07-081-2/+2
|
* python-utils-r1.eclass: Sanitize insopts/exeoptsMichał Górny2018-06-131-0/+3
| | | | | | Sanitize insopts/exeopts when calling doins/doexe, in order to avoid prior insopts calls accidentally affecting do*/new* functions defined by the eclass.
* python-utils-r1.eclass: Initial EAPI 7 supportMichał Górny2018-05-071-16/+27
| | | | | | | | | Add initial EAPI 7 support. Handle trailing slash in D/ED correctly. Support new has_version switches. This does not provide proper cross support. In particular, the PYTHON variable (full path to the interpreter) is used both in contexts of BDEPEND and DEPEND, so we need to clean the uses first.
* python-utils-r1.eclass: _python_impl_matches, handle both forms of implMichał Górny2017-05-291-2/+4
| | | | | | | | | Make the pattern matching code in _python_impl_matches() more lax, allowing (accidental) mixing of PYTHON_COMPAT-style values with EPYTHON-style values. This is trivial to do, and solves the problem introduced by complexity-by-limitation of other eclasses -- where patterns for dependency strings are using PYTHON_COMPAT syntax, and patterns for python_setup are using EPYTHON syntax.
* python-utils-r1.eclass: add more info to stub python wrappersMike Frysinger2017-05-161-1/+1
| | | | | The short terse error messages here are not easy to track down. Add a few more details so people can figure out what's going wrong faster.
* python-utils-r1.eclass: support PYTHON_COMPAT_NO_STRICT variableZac Medico2017-05-161-0/+13
| | | | | | | | This is intended to be set by the user when using ebuilds that may have unknown implementations in PYTHON_COMPAT. The assumption is that the ebuilds are intended to be used within multiple contexts which can involve revisions of this eclass that support different Python implementations.
* python-utils-r1.eclass: Allow -2/-3 as impl-patterns for py2/py3Michał Górny2017-05-161-3/+11
| | | | | | | | | | | | Allow two special values in the implementation patterns for _python_impl_matches(): -2 to indicate all Python 2-compatible implementations, and -3 to indicate all Python 3-compatible implementations. Both of those values are implemented using the python_is_python3 function. This is mostly meant to make it easier and more fool-proof to write dependencies on backports to Python 2 which in most cases apply to PyPy2 as well.
* python-utils-r1.eclass: _python_impl_matches for impl-pattern matchingMichał Górny2017-05-161-0/+24
| | | | | | Introduce a _python_impl_matches() function that commonizes the pattern matching behavior used throughout python-r1 & python-single-r1. Having a single implementation makes future extensions much easier.
* python-utils-r1.eclass: python_moduleinto, allow package dot-notationMichał Górny2017-05-161-2/+4
| | | | | | | Allow specifying the relative package destination using the dot-notation used by Python itself (e.g. 'foo.bar') in addition to the directory form ('foo/bar'). Since dot can not be used in Python package names, this change is backwards-compatible.
* python-utils-r1.eclass: python_moduleinto, clarify relative path useMichał Górny2017-05-161-0/+6
| | | | | | | Clearly indicate that python_moduleinto can be safely called outside of the environment with Python interpreter established, and that a single call can set the correct relative path for multiple different implementations.
* python-utils-r1.eclass: Remove stray old doc bitMichał Górny2017-05-161-6/+0
| | | | | Remove the bit of old python_moduleinto documentation that has been accidentally left over.
* python-utils-r1.eclass: python_optimize, enable py3.5 logic for pypy3Michał Górny2017-04-301-1/+1
| | | | | Enable the three-level optimization logic for pypy3, to account for pypy3-5.7 being based on CPython 3.5 and using all three suffixes.
* python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIGMichał Górny2017-04-251-4/+2
| | | | | | | | | | | | | | | Use plain 'pythonX.Y-config' executable name in the python-config wrapper instead of querying the complete PYTHON_CONFIG path from python_export. Constructing full PYTHON_CONFIG path requires querying ABIFLAGS which requires the Python interpreter to be installed, which in turn unnecessarily forces every ebuild using the eclass to carry a build-time dependency on the Python interpreter. All current versions of Python correctly install 'pythonX.Y-config' symlink that points to the correct ABI-suffixed binary. It is therefore unnecessary to use the full path.
* Drop trailing whitespacesJustin Lecher2017-03-191-2/+2
| | | | Signed-off-by: Justin Lecher <jlec@gentoo.org>
* python-utils-r1.eclass: _python_set_impls, add integrity checkMichał Górny2017-03-081-3/+19
| | | | | | | Add integrity check for multi-inherits, i.e. ensure that PYTHON_COMPAT has not changed between successive calls to _python_set_impls. If it did (e.g. because of eclass+ebuild setting different values), then we abort not to give surprising results to the user.
* python-utils-r1.eclass: _python_set_impls, use local varsMichał Górny2017-03-081-5/+6
| | | | | | Refactor _python_set_impls to use local variables throughout the function and assign global values at the end. This prepares it for double-inherit integrity checks. NFC.
* python-utils-r1.eclass: python_wrapper_setup, fix exporting envMichał Górny2017-03-081-10/+10
| | | | | | | | Fix python_wrapper_setup function to move setting environment variables for PATH and PKG_CONFIG_PATH outside the 'if'. Otherwise, they are only set on the initial invocation of python_wrapper_setup for the particular impl and do not apply to subsequent invocations (e.g. further distutils-r1 phases).
* Drop $Id$ per council decision in bug #611234.Robin H. Johnson2017-02-281-1/+0
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* python-utils-r1.eclass: Require pypy{,3} >= 5, #609292Michał Górny2017-02-171-2/+2
| | | | | Bump the dependency on PyPy to require relatively recent versions, to ease package maintenance.
* python-utils-r1.eclass: Enable python3_6 targetMichał Górny2017-01-251-3/+3
|