14
0

Accepting request 562589 from home:alarrosa:branches:devel:languages:python

- Converted to singlespec to generate a python3 package
- Update to 4.8.2
  * Merged in jeffwidman/virtualenvwrapper-2/jeffwidman/update-rtd-url-they-now-use-io-rather-t-1505539237232 (pull request #63)
  * Merged in jeffwidman/virtualenvwrapper-1/jeffwidman/add-python-36-to-pypi-trove-classifiers-1505539102243 (pull request #62)
  * Merged in jeffwidman/virtualenvwrapper/jeffwidman/update-readme-with-current-test-status--1505538852189 (pull request #61)
  * Update RTD url
  * Add python 3.6 to Pypi trove classifiers
  * Update readme with current test status
- Update to 4.8.1
  * New PBR doesn’t like provides_dist
- Update to 4.8.0
  * Merged in fix/263 (pull request #60)
  * Merged in fix/296 (pull request #59)
  * Fixing Documentation
  * Update supported versions
  * Adding python 3.6
  * Fixing run_hook and tab_completion
  * First shot at Fixing #263
  * Adding a note about package managers
  * Merged in zmwangx/virtualenvwrapper/always-export-virtualenvwrapper_hook_dir (pull request #55)
  * Typo fix
  * Merged in lendenmc/virtualenvwrapper (pull request #51)
  * Merged in SpotlightKid/virtualenvwrapper/bugfix/distutils-sysconfig (pull request #56)
  * Merged in dougharris/virtualenvwrapper (pull request #53)
  * Merged in kk6/virtualenvwrapper/fix/wipeenv_ignore_setuptools_dependencies (pull request #57)
  * Merged in erickmk/virtualenvwrapper/erickmk/command_refrst-edited-online-with-bitbuc-1491225971803 (pull request #58)
  * Update sentence to make it more clear
  * command_ref.rst edited online with Bitbucket
  * Fixes Issue #291 wipeenv ignore setuptools’s dependencies
  * Import distutils.sysconfig properly (fixes #167)

OBS-URL: https://build.opensuse.org/request/show/562589
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenvwrapper?expand=0&rev=57
This commit is contained in:
Tomáš Chvátal
2018-01-08 17:33:11 +00:00
committed by Git OBS Bridge
parent 21b099b2d8
commit bff165800c
5 changed files with 110 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-virtualenvwrapper
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 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,32 +16,33 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_with test
Name: python-virtualenvwrapper
Version: 4.7.1
Version: 4.8.2
Release: 0
Url: http://www.doughellmann.com/projects/virtualenvwrapper/
Summary: Enhancements to virtualenv
License: HPND
License: MIT
Group: Development/Languages/Python
Source: https://pypi.python.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-%{version}.tar.gz
Url: https://virtualenvwrapper.readthedocs.io/
Source: https://files.pythonhosted.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-%{version}.tar.gz
Patch: virtualenvwrapper-4.2-fix-bashisms.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-pbr
BuildRequires: python-setuptools
BuildRequires: python-stevedore
BuildRequires: python-virtualenv
Requires: python-virtualenv-clone
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module stevedore}
BuildRequires: %{python_module virtualenv-clone}
BuildRequires: %{python_module virtualenv}
%endif
BuildRequires: fdupes
Requires: python-stevedore
Requires: python-virtualenv
Requires: python-virtualenv-clone
Requires(post): update-alternatives
Requires(preun): 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
virtualenvwrapper is a set of extensions to Ian Bicking's virtualenv
@@ -65,43 +66,35 @@ conflicts in their dependencies.
sed -i -e '1i#!/bin/sh' virtualenvwrapper.sh
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
mv %{buildroot}%{_bindir}/virtualenvwrapper.sh %{buildroot}%{_bindir}/virtualenvwrapper
mv %{buildroot}%{_bindir}/virtualenvwrapper_lazy.sh %{buildroot}%{_bindir}/virtualenvwrapper_lazy
# Prepare for update-alternatives usage
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for p in virtualenvwrapper virtualenvwrapper_lazy ; do
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
%python_clone -a %{buildroot}%{_bindir}/$p
done
#%%check
#python3.6 -m venv --system-site-packages --without-pip venvwrapper-3.6
#sh tests/run_tests $PWD/venvwrapper-3.6
%post
%_sbindir/update-alternatives \
--install %{_bindir}/virtualenvwrapper virtualenvwrapper %{_bindir}/virtualenvwrapper-%{py_ver} 30 \
--slave %{_bindir}/virtualenvwrapper_lazy virtualenvwrapper_lazy %{_bindir}/virtualenvwrapper_lazy-%{py_ver}
%python_install_alternative virtualenvwrapper virtualenvwrapper_lazy
%preun
if [ $1 -eq 0 ] ; then
%_sbindir/update-alternatives --remove virtualenvwrapper %{_bindir}/virtualenvwrapper-%{py_ver}
fi
%postun
%python_uninstall_alternative virtualenvwrapper
# %check
# sh tests/run_tests
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog LICENSE README.txt README.es.rst README.ja.rst
%{_bindir}/virtualenvwrapper
%{_bindir}/virtualenvwrapper_lazy
%{_bindir}/virtualenvwrapper-%{py_ver}
%{_bindir}/virtualenvwrapper_lazy-%{py_ver}
%ghost %{_sysconfdir}/alternatives/virtualenvwrapper
%ghost %{_sysconfdir}/alternatives/virtualenvwrapper_lazy
%doc AUTHORS ChangeLog LICENSE README.es.rst README.ja.rst README.txt
%python_alternative %{_bindir}/virtualenvwrapper
%python_alternative %{_bindir}/virtualenvwrapper_lazy
%{python_sitelib}/*
%changelog