Modernize spec
- Fix python3 package file ownership
This commit is contained in:
parent
7069738a81
commit
3bb4abebde
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Name: python-virtualenv
|
Name: python-virtualenv
|
||||||
Version: 13.1.2
|
Version: 13.1.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Tool to create isolated Python environments
|
Summary: Tool to create isolated Python environments
|
||||||
|
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -32,16 +32,28 @@ BuildRequires: python3-sphinx
|
|||||||
|
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
Requires: python-setuptools
|
|
||||||
Requires: python2-devel
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
virtualenv is a tool to create isolated Python environments. virtualenv
|
virtualenv is a tool to create isolated Python environments. virtualenv
|
||||||
is a successor to workingenv, and an extension of virtual-python. It is
|
is a successor to workingenv, and an extension of virtual-python. It is
|
||||||
written by Ian Bicking, and sponsored by the Open Planning Project. It is
|
written by Ian Bicking, and sponsored by the Open Planning Project. It is
|
||||||
licensed under an MIT-style permissive license.
|
licensed under an MIT-style permissive license.
|
||||||
|
|
||||||
%if 0%{?fedora} > 0
|
|
||||||
|
%package -n python2-virtualenv
|
||||||
|
Summary: Tool to create isolated Python environments
|
||||||
|
|
||||||
|
Requires: python2-setuptools
|
||||||
|
Requires: python2-devel
|
||||||
|
%{?python_provide:%python_provide python2-virtualenv}
|
||||||
|
|
||||||
|
%description -n python2-virtualenv
|
||||||
|
virtualenv is a tool to create isolated Python environments. virtualenv
|
||||||
|
is a successor to workingenv, and an extension of virtual-python. It is
|
||||||
|
written by Ian Bicking, and sponsored by the Open Planning Project. It is
|
||||||
|
licensed under an MIT-style permissive license
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
%package -n python-virtualenv-doc
|
%package -n python-virtualenv-doc
|
||||||
Summary: Documentation for python virtualenv
|
Summary: Documentation for python virtualenv
|
||||||
|
|
||||||
@ -55,6 +67,7 @@ Summary: Tool to create isolated Python environments
|
|||||||
|
|
||||||
Requires: python3-setuptools
|
Requires: python3-setuptools
|
||||||
Requires: python3-devel
|
Requires: python3-devel
|
||||||
|
%{?python_provide:%python_provide python3-virtualenv}
|
||||||
|
|
||||||
%description -n python3-virtualenv
|
%description -n python3-virtualenv
|
||||||
virtualenv is a tool to create isolated Python environments. virtualenv
|
virtualenv is a tool to create isolated Python environments. virtualenv
|
||||||
@ -68,53 +81,44 @@ licensed under an MIT-style permissive license
|
|||||||
%setup -q -n virtualenv-%{version}
|
%setup -q -n virtualenv-%{version}
|
||||||
%{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py
|
%{__sed} -i -e "1s|#!/usr/bin/env python||" virtualenv.py
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
%endif # with_python3
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Build code
|
# Build code
|
||||||
%{__python2} setup.py build
|
%{py2_build}
|
||||||
|
|
||||||
# Build docs on Fedora
|
# Build docs on Fedora
|
||||||
%if 0%{?fedora} > 0
|
%if 0%{?fedora}
|
||||||
%{__python2} setup.py build_sphinx
|
%{__python2} setup.py build_sphinx
|
||||||
rm -f build/sphinx/html/.buildinfo
|
rm -f build/sphinx/html/.buildinfo
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
%{py3_build}
|
||||||
%{__python3} setup.py build
|
|
||||||
|
|
||||||
# Build docs on Fedora
|
# Build docs on Fedora
|
||||||
%if 0%{?fedora} > 0
|
%if 0%{?fedora}
|
||||||
%{__python3} setup.py build_sphinx
|
%{__python3} setup.py build_sphinx
|
||||||
rm -f build/sphinx/html/.buildinfo
|
rm -f build/sphinx/html/.buildinfo
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
popd
|
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
%{py3_install}
|
||||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
||||||
# rename binaries to use python3
|
# rename binaries to use python3
|
||||||
mv %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/py3-virtualenv
|
mv %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/py3-virtualenv
|
||||||
popd
|
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
%{py2_install}
|
||||||
|
|
||||||
%files
|
%files -n python2-virtualenv
|
||||||
%doc docs/*rst PKG-INFO AUTHORS.txt LICENSE.txt
|
%license LICENSE.txt
|
||||||
|
%doc docs/*rst PKG-INFO AUTHORS.txt
|
||||||
|
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
%{_bindir}/virtualenv
|
%{_bindir}/virtualenv
|
||||||
%{_bindir}/virtualenv-%{python2_version}
|
%{_bindir}/virtualenv-%{python2_version}
|
||||||
|
|
||||||
%if 0%{?fedora} > 0
|
%if 0%{?fedora}
|
||||||
# Include sphinx docs on Fedora
|
# Include sphinx docs on Fedora
|
||||||
%files -n python-virtualenv-doc
|
%files -n python-virtualenv-doc
|
||||||
%doc build/sphinx/*
|
%doc build/sphinx/*
|
||||||
@ -122,15 +126,23 @@ popd
|
|||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-virtualenv
|
%files -n python3-virtualenv
|
||||||
%doc docs/*rst PKG-INFO AUTHORS.txt LICENSE.txt
|
%license LICENSE.txt
|
||||||
|
%doc docs/*rst PKG-INFO AUTHORS.txt
|
||||||
%{_bindir}/py3-virtualenv
|
%{_bindir}/py3-virtualenv
|
||||||
%{_bindir}/virtualenv-%{python3_version}
|
%{_bindir}/virtualenv-%{python3_version}
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/virtualenv.py
|
||||||
|
%{python3_sitelib}/virtualenv_support/
|
||||||
|
%{python3_sitelib}/virtualenv-*.egg-info/
|
||||||
|
%{python3_sitelib}/__pycache__/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 2 2016 Orion Poplawski <orion@cora.nwra.com> - 13.1.2-4
|
||||||
|
- Modernize spec
|
||||||
|
- Fix python3 package file ownership
|
||||||
|
|
||||||
* Wed Dec 2 2015 Orion Poplawski <orion@cora.nwra.com> - 13.1.2-3
|
* Wed Dec 2 2015 Orion Poplawski <orion@cora.nwra.com> - 13.1.2-3
|
||||||
- Move documentation to separate package (bug #1219139)
|
- Move documentation to separate package (bug #1219139)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user