Fix Python 3 builds / RHEL macros (RHBZ#1404631).
This commit is contained in:
parent
0b892779f5
commit
05a3e073d0
22
nbdkit.spec
22
nbdkit.spec
@ -4,9 +4,14 @@
|
|||||||
%global have_libguestfs 1
|
%global have_libguestfs 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Currently everything has Python 2. RHEL 7 doesn't have Python 3.
|
||||||
|
%if 0%{?rhel} != 7
|
||||||
|
%global have_python3 1
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: nbdkit
|
Name: nbdkit
|
||||||
Version: 1.1.18
|
Version: 1.1.18
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: NBD server
|
Summary: NBD server
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -40,7 +45,7 @@ BuildRequires: libcurl-devel
|
|||||||
BuildRequires: perl-devel
|
BuildRequires: perl-devel
|
||||||
BuildRequires: perl(ExtUtils::Embed)
|
BuildRequires: perl(ExtUtils::Embed)
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?have_python3}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%endif
|
%endif
|
||||||
%ifarch %{ocaml_native_compiler}
|
%ifarch %{ocaml_native_compiler}
|
||||||
@ -230,7 +235,7 @@ Obsoletes: %{name}-plugin-python <= %{version}-%{release}
|
|||||||
This package lets you write Python 2 plugins for %{name}.
|
This package lets you write Python 2 plugins for %{name}.
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?have_python3}
|
||||||
%package plugin-python3
|
%package plugin-python3
|
||||||
Summary: Python 3 plugin for %{name}
|
Summary: Python 3 plugin for %{name}
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -309,7 +314,7 @@ mv "$copy" python3
|
|||||||
%configure --disable-static --with-tls-priority=@NBDKIT,SYSTEM
|
%configure --disable-static --with-tls-priority=@NBDKIT,SYSTEM
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?have_python3}
|
||||||
pushd python3
|
pushd python3
|
||||||
export PYTHON=%{_bindir}/python3
|
export PYTHON=%{_bindir}/python3
|
||||||
%configure --disable-static --disable-perl --disable-ocaml --disable-ruby
|
%configure --disable-static --disable-perl --disable-ocaml --disable-ruby
|
||||||
@ -326,7 +331,7 @@ popd
|
|||||||
# Install for Python 2 and Python 3 separately.
|
# Install for Python 2 and Python 3 separately.
|
||||||
# We do the Python 3 install first since that build is
|
# We do the Python 3 install first since that build is
|
||||||
# incomplete.
|
# incomplete.
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?have_python3}
|
||||||
pushd python3
|
pushd python3
|
||||||
%make_install
|
%make_install
|
||||||
popd
|
popd
|
||||||
@ -370,7 +375,7 @@ make check || {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?have_python3}
|
||||||
pushd python3
|
pushd python3
|
||||||
make check || {
|
make check || {
|
||||||
cat tests/test-suite.log
|
cat tests/test-suite.log
|
||||||
@ -469,7 +474,7 @@ popd
|
|||||||
%{_libdir}/%{name}/plugins/nbdkit-python2-plugin.so
|
%{_libdir}/%{name}/plugins/nbdkit-python2-plugin.so
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?have_python3}
|
||||||
%files plugin-python3
|
%files plugin-python3
|
||||||
%{_libdir}/%{name}/plugins/nbdkit-python3-plugin.so
|
%{_libdir}/%{name}/plugins/nbdkit-python3-plugin.so
|
||||||
%endif
|
%endif
|
||||||
@ -505,6 +510,9 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 29 2017 Richard W.M. Jones <rjones@redhat.com> - 1.1.18-4
|
||||||
|
- Fix Python 3 builds / RHEL macros (RHBZ#1404631).
|
||||||
|
|
||||||
* Tue Nov 21 2017 Richard W.M. Jones <rjones@redhat.com> - 1.1.18-3
|
* Tue Nov 21 2017 Richard W.M. Jones <rjones@redhat.com> - 1.1.18-3
|
||||||
- New upstream version 1.1.18.
|
- New upstream version 1.1.18.
|
||||||
- Add NBD forwarding plugin.
|
- Add NBD forwarding plugin.
|
||||||
|
Loading…
Reference in New Issue
Block a user