Modernize spec
- Fix python3 package file ownership
This commit is contained in:
parent
c896c023d9
commit
a57d6adff1
@ -1,22 +1,14 @@
|
|||||||
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
|
|
||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
||||||
|
|
||||||
%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 9 || 0%{?rhel} >= 6
|
|
||||||
%bcond_without egg
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
|
|
||||||
Name: python-augeas
|
Name: python-augeas
|
||||||
Version: 0.5.0
|
Version: 0.5.0
|
||||||
Release: 4%{?dist}
|
Release: 5%{?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
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python-setuptools python-devel
|
BuildRequires: python-setuptools python-devel
|
||||||
@ -28,10 +20,20 @@ BuildRequires: python3-setuptools python3-devel
|
|||||||
python-augeas is a set of Python bindings around augeas.
|
python-augeas is a set of Python bindings around augeas.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python2-augeas
|
||||||
|
Summary: Python 2 bindings to augeas
|
||||||
|
Requires: augeas-libs
|
||||||
|
%{?python_provide:%python_provide python2-augeas}
|
||||||
|
|
||||||
|
%description -n python2-augeas
|
||||||
|
python2-augeas is a set of Python bindings around augeas.
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%package -n python3-augeas
|
%package -n python3-augeas
|
||||||
Summary: Python 3 bindings to augeas
|
Summary: Python 3 bindings to augeas
|
||||||
Requires: augeas-libs
|
Requires: augeas-libs
|
||||||
|
%{?python_provide:%python_provide python3-augeas}
|
||||||
|
|
||||||
%description -n python3-augeas
|
%description -n python3-augeas
|
||||||
python3-augeas is a set of Python bindings around augeas.
|
python3-augeas is a set of Python bindings around augeas.
|
||||||
@ -41,49 +43,41 @@ python3-augeas is a set of Python bindings around augeas.
|
|||||||
%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)
|
%{py2_build}
|
||||||
CFLAGS="$RPM_OPT_FLAGS"
|
|
||||||
%{__python} setup.py build_ext -i
|
|
||||||
%{__python} setup.py build
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
%{py3_build}
|
||||||
%{__python3} setup.py build_ext -i
|
|
||||||
%{__python3} setup.py build
|
|
||||||
popd
|
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
%{py2_install}
|
||||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
%{py3_install}
|
||||||
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
||||||
popd
|
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%files
|
%files -n python2-augeas
|
||||||
%doc COPYING AUTHORS README.txt
|
%license COPYING
|
||||||
|
%doc AUTHORS README.txt
|
||||||
%{python_sitelib}/augeas.py*
|
%{python_sitelib}/augeas.py*
|
||||||
%if %{with egg}
|
%{python_sitelib}/python_augeas*.egg-info
|
||||||
%{python_sitelib}/*augeas*.egg-info
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-augeas
|
%files -n python3-augeas
|
||||||
%doc COPYING AUTHORS README.txt
|
%license COPYING
|
||||||
%{python3_sitelib}/*
|
%doc AUTHORS README.txt
|
||||||
|
%{python3_sitelib}/augeas.py
|
||||||
|
%{python3_sitelib}/python_augeas-*.egg-info
|
||||||
|
%{python3_sitelib}/__pycache__/*
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 3 2016 Orion Poplawski <orion@cora.nwra.com> - 0.5.0-5
|
||||||
|
- Modernize spec
|
||||||
|
- Fix python3 package file ownership
|
||||||
|
|
||||||
* Tue Jan 19 2016 Nils Philippsen <nils@redhat.com>
|
* Tue Jan 19 2016 Nils Philippsen <nils@redhat.com>
|
||||||
- use %%global instead of %%define
|
- use %%global instead of %%define
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user