Added Python 3 subpackage
This commit is contained in:
parent
fd9d201e70
commit
eb6f725bbe
@ -5,50 +5,88 @@
|
|||||||
%bcond_without egg
|
%bcond_without egg
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%global with_python3 1
|
||||||
|
|
||||||
Name: python-augeas
|
Name: python-augeas
|
||||||
Version: 0.5.0
|
Version: 0.5.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Python bindings to augeas
|
Summary: Python bindings to augeas
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://augeas.net/
|
URL: http://augeas.net/
|
||||||
Source0: http://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
|
Source0: http://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Requires: augeas-libs
|
Requires: augeas-libs
|
||||||
Requires: python-ctypes
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python-setuptools python-devel
|
BuildRequires: python-setuptools python-devel
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
BuildRequires: python3-setuptools python3-devel
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
%description
|
%description
|
||||||
python-augeas is a set of Python bindings around augeas.
|
python-augeas is a set of Python bindings around augeas.
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%package -n python3-augeas
|
||||||
|
Summary: Python 3 bindings to augeas
|
||||||
|
Requires: augeas-libs
|
||||||
|
|
||||||
|
%description -n python3-augeas
|
||||||
|
python3-augeas is a set of Python bindings around augeas.
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
rm -rf %{py3dir}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Remove CFLAGS=... for noarch packages (unneeded)
|
# Remove CFLAGS=... for noarch packages (unneeded)
|
||||||
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build_ext -i
|
CFLAGS="$RPM_OPT_FLAGS"
|
||||||
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
|
%{__python} setup.py build_ext -i
|
||||||
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py build_ext -i
|
||||||
|
%{__python3} setup.py build
|
||||||
|
popd
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
%clean
|
pushd %{py3dir}
|
||||||
rm -rf $RPM_BUILD_ROOT
|
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||||
|
popd
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc COPYING AUTHORS README.txt
|
%doc COPYING AUTHORS README.txt
|
||||||
%{python_sitelib}/augeas.py*
|
%{python_sitelib}/augeas.py*
|
||||||
%if %{with egg}
|
%if %{with egg}
|
||||||
%{python_sitelib}/*augeas*.egg-info
|
%{python_sitelib}/*augeas*.egg-info
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%files -n python3-augeas
|
||||||
|
%doc COPYING AUTHORS README.txt
|
||||||
|
%{python3_sitelib}/*
|
||||||
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 22 2014 Tomas Radej <tradej@redhat.com> - 0.5.0-2
|
||||||
|
- Added Python 3 subpackage
|
||||||
|
|
||||||
* Thu Sep 04 2014 Greg Swift <gregswift@gmail.com> - 0.5.0-1
|
* Thu Sep 04 2014 Greg Swift <gregswift@gmail.com> - 0.5.0-1
|
||||||
- Version 0.5.0 release
|
- Version 0.5.0 release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user