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.
This commit is contained in:
Miro Hrončok 2019-10-20 22:15:46 +02:00
parent 32e3694413
commit 914d8b9212
1 changed files with 6 additions and 6 deletions

View File

@ -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