#292 %pyproject_buildrequires: Support Package information on ELF objects
Merged 2 years ago by churchyard. Opened 2 years ago by churchyard.
rpms/ churchyard/pyproject-rpm-macros notes  into  rawhide

file modified
+3
@@ -129,6 +129,9 @@ 

  # The _auto_set_build_flags feature does not do this in %%generate_buildrequires section,

  # but we want to get an environment consistent with %%build:

  %{?_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:%{error:The -R and -r options are mutually exclusive}}

  %{-w:%{error:The -R and -w options are mutually exclusive}}

@@ -127,6 +127,9 @@ 

  * 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

+ - %%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

  - %%pyproject_install: pass %%{_prefix} explicitly to pip install

file modified
+5 -2
@@ -28,6 +28,7 @@ 

  - the proper files are installed in the proper places

  - module glob in %%pyproject_save_files (some modules are included, some not)

  - combined manual and generated Buildrequires

+ - building an extension module via %%pyproject_buildrequires -w

  

  

  %package -n     python3-ldap
@@ -48,11 +49,13 @@ 

  

  

  %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

- %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}

  %{python3} -c 'import _ldap' && exit 1 || true

  PYTHONPATH=%{pyproject_build_lib} %{python3} -c 'import _ldap'

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.

Note that this PR conflicts version-wise with https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/291 -- I expect to rebrand the one that is merged later as 1.3.3 or ship both fixes in one version if merged together.

Build succeeded.

Everything looks good to me and makes sense. It's also tested so I'd merge it. Or do you want me to verify it once more? But I'd only replicate what you already have here in tests.

Ok, let me rebase on top of support setuptools 62.1.0 and later and open everywhere.

rebased onto 1996e90

2 years ago

Build succeeded.

Thank you very much for the fix, @churchyard.

rebased onto 5b7df3c

2 years ago

Pull-Request has been merged by churchyard

2 years ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci