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
|
||||
|
||||
Name: python-augeas
|
||||
Version: 0.5.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Python bindings to augeas
|
||||
Group: Development/Languages
|
||||
License: LGPLv2+
|
||||
URL: http://augeas.net/
|
||||
Source0: http://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: augeas-libs
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python-setuptools python-devel
|
||||
@ -28,10 +20,20 @@ BuildRequires: python3-setuptools python3-devel
|
||||
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}
|
||||
%package -n python3-augeas
|
||||
Summary: Python 3 bindings to augeas
|
||||
Requires: augeas-libs
|
||||
%{?python_provide:%python_provide python3-augeas}
|
||||
|
||||
%description -n python3-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
|
||||
%setup -q
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif # with_python3
|
||||
|
||||
%build
|
||||
# Remove CFLAGS=... for noarch packages (unneeded)
|
||||
CFLAGS="$RPM_OPT_FLAGS"
|
||||
%{__python} setup.py build_ext -i
|
||||
%{__python} setup.py build
|
||||
%{py2_build}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build_ext -i
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%{py3_build}
|
||||
%endif # with_python3
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||
%{py2_install}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||
popd
|
||||
%{py3_install}
|
||||
%endif # with_python3
|
||||
|
||||
%files
|
||||
%doc COPYING AUTHORS README.txt
|
||||
%files -n python2-augeas
|
||||
%license COPYING
|
||||
%doc AUTHORS README.txt
|
||||
%{python_sitelib}/augeas.py*
|
||||
%if %{with egg}
|
||||
%{python_sitelib}/*augeas*.egg-info
|
||||
%endif
|
||||
%{python_sitelib}/python_augeas*.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-augeas
|
||||
%doc COPYING AUTHORS README.txt
|
||||
%{python3_sitelib}/*
|
||||
%license COPYING
|
||||
%doc AUTHORS README.txt
|
||||
%{python3_sitelib}/augeas.py
|
||||
%{python3_sitelib}/python_augeas-*.egg-info
|
||||
%{python3_sitelib}/__pycache__/*
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%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>
|
||||
- use %%global instead of %%define
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user