From 914d8b9212b2b05b159b9b52710280b73ed80a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 20 Oct 2019 22:15:46 +0200 Subject: [PATCH] Drop the %{py3dir} pattern %{py3dir} is outside of the expected build directory, causing this error when only building for Python 3: Empty %files file /builddir/build/BUILD/pyparted-3.11.2/debugsourcefiles.list That's because the mechanism that looks for sources checks all the compiled files in the build directory and because they are all outside, it fails. This hasn't happened with the python2 subpackage, because it found the compiled python2 files. Note that %{py3dir} was part of the Python guidelines early in the Python 3 adoption in Fedora, long before we've introduced the debugsource packages. Instead, we create a directory called "py3dir" in the build directory. There are other solutions possible, but this is the least intrusive in this case. --- pyparted.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyparted.spec b/pyparted.spec index 6a2d2c0..eeb7895 100644 --- a/pyparted.spec +++ b/pyparted.spec @@ -86,9 +86,9 @@ partition tables. This package provides Python 3 bindings for parted. %setup -q %if %{with python3} -rm -rf %{py3dir} -mkdir -p %{py3dir} -cp -a . %{py3dir} +everything=$(ls) +mkdir -p py3dir +cp -a $everything py3dir %endif %build @@ -97,7 +97,7 @@ PYTHON=python2 make %{?_smp_mflags} %endif %if %{with python3} -pushd %{py3dir} +pushd py3dir PYTHON=python3 make %{?_smp_mflags} popd %endif @@ -108,7 +108,7 @@ PYTHON=python2 make test %endif %if %{with python3} -pushd %{py3dir} +pushd py3dir PYTHON=python3 make test popd %endif @@ -119,7 +119,7 @@ PYTHON=python2 make install DESTDIR=%{buildroot} %endif %if %{with python3} -pushd %{py3dir} +pushd py3dir PYTHON=python3 make install DESTDIR=%{buildroot} popd %endif