forked from pool/python-virtualenv
Accepting request 480672 from home:tbechtold:branches:devel:languages:python
- Merge python-virtualenv-doc.spec into python-virtualenv.spec - update to 15.1.0: * Support Python 3.6. * Upgrade setuptools to 28.0.0. * Upgrade pip to 9.0.1. * Don't install pre-release versions of pip, setuptools, or wheel from PyPI. - Switch to singlespec approach OBS-URL: https://build.opensuse.org/request/show/480672 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=54
This commit is contained in:
committed by
Git OBS Bridge
parent
188bfb63a3
commit
4883e778af
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-virtualenv
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,24 +16,25 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-virtualenv
|
||||
Version: 15.0.0
|
||||
Version: 15.1.0
|
||||
Release: 0
|
||||
Url: http://www.virtualenv.org/
|
||||
Summary: Virtual Python Environment builder
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Source: https://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
|
||||
Source: https://pypi.io/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-devel
|
||||
Requires: python-setuptools
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Sphinx
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
virtualenv is a tool to create isolated Python environments.
|
||||
@@ -57,35 +58,43 @@ has its own installation directories, that doesnt share libraries with other
|
||||
virtualenv environments (and optionally doesnt use the globally installed
|
||||
libraries either).
|
||||
|
||||
%package -n %{name}-doc
|
||||
Summary: Documentation for python-virtualenv
|
||||
Group: Development/Languages/Python
|
||||
Provides: %{python_module virtualenv-doc = %{version}}
|
||||
|
||||
%description -n %{name}-doc
|
||||
virtualenv is a tool to create isolated Python environments.
|
||||
|
||||
This package contains the documentation.
|
||||
|
||||
%prep
|
||||
%setup -q -n virtualenv-%{version}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
# create update-alternatives
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
mv %{buildroot}%{_bindir}/virtualenv %{buildroot}%{_bindir}/virtualenv-%{py_ver}
|
||||
ln -s -f %{_sysconfdir}/alternatives/virtualenv %{buildroot}%{_bindir}/virtualenv
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/virtualenv
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/virtualenv
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/virtualenv virtualenv %{_bindir}/virtualenv-%{py_ver} 20
|
||||
%python_install_alternative virtualenv
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove virtualenv %{_bindir}/virtualenv-%{py_ver}
|
||||
fi
|
||||
%python_uninstall_alternative virtualenv
|
||||
|
||||
%files
|
||||
%files %python_files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt README.rst
|
||||
%{_bindir}/virtualenv
|
||||
%{_bindir}/virtualenv-%{py_ver}
|
||||
%{python_sitelib}/virtualenv*
|
||||
%ghost %{_sysconfdir}/alternatives/virtualenv
|
||||
%python_alternative %{_bindir}/virtualenv
|
||||
%pycache_only %{python_sitelib}/__pycache__
|
||||
|
||||
%files -n %{name}-doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt
|
||||
%doc build/sphinx/html
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user