Drop support for Python 2 from spec
Python 2 was used in Fedora 21 (old-stable now) and before, but no updates are expected for Fedora < 22.
This commit is contained in:
parent
443a2924c1
commit
1c57e6ad46
@ -1,12 +1,5 @@
|
|||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
|
|
||||||
%if 0%{?fedora} > 21
|
|
||||||
%global with_python3 1
|
|
||||||
%else
|
|
||||||
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
||||||
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: javapackages-tools
|
Name: javapackages-tools
|
||||||
Version: 4.5.0
|
Version: 4.5.0
|
||||||
Release: 3%{?dist}
|
Release: 3%{?dist}
|
||||||
@ -20,19 +13,11 @@ Patch0: 0001-Fix-UnboundLocalError-local-variable-pom_requires-re.patch
|
|||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-lxml
|
BuildRequires: python3-lxml
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-nose
|
||||||
BuildRequires: python3-six
|
BuildRequires: python3-six
|
||||||
%else
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python-lxml
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
BuildRequires: python-nose
|
|
||||||
BuildRequires: python-six
|
|
||||||
%endif
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
@ -43,13 +28,8 @@ BuildRequires: xmvn-resolve >= 2
|
|||||||
|
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
Requires: lua
|
Requires: lua
|
||||||
%if 0%{?with_python3}
|
|
||||||
Requires: python3-javapackages = %{version}-%{release}
|
Requires: python3-javapackages = %{version}-%{release}
|
||||||
Requires: python3
|
Requires: python3
|
||||||
%else
|
|
||||||
Requires: python-javapackages = %{version}-%{release}
|
|
||||||
Requires: python
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Provides: jpackage-utils = %{version}-%{release}
|
Provides: jpackage-utils = %{version}-%{release}
|
||||||
Obsoletes: jpackage-utils < %{version}-%{release}
|
Obsoletes: jpackage-utils < %{version}-%{release}
|
||||||
@ -123,7 +103,6 @@ Requires: xmvn-connector-ivy >= 2
|
|||||||
This package implements local mode fow Apache Ivy, which allows
|
This package implements local mode fow Apache Ivy, which allows
|
||||||
artifact resolution using XMvn resolver.
|
artifact resolution using XMvn resolver.
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%package -n python3-javapackages
|
%package -n python3-javapackages
|
||||||
Summary: Module for handling various files for Java packaging
|
Summary: Module for handling various files for Java packaging
|
||||||
Requires: python3-lxml
|
Requires: python3-lxml
|
||||||
@ -134,18 +113,6 @@ Obsoletes: python-javapackages < %{version}-%{release}
|
|||||||
Module for handling, querying and manipulating of various files for Java
|
Module for handling, querying and manipulating of various files for Java
|
||||||
packaging in Linux distributions
|
packaging in Linux distributions
|
||||||
|
|
||||||
%else # python2
|
|
||||||
%package -n python-javapackages
|
|
||||||
Summary: Module for handling various files for Java packaging
|
|
||||||
Requires: python-lxml
|
|
||||||
Requires: python-six
|
|
||||||
Obsoletes: python3-javapackages < %{version}-%{release}
|
|
||||||
|
|
||||||
%description -n python-javapackages
|
|
||||||
Module for handling, querying and manipulating of various files for Java
|
|
||||||
packaging in Linux distributions
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Guide for Java packaging
|
Summary: Guide for Java packaging
|
||||||
|
|
||||||
@ -170,11 +137,7 @@ sed -i '/fedora-review/d' install
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?with_python3}
|
|
||||||
%configure --pyinterpreter=%{__python3}
|
%configure --pyinterpreter=%{__python3}
|
||||||
%else
|
|
||||||
%configure --pyinterpreter=%{__python2}
|
|
||||||
%endif
|
|
||||||
./build
|
./build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -182,11 +145,7 @@ sed -i '/fedora-review/d' install
|
|||||||
sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-*
|
sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-*
|
||||||
|
|
||||||
pushd python
|
pushd python
|
||||||
%if 0%{?with_python3}
|
|
||||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
%else
|
|
||||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
||||||
%endif
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -205,15 +164,9 @@ popd
|
|||||||
|
|
||||||
%files -n ivy-local -f files-ivy
|
%files -n ivy-local -f files-ivy
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
%files -n python3-javapackages
|
%files -n python3-javapackages
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%{python3_sitelib}/javapackages*
|
%{python3_sitelib}/javapackages*
|
||||||
%else # python2
|
|
||||||
%files -n python-javapackages
|
|
||||||
%doc LICENSE
|
|
||||||
%{python_sitelib}/javapackages*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files doc -f files-doc
|
%files doc -f files-doc
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
|
Loading…
Reference in New Issue
Block a user