summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* eclass/tests: Add pypi-bench.sh for global scope logicMichał Górny2023-06-151-0/+69
| | | | | | The benchmark yield roughly 327 ops / s on my machine. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eapi8-dosym.eclass: Fix another corner case of strange inputUlrich Müller2023-06-071-0/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eapi8-dosym.eclass: Don't add a spurious newline to the pathUlrich Müller2023-06-071-1/+3
| | | | | | | | | | Bash's <<< operator will append a newline to the string, therefore use echo -n instead. Add a couple of test cases that would have caught this. Fixes: d5638e49ee79c0f7e4672d5537e97a4ccc7f2eb2 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass/tests/python-utils-r1.sh: Fix patterns for pypy3.10Michał Górny2023-05-231-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Add python3_12 targetMichał Górny2023-05-231-1/+7
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: add Makefile to run eclass testsFlorian Schmaus2023-05-151-0/+27
| | | | | | | Thanks to robbat2 for providing feedback. Closes: https://github.com/gentoo/gentoo/pull/30603 Signed-off-by: Florian Schmaus <flow@gentoo.org>
* eclass/tests/python-utils-r1.sh: Stop testing python3_9Michał Górny2023-05-011-7/+1
| | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* eclass/tests: partially fix toolchain.eclass testsSam James2023-04-211-20/+21
| | | | | | | | | | - Use the same hack as in crossdev for now wrt EAPI. - Fix up the version tests. We still need to investigate the issues with -march downgrading though. Bug: https://bugs.gentoo.org/859157 Signed-off-by: Sam James <sam@gentoo.org>
* pypi.eclass: Introduce PYPI_PN to override the default project nameMichał Górny2023-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a convenience PYPI_PN variable that can be used to override the default project name. This is meant to be used primarily when upstream project name does not conform to Gentoo package naming rules, e.g. contains dots or uppercase letters. For example, instead of: SRC_URI="$(pypi_sdist_url --no-normalize "${PN/-/.}")" S=${WORKDIR}/${P/-/.} one can now specify: PYPI_NO_NORMALIZE=1 PYPI_PN=${PN/-/.} For PEP 625-conformant packages, instead of: SRC_URI="$(pypi_sdist_url "${PN/-/.}")" one can use: PYPI_PN=${PN/-/.} There's not much gain space-wise but it avoids having to specify the name twice. This can particularly be helpful for package names using PascalCase. Closes: https://github.com/gentoo/gentoo/pull/30210 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass: standardize prologue/epilogueDavid Seifert2023-03-172-2/+2
| | | | | Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
* pypi.eclass: Normalize PN and translate PV for S as wellMichał Górny2023-02-121-0/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* pypi.eclass: Translate ${PV} by defaultMichał Górny2023-02-121-12/+12
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* pypi.eclass: Add a version translation functionMichał Górny2023-02-121-0/+7
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* pypi.eclass: Normalize sdist filenames by defaultMichał Górny2023-02-121-3/+24
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* pypi.eclass: Normalize wheel filenamesMichał Górny2023-02-121-0/+33
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* pypi.eclass: Add a name normalization functionMichał Górny2023-02-121-0/+32
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: remove py3.8David Seifert2023-01-141-7/+10
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* llvm.eclass: Remove EAPI 6Michał Górny2022-12-241-7/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/python-utils-r1.sh: Remove old implsMichał Górny2022-12-141-17/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* scons-utils.eclass: Reuse makeopts_jobsMichał Górny2022-11-151-64/+0
| | | | | Closes: https://github.com/gentoo/gentoo/pull/27999 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/scons-utils.sh: Fake python-r1 to fix failureMichał Górny2022-10-281-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* dist-kernel-utils.eclass: Add a PV → KV conversion functionMichał Górny2022-10-191-0/+28
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: add systemd testsMike Gilbert2022-10-151-0/+50
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* eclass/tests/toolchain-funcs.sh: Handle missing ld.gold gracefullyMichał Górny2022-10-101-30/+34
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain-funcs.eclass: Add tc-get-c-rtlib() to get CC runtimeMichał Górny2022-10-101-0/+10
| | | | | | | | Add a new tc-get-c-rtlib() that attempts to get the runtime used by the current C compiler. Currently it supports compiler-rt and libgcc. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* toolchain-funcs.eclass: Add tc-get-cxx-stdlib() to get C++ stdlibMichał Górny2022-10-101-0/+22
| | | | | | | | Add a new tc-get-cxx-stdlib() that attempts to get the C++ stdlib variant used by the current C++ compiler. Currently it supports libc++ and libstdc++ (GCC's stdlib). Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/unpacker.sh: Add online tests for makeselfMichał Górny2022-10-011-0/+105
| | | | | Closes: https://github.com/gentoo/gentoo/pull/27507 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/unpacker.sh: Add tests for makeselfMichał Górny2022-10-011-0/+29
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* unpacker.eclass: Workaround zstd refusing to process symlinksMichał Górny2022-09-281-1/+6
| | | | | Closes: https://bugs.gentoo.org/873352 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* unpacker.eclass: Fix handling GNU ar archives in handwoven implMichał Górny2022-09-271-0/+4
| | | | | | | | Fix the hand-weaved implementation of ar unpacking that is used on Prefix to handle slash-terminated filenames of GNU ar format correctly. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* unpacker.eclass: Add on-the-fly .gpkg.tar unpacking supportMichał Górny2022-09-271-0/+47
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* unpacker.eclass: Add support for .lz4 and .lzo compressionMichał Górny2022-09-271-0/+7
| | | | | | | Add support for .lz4 and .lzo formats that can be used for .tar.gpkg compression. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Add tests for unpacker.eclassMichał Górny2022-09-272-0/+240
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/python-utils-r1.eclass: Add tests for adding new implsMichał Górny2022-05-091-0/+35
| | | | | | | Add tests that verify that new Python implementations are added to all the places that need them. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/python-utils-r1.sh: Streamline the testsMichał Górny2022-05-091-84/+28
| | | | | | | | Streamline the python-utils-r1.eclass tests to use a for loop instead of copying the same tests over and over again. While at it, group tests by purpose. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Add support for python3.11Michał Górny2022-05-091-0/+14
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* multiprocessing.eclass: Default makeopts_jobs to inf=nproc+1Michał Górny2022-05-011-5/+10
| | | | | | | | | | | | | | | | | | | | | | Change the default value for 'inf' argument to makeopts_jobs from 999 to $(get_nproc) + 1. This means that if MAKEOPTS specifies a `-j` argument without a specific value, nproc will be used rather than infinity-ish number of jobs. The old default made sense for ebuilds using both makeopts_jobs and makeopts_loadavg. However, these are very rare — only 4 packages and 3 eclass at this time. For the remaining ebuilds, they meant uncontrollably using up to 999 jobs. The new default is both safer and more correct for the vast majority of Gentoo packages, removing the necessity of repeating: $(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") The ebuilds and eclasses using makeopts_loadavg have been updated to pass the old default. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/python-utils-r1.sh: Add tests for stdlib ver matchingMichał Górny2022-04-211-0/+9
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/qmail.sh: eend and return should be separate statementsMike Gilbert2022-04-191-1/+2
| | | | | Closes: https://bugs.gentoo.org/839189 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* python-utils-r1.eclass: Make python_fix_shebang force full pathMichał Górny2022-04-021-31/+55
| | | | | | | | | | | | | | | | | | | | | | Change the behavior of python_fix_shebang to always output full path to the Python interpreter (i.e. ${PYTHON}) instead of mangling the original path. Most importantly, this ensures that: 1. EPREFIX is included in the final path 2. /usr/bin/env is replaced by the absolute path to avoid issues when calling system executables from inside a venv Note that this implies that a few unlikely corner cases may stop working, notably: a. "weird" shebangs such as "/usr/bin/foo python" will no longer work b. the mangled scripts will escape temporary venv e.g. created in distutils-r1 PEP517 mode (python_fix_shebang is not used in such a way in ::gentoo) Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: source tests-common.sh || exitMike Gilbert2022-02-1427-27/+27
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* eclass/tests/savedconfig.sh: abort when source tests-common.sh failsMike Gilbert2022-02-141-1/+1
| | | | | Closes: https://bugs.gentoo.org/833342 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* python-utils-r1.eclass: Remove python_is_python3Michał Górny2022-02-091-5/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*-r1.eclass: Remove explicit dep on python-execMichał Górny2022-01-092-2/+2
| | | | | | | | The dev-lang/python-exec dependency is now enforced through dev-lang/python, remove the explicit dep to reduce the metadata size and make dependency resolution lighter. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Bump minimal Python versionsMichał Górny2022-01-092-2/+2
| | | | | | | Bump minimal Python package versions to ensure that the python-exec deps are inside. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/python-utils-r1.sh: Remove obsoletep py2 usageMichał Górny2021-12-311-35/+11
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests/python-utils-r1.sh: Update expected pypy3 includedirMichał Górny2021-12-311-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/tests: Update expected deps in distutils-r1 testsMichał Górny2021-12-312-4/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* qmail.eclass: simplify is_prime()Rolf Eike Beer2021-08-171-0/+52
| | | | | | | | The previous algorithm would scan for all primes for a given number, which takes needlessly long. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de> Signed-off-by: Sam James <sam@gentoo.org>
* python-utils-r1.eclass: Deprecated and EAPI8-ban python_is_python3Michał Górny2021-06-231-0/+4
| | | | | | | There is no use for python_is_python3 anymore, as Python 2 is no longer supported at runtime and the remaining any-r1 uses are pure-2. Signed-off-by: Michał Górny <mgorny@gentoo.org>