#259 WIP: Move various intermediate files (such as %{pyproject_files}) into %buildsubdir
Closed 2 years ago by churchyard. Opened 2 years ago by churchyard.
rpms/ churchyard/pyproject-rpm-macros subdir  into  rawhide

file modified
+4 -4
@@ -10,10 +10,10 @@ 

  #     https://docs.pytest.org/en/latest/reference.html#confval-norecursedirs

  %_pyproject_builddir %{_builddir}%{?buildsubdir:/%{buildsubdir}}/.pyproject-builddir

  

- %pyproject_files %{_builddir}/pyproject-files

- %_pyproject_modules %{_builddir}/pyproject-modules

- %_pyproject_ghost_distinfo %{_builddir}/pyproject-ghost-distinfo

- %_pyproject_record %{_builddir}/pyproject-record

+ %pyproject_files %{_builddir}%{?buildsubdir:/%{buildsubdir}}/pyproject-files

+ %_pyproject_modules %{_builddir}%{?buildsubdir:/%{buildsubdir}}/pyproject-modules

+ %_pyproject_ghost_distinfo %{_builddir}%{?buildsubdir:/%{buildsubdir}}/pyproject-ghost-distinfo

+ %_pyproject_record %{_builddir}%{?buildsubdir:/%{buildsubdir}}/pyproject-record

  

  # Avoid leaking %%{_pyproject_builddir} to pytest collection

  # https://bugzilla.redhat.com/show_bug.cgi?id=1935212

file modified
+4 -1
@@ -10,7 +10,7 @@ 

  #   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.0.0

+ Version:        1.0.1

  Release:        1%{?dist}

  

  # Macro files
@@ -121,6 +121,9 @@ 

  %license LICENSE

  

  %changelog

+ * Tue Mar 22 2022 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-1

+ - Move various intermediate files (such as %%{pyproject_files}) into %%buildsubdir

+ 

  * Tue Mar 01 2022 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-1

  - Release final version 1.0.0

  

Apparently, when you repeatedly run rpmbuild -ba, pyproject-record is not cleaned.
This way, we at least make sure the files are located within the appropriate build directory,
so 2 different builds don't share the files between each other.

Keeping files contained in the build subdirectory is the common way of doing things anyway.

Should be backwards compatible, as we only modify underscore-prefixed macros.

I plan to see if the CI passes and then rebuild everything to verify my assumption about backward compatibility.

%pyproject_files is not underscore prefixed, but the value should not matter.

rebased onto ba6be0ce2fb92b2ac0a07c066532c2b6ae8085c4

2 years ago

rebased onto 0c939b7

2 years ago

OK, this breaks %pyproject_extras_subpkg. It needs to be done more cleverly :D

Also, it breaks when %files ... -f %{pyproject_files} is used before %prep.

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

Pull-Request has been closed by churchyard

2 years ago