From 23aa34f5869cb3dbb47507afb9060b8a4734dde0 Mon Sep 17 00:00:00 2001 From: Slavek Kabrda Date: Nov 12 2015 15:27:14 +0000 Subject: Update to 1.1.0 - Bootstrap dependency on traceback2 --- diff --git a/.gitignore b/.gitignore index b9f9046..5bdd807 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /unittest2-0.8.0.tar.gz +/unittest2-1.1.0.tar.gz diff --git a/python-unittest2.spec b/python-unittest2.spec index b991637..21c06be 100644 --- a/python-unittest2.spec +++ b/python-unittest2.spec @@ -1,21 +1,29 @@ # Created by pyp2rpm-1.1.1 %global pypi_name unittest2 %global with_python3 1 +%global bootstrap_traceback2 1 Name: python-%{pypi_name} -Version: 0.8.0 -Release: 4%{?dist} +Version: 1.1.0 +Release: 1%{?dist} Summary: The new features in unittest backported to Python 2.4+ License: BSD URL: http://pypi.python.org/pypi/unittest2 Source0: https://pypi.python.org/packages/source/u/%{pypi_name}/%{pypi_name}-%{version}.tar.gz -Patch0: unittest2-0.8.0-remove-argparse-from-requires.patch +# we don't need this in Fedora, since we have Python 2.7, which has argparse +Patch0: unittest2-1.1.0-remove-argparse-from-requires.patch +# we only apply this if bootstrap_traceback2 == 1 +Patch1: unittest2-1.1.0-remove-traceback2-from-requires.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-six +%if ! 0%{?bootstrap_traceback2} +BuildRequires: python-traceback2 +Requires: python-traceback2 +%endif Requires: python-setuptools Requires: python-six @@ -23,6 +31,9 @@ Requires: python-six BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-six +%if ! 0%{?bootstrap_traceback2} +BuildRequires: python3-traceback2 +%endif # bootstrap_traceback2 %endif # if with_python3 @@ -36,6 +47,9 @@ framework in Python 2.7 and onwards. It is tested to run on Python 2.6, 2.7, Summary: The new features in unittest backported to Python 2.4+ Requires: python3-setuptools Requires: python3-six +%if ! 0%{?bootstrap_traceback2} +Requires: python3-traceback2 +%endif %description -n python3-%{pypi_name} unittest2 is a backport of the new features added to the unittest testing @@ -49,6 +63,9 @@ framework in Python 2.7 and onwards. It is tested to run on Python 2.6, 2.7, rm -rf %{pypi_name}.egg-info %patch0 -p0 +%if 0%{?bootstrap_traceback2} +%patch1 -p0 +%endif %if 0%{?with_python3} rm -rf %{py3dir} @@ -82,6 +99,7 @@ popd %check +%if ! 0%{?bootstrap_traceback2} %{__python2} -m unittest2 %if 0%{?with_python3} @@ -89,6 +107,7 @@ pushd %{py3dir} %{__python3} -m unittest2 popd %endif # with_python3 +%endif # bootstrap_traceback2 %files @@ -106,6 +125,10 @@ popd %endif # with_python3 %changelog +* Thu Nov 12 2015 bkabrda - 1.1.0-1 +- Update to 1.1.0 +- Bootstrap dependency on traceback2 + * Tue Nov 10 2015 Fedora Release Engineering - 0.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 diff --git a/sources b/sources index 909a88a..8f49f09 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3ae364d783aaf1fafb67ff77fd7abfcb unittest2-0.8.0.tar.gz +f72dae5d44f091df36b6b513305ea000 unittest2-1.1.0.tar.gz diff --git a/unittest2-0.8.0-remove-argparse-from-requires.patch b/unittest2-0.8.0-remove-argparse-from-requires.patch deleted file mode 100644 index 05862b4..0000000 --- a/unittest2-0.8.0-remove-argparse-from-requires.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- setup.py.orig 2014-11-10 14:56:10.834139343 +0100 -+++ setup.py 2014-11-10 14:56:25.701122189 +0100 -@@ -57,7 +57,7 @@ - # Both install and setup requires - because we read VERSION from within the - # package, and the package also exports all the APIs. - # six for compat helpers --REQUIRES = ['argparse', 'six'], -+REQUIRES = ['six'], - - params = dict( - name=NAME, diff --git a/unittest2-1.1.0-remove-argparse-from-requires.patch b/unittest2-1.1.0-remove-argparse-from-requires.patch new file mode 100644 index 0000000..295ce67 --- /dev/null +++ b/unittest2-1.1.0-remove-argparse-from-requires.patch @@ -0,0 +1,11 @@ +--- setup.py.orig 2015-11-12 15:51:35.557779728 +0100 ++++ setup.py 2015-11-12 15:58:04.618948793 +0100 +@@ -57,7 +57,7 @@ + # Both install and setup requires - because we read VERSION from within the + # package, and the package also exports all the APIs. + # six for compat helpers +-REQUIRES = ['argparse', 'six>=1.4', 'traceback2'], ++REQUIRES = ['six>=1.4', 'traceback2'], + + params = dict( + name=NAME, diff --git a/unittest2-1.1.0-remove-traceback2-from-requires.patch b/unittest2-1.1.0-remove-traceback2-from-requires.patch new file mode 100644 index 0000000..277befc --- /dev/null +++ b/unittest2-1.1.0-remove-traceback2-from-requires.patch @@ -0,0 +1,21 @@ +--- setup.py.orig 2015-11-12 16:19:17.850638394 +0100 ++++ setup.py 2015-11-12 16:19:33.605809230 +0100 +@@ -12,8 +12,7 @@ + + class late_version: + def __str__(self): +- from unittest2 import __version__ as VERSION +- return VERSION ++ return '1.1.0' + def __add__(self, other): + return str(self) + other + def replace(self, old, new): +@@ -57,7 +56,7 @@ + # Both install and setup requires - because we read VERSION from within the + # package, and the package also exports all the APIs. + # six for compat helpers +-REQUIRES = ['six>=1.4', 'traceback2'], ++REQUIRES = ['six>=1.4'], + + params = dict( + name=NAME,