Add initial support for python3
This commit is contained in:
parent
52d1df3980
commit
1a590c32ef
@ -1,37 +1,61 @@
|
|||||||
|
%if 0%{?fedora} > 12
|
||||||
|
%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.0.0
|
Version: 4.2.0
|
||||||
Release: 0%{?dist}
|
Release: 1%{?dist}
|
||||||
|
|
||||||
Summary: Macros and scripts for Java packaging support
|
Summary: Macros and scripts for Java packaging support
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://fedorahosted.org/javapackages/
|
URL: https://git.fedorahosted.org/git/javapackages.git
|
||||||
Source0: https://fedorahosted.org/released/javapackages/javapackages-%{version}.tar.xz
|
Source0: https://fedorahosted.org/released/javapackages/javapackages-%{version}.tar.xz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-lxml
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-nose
|
||||||
|
BuildRequires: python3-six
|
||||||
|
BuildRequires: python3-PyXB = 1.2.4
|
||||||
|
%else
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python-lxml
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
BuildRequires: python-nose
|
||||||
|
BuildRequires: python-six
|
||||||
|
BuildRequires: PyXB = 1.2.4
|
||||||
|
%endif
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: xmlto
|
BuildRequires: xmlto
|
||||||
BuildRequires: python-lxml
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
BuildRequires: python-formencode
|
|
||||||
BuildRequires: scl-utils-build
|
BuildRequires: scl-utils-build
|
||||||
BuildRequires: python-nose
|
|
||||||
BuildRequires: dia
|
BuildRequires: dia
|
||||||
BuildRequires: PyXB >= 1.2.3
|
|
||||||
BuildRequires: javapackages-tools >= 4.0.0
|
BuildRequires: javapackages-tools >= 4.0.0
|
||||||
BuildRequires: xmvn-resolve >= 2.0.0
|
BuildRequires: xmvn-resolve >= 2.0.0
|
||||||
|
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
Requires: libxslt
|
Requires: libxslt
|
||||||
Requires: lua
|
Requires: lua
|
||||||
Requires: python
|
%if 0%{?with_python3}
|
||||||
|
Requires: python3-javapackages = %{version}-%{release}
|
||||||
|
Requires: python3
|
||||||
|
%else
|
||||||
Requires: python-javapackages = %{version}-%{release}
|
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}
|
||||||
|
|
||||||
|
Provides: mvn(com.sun:tools)
|
||||||
|
Provides: mvn(sun.jdk:jconsole)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides macros and scripts to support Java packaging.
|
This package provides macros and scripts to support Java packaging.
|
||||||
|
|
||||||
@ -88,14 +112,29 @@ 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
|
||||||
|
Summary: Module for handling various files for Java packaging
|
||||||
|
Requires: python3-PyXB = 1.2.4
|
||||||
|
Requires: python-lxml
|
||||||
|
Obsoletes: python-javapackages < %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python3-javapackages
|
||||||
|
Module for handling, querying and manipulating of various files for Java
|
||||||
|
packaging in Linux distributions
|
||||||
|
|
||||||
|
%else # python2
|
||||||
%package -n python-javapackages
|
%package -n python-javapackages
|
||||||
Summary: Module for handling various files for Java packaging
|
Summary: Module for handling various files for Java packaging
|
||||||
Requires: PyXB >= 1.2.3
|
Requires: PyXB = 1.2.4
|
||||||
Requires: python-lxml
|
Requires: python-lxml
|
||||||
|
Obsoletes: python3-javapackages < %{version}-%{release}
|
||||||
|
|
||||||
%description -n python-javapackages
|
%description -n python-javapackages
|
||||||
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
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%package -n fedora-review-plugin-java
|
%package -n fedora-review-plugin-java
|
||||||
Summary: fedora-review plugin for checking Java packaging guidelines
|
Summary: fedora-review plugin for checking Java packaging guidelines
|
||||||
@ -131,11 +170,23 @@ This package provides non-essential macros and scripts to support Java packaging
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n javapackages-%{version}
|
%setup -q -n javapackages-%{version}
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
find . -name '*.py' | xargs sed -i '1s|^#!.*python|#!%{__python3}|'
|
||||||
|
find ./depgenerators -name '*.req' | xargs sed -i '1s|^#!.*python|#!%{__python3}|'
|
||||||
|
find ./depgenerators -name '*.prov' | xargs sed -i '1s|^#!.*python|#!%{__python3}|'
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
./build
|
./build
|
||||||
|
|
||||||
pushd python
|
pushd python
|
||||||
%{__python} setup.py build
|
%if 0%{?with_python3}
|
||||||
|
%{__python3} setup.py build
|
||||||
|
%else
|
||||||
|
%{__python2} setup.py build
|
||||||
|
%endif
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -143,12 +194,19 @@ popd
|
|||||||
sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-*
|
sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-*
|
||||||
|
|
||||||
pushd python
|
pushd python
|
||||||
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
%if 0%{?with_python3}
|
||||||
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
%else
|
||||||
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
%endif
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%check
|
%check
|
||||||
./check
|
%if 0%{?with_python3}
|
||||||
|
./check 3
|
||||||
|
%else
|
||||||
|
./check 2
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -f files-common
|
%files -f files-common
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
@ -159,9 +217,15 @@ popd
|
|||||||
|
|
||||||
%files -n ivy-local -f files-ivy
|
%files -n ivy-local -f files-ivy
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%files -n python3-javapackages
|
||||||
|
%doc LICENSE
|
||||||
|
%{python3_sitelib}/javapackages*
|
||||||
|
%else # python2
|
||||||
%files -n python-javapackages
|
%files -n python-javapackages
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%{python_sitelib}/javapackages*
|
%{python_sitelib}/javapackages*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n fedora-review-plugin-java
|
%files -n fedora-review-plugin-java
|
||||||
%{_datadir}/fedora-review/plugins/*
|
%{_datadir}/fedora-review/plugins/*
|
||||||
@ -170,6 +234,9 @@ popd
|
|||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 24 2014 Michal Srb <msrb@redhat.com> - 4.2.0-1
|
||||||
|
- Update to upstream version 4.2.0
|
||||||
|
|
||||||
* Wed Apr 16 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.0-6
|
* Wed Apr 16 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.0-6
|
||||||
- Add explicit maven-local requires on java-1.8.0-openjdk-devel
|
- Add explicit maven-local requires on java-1.8.0-openjdk-devel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user