%pyproject_build_lib: support setuptools 62.1.0 and later
This commit is contained in:
parent
fcd4ecbffe
commit
1996e90259
22
README.md
22
README.md
@ -343,7 +343,7 @@ in the `%build` section, e.g. to build the documentation with Sphinx.
|
||||
With pure Python packages, it might be possible to set `PYTHONPATH=${PWD}` or `PYTHONPATH=${PWD}/src`.
|
||||
However, it is a bit more complicated with extension modules.
|
||||
|
||||
The location of just-built modules might differ depending on Python version, architecture, pip version.
|
||||
The location of just-built modules might differ depending on Python version, architecture, pip version, etc.
|
||||
Hence, the macro `%{pyproject_build_lib}` exists to be used like this:
|
||||
|
||||
%build
|
||||
@ -359,7 +359,25 @@ Depending on the pip version, the expanded value will differ:
|
||||
|
||||
[python-devel list]: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/
|
||||
|
||||
### New pip 21.3+ with in-tree-build (Fedora 36+)
|
||||
### New pip 21.3+ with in-tree-build and setuptools 62.1+ (Fedora 37+)
|
||||
|
||||
Always use the macro from the same directory where you called `%pyproject_wheel` from.
|
||||
The value will expand to something like:
|
||||
|
||||
* `/builddir/build/BUILD/%{name}-%{version}/build/lib.linux-x86_64-cpython-311` for wheels with extension modules
|
||||
* `/builddir/build/BUILD/%{name}-%{version}/build/lib` for pure Python wheels
|
||||
|
||||
If multiple wheels were built from the same directory,
|
||||
some pure Python and some with extension modules,
|
||||
the expanded value will be combined with `:`:
|
||||
|
||||
* `/builddir/build/BUILD/%{name}-%{version}/build/lib.linux-x86_64-cypthon-311:/builddir/build/BUILD/%{name}-%{version}/build/lib`
|
||||
|
||||
If multiple wheels were built from different directories,
|
||||
the value will differ depending on the current directory.
|
||||
|
||||
|
||||
### New pip 21.3+ with in-tree-build and older setuptools (Fedora 36)
|
||||
|
||||
Always use the macro from the same directory where you called `%pyproject_wheel` from.
|
||||
The value will expand to something like:
|
||||
|
@ -36,6 +36,9 @@ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" TMPDI
|
||||
%pyproject_build_lib %{expand:\\\
|
||||
$(
|
||||
pyproject_build_lib=()
|
||||
if [ -d build/lib.%{python3_platform}-cpython-%{python3_version_nodots} ]; then
|
||||
pyproject_build_lib+=( "${PWD}/build/lib.%{python3_platform}-cpython-%{python3_version_nodots}" )
|
||||
fi
|
||||
if [ -d build/lib.%{python3_platform}-%{python3_version} ]; then
|
||||
pyproject_build_lib+=( "${PWD}/build/lib.%{python3_platform}-%{python3_version}" )
|
||||
fi
|
||||
|
@ -10,7 +10,7 @@ License: MIT
|
||||
# Increment Y and reset Z when new macros or features are added
|
||||
# Increment Z when this is a bugfix or a cosmetic change
|
||||
# Dropping support for EOL Fedoras is *not* considered a breaking change
|
||||
Version: 1.3.1
|
||||
Version: 1.3.2
|
||||
Release: 1%{?dist}
|
||||
|
||||
# Macro files
|
||||
@ -124,6 +124,10 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856
|
||||
%license LICENSE
|
||||
|
||||
%changelog
|
||||
* Wed Jun 15 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.3.2-1
|
||||
- Update %%pyproject_build_lib to support setuptools 62.1.0 and later
|
||||
- Fixes: rhbz#2097158
|
||||
|
||||
* Fri May 27 2022 Owen Taylor <otaylor@redhat.com> - 1.3.1-1
|
||||
- %%pyproject_install: pass %%{_prefix} explicitly to pip install
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user