%pyproject_buildrequires: Support Package information on ELF objects
When extension modules are built in %pyproject_buildrequires, we need to create the package note file. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2097535 This is tested via python-ldap -- %pyproject_buildrequires -w fails without the fix. Neither python-markupsafe nor python-mistune can be used as a test because they only warn when the extension module cannot be built because they fallback to pure Python.
This commit is contained in:
parent
1996e90259
commit
5b7df3cdd7
@ -129,6 +129,9 @@ fi
|
|||||||
# The _auto_set_build_flags feature does not do this in %%generate_buildrequires section,
|
# The _auto_set_build_flags feature does not do this in %%generate_buildrequires section,
|
||||||
# but we want to get an environment consistent with %%build:
|
# but we want to get an environment consistent with %%build:
|
||||||
%{?_auto_set_build_flags:%set_build_flags}
|
%{?_auto_set_build_flags:%set_build_flags}
|
||||||
|
# The default flags expect the package note file to exist
|
||||||
|
# see https://bugzilla.redhat.com/show_bug.cgi?id=2097535
|
||||||
|
%{?_package_note_flags:%_generate_package_note_file}
|
||||||
%{-R:
|
%{-R:
|
||||||
%{-r:%{error:The -R and -r options are mutually exclusive}}
|
%{-r:%{error:The -R and -r options are mutually exclusive}}
|
||||||
%{-w:%{error:The -R and -w options are mutually exclusive}}
|
%{-w:%{error:The -R and -w options are mutually exclusive}}
|
||||||
|
@ -127,6 +127,9 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856
|
|||||||
* Wed Jun 15 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.3.2-1
|
* 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
|
- Update %%pyproject_build_lib to support setuptools 62.1.0 and later
|
||||||
- Fixes: rhbz#2097158
|
- Fixes: rhbz#2097158
|
||||||
|
- %%pyproject_buildrequires: When extension modules are built,
|
||||||
|
support https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects
|
||||||
|
- Fixes: rhbz#2097535
|
||||||
|
|
||||||
* Fri May 27 2022 Owen Taylor <otaylor@redhat.com> - 1.3.1-1
|
* Fri May 27 2022 Owen Taylor <otaylor@redhat.com> - 1.3.1-1
|
||||||
- %%pyproject_install: pass %%{_prefix} explicitly to pip install
|
- %%pyproject_install: pass %%{_prefix} explicitly to pip install
|
||||||
|
@ -28,6 +28,7 @@ Building this tests:
|
|||||||
- the proper files are installed in the proper places
|
- the proper files are installed in the proper places
|
||||||
- module glob in %%pyproject_save_files (some modules are included, some not)
|
- module glob in %%pyproject_save_files (some modules are included, some not)
|
||||||
- combined manual and generated Buildrequires
|
- combined manual and generated Buildrequires
|
||||||
|
- building an extension module via %%pyproject_buildrequires -w
|
||||||
|
|
||||||
|
|
||||||
%package -n python3-ldap
|
%package -n python3-ldap
|
||||||
@ -48,11 +49,13 @@ rm Tests/t_ldapobject.py Tests/t_cext.py Tests/t_edit.py Tests/t_ldap_sasl.py Te
|
|||||||
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires -t
|
# -w is not required with this package, but we test that we can use it anyway
|
||||||
|
%pyproject_buildrequires -t -w
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
#%%pyproject_wheel -- this is done via %%pyproject_buildrequires -w
|
||||||
|
|
||||||
# Internal check that we can import the built extension modules from %%{pyproject_build_lib}
|
# Internal check that we can import the built extension modules from %%{pyproject_build_lib}
|
||||||
%{python3} -c 'import _ldap' && exit 1 || true
|
%{python3} -c 'import _ldap' && exit 1 || true
|
||||||
PYTHONPATH=%{pyproject_build_lib} %{python3} -c 'import _ldap'
|
PYTHONPATH=%{pyproject_build_lib} %{python3} -c 'import _ldap'
|
||||||
|
Loading…
Reference in New Issue
Block a user