| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: https://bugs.gentoo.org/835396
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Protect build-backend getter against stray output to stdout.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Do not call PEP517 mode "experimental" anymore, and instead describe
the potential problem with it.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/832782
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update _python_impl_matches() (used to implement python_gen*,
python_setup) to support specifying stdlib versions ("3.8", "3.9")
in addition to exact implementation names. This makes handling PyPy3
version changes much easier when dealing with backports.
For example, if you specify "3.8", then the spec will match python3_8
and pypy3, for as long as we supply PyPy3.8. Once we upgrade to PyPy3.9
completely, it will stop matching pypy3 and we won't have to manually
keep updating these deps.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Use heredocs instead of inlining longish scripts in "python -c",
for greater readability. Thanks to arthurzam for the suggestion.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Fix the has_version calls for distutils_enable_sphinx to use -b option
(--host-root in earlier EAPIs).
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Split the wheel build & install logic into a a new helper.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Use the wheel name returned by build_wheel() rather than trying to guess
it from WHEEL_DIR.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Restore the QA warning (proviously issued as part of install-qa-check.d)
for combining DISTUTILS_USE_SETUPTOOLS and DISTUTILS_OPTIONAL.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
The PEP 517 build-time deps have gotten more complex, and largely depend
on the internal eclass logic used to build and install wheels.
Introduce a DISTUTILS_DEPS output variable that contains the correct
BDEPEND string for use in DISTUTILS_OPTIONAL=1 ebuilds.
Bug: https://bugs.gentoo.org/832337
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix distutils-r1 phase functions to correctly pass through the return
value from the subphases. This fixes e.g. the mistake of virtx
not failing in the following case:
src_test() {
virtx distutils-r1_src_test
}
python_test() {
epytest
}
This is because virtx implicitly uses nonfatal and epytest uses
`die -n`. However, since the return value was not passed through, virtx
never knew that anything has failed.
While this covers only trivial cases and this is better solved via dying
explicitly in the redefined python_test(), there's no harm in adding
this passthrough.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Make esetup.py fail if neither setup.py nor setup.cfg is available.
To support PEP 517 builds, the function has been modified to work
without setup.py. However, this also caused esetup.py to implicitly
succeed in installing zero files on non-distutils/setuptools packages.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/832267
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Detect, report and fix the deprecated flit/poetry backends to use
flit_core and poetry_core respectively. In both cases, the end result
is the same. Using flit involves unnecessary dependencies, and poetry
is not even packaged right now (and has even worse dependency hell).
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Add an einfo message for calling installer. Indent both messages
relevant to PEP 517 logic.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Alter the shebangs of generated scripts to point out the to venv Python
executables in PEP 517 mode. Otherwise, the executables are run with
system Python during the test run and therefore do not use the venv.
For convenience, rather than modifying them back just copy them
immediately into the python-exec directory. This means that instead of
reverting some of our python_compile() changes in python_install()
and then moving scripts to the python-exec directory, we can just
discard /usr/bin and let the wrapping logic recreate it.
While at it, stop repeating ${root}${EPREFIX}/usr/bin multiple times
in python_compile(). Just shove it into a helper variable. Also move
pyvenv.cfg inside bindir for convenience — Python is fine with either
location.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
The .dist-info metadata installed by PEP517 packages contains a full
copy of the license. Strip that following the Gentoo policy.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Ensure to call `esetup.py clean -a` after performing the wheel install
in PEP517 mode. This is necessary since we no longer override build
paths and setuptools performs the PyPy and CPython builds in the same
directory. With its bad install/bdist logic, the CPython wheel ends up
including PyPy3 extensions as well.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a PEP517 mode to the distutils-r1.eclass in order to facilitate
building packages via PEP517 backends. In order to use it, set
DISTUTILS_USE_PEP517 to the appropriate build system name. The eclass
will take care of setting BDEPEND, then invoke the backend to build
a wheel and then install its contents in python_compile(). The install
phase is limited to merging the staging area into the image directory.
In PEP517 mode, the test phase is automatically provided with venv-style
install tree that should suffice the vast majority of test suites.
As a result, distutils_install_for_testing should no longer be necessary
and is not available in this mode.
The new mode can also be used to install pre-PEP517 distutils
and setuptools packages. To do so, just specify setuptools backend.
If pyproject.toml is missing, the eclass assumes legacy setuptools
backend that invokes setup.py. It also enables setuptools-vendored
distutils, effectively carrying the migration from deprecated stdlib
version.
The PEP517 support effectively deprecates the legacy eclass mode.
This follows upstream deprecation of distutils and install commands
in setuptools.
Closes: https://github.com/gentoo/gentoo/pull/23750
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Thanks to arthurzam for noticing.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify `distutils_install_for_testing --via-venv` to create a minimal
venv manually rather than relying on Python to do so. Use root-style
install rather than the egg-style to improve consistency with regular
installs.
This is a step towards unifying different install layouts used within
the eclass. Right now we support three different variants for testing:
1. The build-dir layout that's created by python_compile() and exposed
unconditionally through PYTHONPATH.
2. The --via-root layout of dift that resembles install closer
(primarily through including package metadata) and also uses
PYTHONPATH.
3. The --via-venv layout of dift that creates a venv and installs
the packages there. It requires only PATH, not PYTHONPATH.
The last layout is the newest and probably the most compatible but it
requires additional install step. Since the PEP517 build logic is going
to require installing a wheel anyway, the plan is to inject a minimal
venv into the staging directory and use it unconditionally for tests.
The purpose of this patch is to prepare a single code snippet that will
be used both by dift and the new logic logic.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Bump the minimal pytest dep to what we have right now, since a growing
number of packages requires new pytest version (>= 6.2.4 is the highest
explicit dep we have) and there is really no point in repeating the dep.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/830104
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
- mark _distutils-r1_check_all_phase_mismatch as @INTERNAL
- fix list appearance for distutils_enable_tests options
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Replace the existing EPYTHON check with _python_check_EPYTHON and use
_python_check_EPYTHON in a few additional places.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/21610
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Check for the mistake of calling distutils-r1_python_*_all() from
non-all python_*() subphase.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Eliminate the path argument to _distutils-r1_wrap_scripts, and inline
the use of ${D} instead. This should make the code less confusing.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Defer wrapping installed Python scripts until the files are merged
from impl-specific directory into ${ED}. This should clear the way
into using 'dosym -r'.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|