Cleanup spec file conditionals

epel9
Troy Dawson 7 years ago
parent ba6138005d
commit 5e62c3cead

@ -2,13 +2,13 @@
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python2_version: %global python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")}
%if 0%{?fedora}
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%endif
Name: python-virtualenv
Version: 15.1.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Tool to create isolated Python environments
Group: Development/Languages
@ -24,17 +24,10 @@ Patch0: check-exec_dir.patch
BuildArch: noarch
BuildRequires: python2-devel
%if 0%{?fedora}
BuildRequires: python-sphinx
%endif
%if 0%{?with_python3}
BuildRequires: python-sphinx
BuildRequires: python3-devel
%if 0%{?fedora}
BuildRequires: python3-sphinx
%endif
%endif # with_python3
%description
@ -58,15 +51,13 @@ written by Ian Bicking, and sponsored by the Open Planning Project. It is
licensed under an MIT-style permissive license
%if 0%{?fedora}
%if 0%{?with_python3}
%package -n python-virtualenv-doc
Summary: Documentation for python virtualenv
%description -n python-virtualenv-doc
Documentation for python virtualenv.
%endif
%if 0%{?with_python3}
%package -n python3-virtualenv
Summary: Tool to create isolated Python environments
@ -93,19 +84,15 @@ licensed under an MIT-style permissive license
%{py2_build}
# Build docs on Fedora
%if 0%{?fedora}
%if 0%{?with_python3}
%{__python2} setup.py build_sphinx
rm -f build/sphinx/html/.buildinfo
%endif
%if 0%{?with_python3}
%{py3_build}
# Build docs on Fedora
%if 0%{?fedora}
%{__python3} setup.py build_sphinx
rm -f build/sphinx/html/.buildinfo
%endif
%endif # with_python3
%install
@ -132,13 +119,11 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
%{_bindir}/virtualenv-2
%{_bindir}/virtualenv-%{python2_version}
%if 0%{?fedora}
%if 0%{?with_python3}
# Include sphinx docs on Fedora
%files -n python-virtualenv-doc
%doc build/sphinx/*
%endif
%if 0%{?with_python3}
%files -n python3-virtualenv
%license LICENSE.txt
%doc docs/*rst PKG-INFO AUTHORS.txt
@ -154,6 +139,9 @@ cp %{buildroot}/%{_bindir}/virtualenv %{buildroot}/%{_bindir}/virtualenv-2
%changelog
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 15.1.0-3
- Cleanup spec file conditionals
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 15.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

Loading…
Cancel
Save