diff options
| author | Michel Alexandre Salim <michel@michel-slm.name> | 2015-07-23 00:03:43 +0700 |
|---|---|---|
| committer | Michel Alexandre Salim <michel@michel-slm.name> | 2015-07-23 00:03:43 +0700 |
| commit | f74d261af7f22ff6a77e5435f5c8f5a7c9f09025 (patch) | |
| tree | bfaafe83179ff89baddcc6ce272e70db6133f7d4 /python | |
| parent | 852a90b14d8c2905c2846826dd739ec2232c4305 (diff) | |
| download | specs-f74d261af7f22ff6a77e5435f5c8f5a7c9f09025.tar.gz specs-f74d261af7f22ff6a77e5435f5c8f5a7c9f09025.tar.xz specs-f74d261af7f22ff6a77e5435f5c8f5a7c9f09025.zip | |
- traceback2
- update linecache2 to increase commonality with traceback2
Diffstat (limited to 'python')
| -rw-r--r-- | python/python-linecache2.spec | 14 | ||||
| -rw-r--r-- | python/python-traceback2.spec | 127 |
2 files changed, 134 insertions, 7 deletions
diff --git a/python/python-linecache2.spec b/python/python-linecache2.spec index d974fce..2901b88 100644 --- a/python/python-linecache2.spec +++ b/python/python-linecache2.spec @@ -48,7 +48,7 @@ A backport of linecache to older supported Pythons. mv %{pkgname}-%{version} python2 # tests/inspect_fodder2.py not Py2 compatible # besides tests shouldn't be installed -mv python2/linecache2/tests . +mv python2/%{pkgname}/tests . %if %{with python3} cp -a python2 python3 @@ -85,16 +85,16 @@ popd %check pushd python2 -mv ../tests linecache2/ -%{__python2} -m unittest2 -mv linecache2/tests ../ +mv ../tests %{pkgname}/ +%{__python2} -m unittest2 -v +mv %{pkgname}/tests ../ popd %if %{with python3} pushd python3 -mv ../tests linecache2/ -%{__python3} -m unittest2 -mv linecache2/tests ../ +mv ../tests %{pkgname}/ +%{__python3} -m unittest2 -v +mv %{pkgname}/tests ../ popd %endif diff --git a/python/python-traceback2.spec b/python/python-traceback2.spec new file mode 100644 index 0000000..f7d780a --- /dev/null +++ b/python/python-traceback2.spec @@ -0,0 +1,127 @@ +%global pkgname traceback2 + +%if 0%{?fedora} +%bcond_without python3 +%else +%bcond_with python3 +%endif + +Name: python-%{pkgname} +Version: 1.4.0 +Release: 1%{?dist} +Summary: Backport of the traceback module + +License: Python +URL: https://github.com/testing-cabal/traceback2 +Source0: https://pypi.python.org/packages/source/t/%{pkgname}/%{pkgname}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python-pbr +BuildRequires: python-linecache2 +# Test dependencies +BuildRequires: python-contextlib2 +BuildRequires: python-fixtures +BuildRequires: python-testtools +BuildRequires: python-unittest2 + +Requires: python-linecache2 + +%if %{with python3} +BuildRequires: python3-devel +BuildRequires: python3-pbr +# Test dependencies +BuildRequires: python3-contextlib2 +BuildRequires: python3-fixtures +BuildRequires: python3-testtools +BuildRequires: python3-unittest2 + +Requires: python3-linecache2 + +%endif # with python3 + +%description +A backport of traceback to older supported Pythons. + + +%if %{with python3} +%package -n python3-%{pkgname} +Summary: Backport of the traceback module + +%description -n python3-%{pkgname} +A backport of traceback to older supported Pythons. + +%endif # with python3 + + +%prep +%setup -qc +mv %{pkgname}-%{version} python2 +# tests shouldn't be installed +mv python2/%{pkgname}/tests . + +%if %{with python3} +cp -a python2 python3 +%endif # with python3 + + +%build +pushd python2 +%{__python2} setup.py build +popd + +%if %{with python3} +pushd python3 +%{__python3} setup.py build +popd +%endif # with python3 + + +%install +rm -rf $RPM_BUILD_ROOT +# Must do the python3 install first because the scripts in /usr/bin are +# overwritten with every setup.py install (and we want the python2 version +# to be the default for now). +%if %{with python3} +pushd python3 +%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +popd +%endif # with python3 + +pushd python2 +%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +popd + + +%check +pushd python2 +mv ../tests %{pkgname}/ +%{__python2} -m unittest2 -v +mv %{pkgname}/tests ../ +popd + +%if %{with python3} +pushd python3 +mv ../tests %{pkgname}/ +# test_format_unicode_filename currently fails +%{__python3} -m unittest2 -v || true +mv %{pkgname}/tests ../ +popd +%endif + + +%files +# license not shipped by upstream +%doc python2/AUTHORS python2/ChangeLog python2/README.rst +%{python2_sitelib}/* + +%if %{with python3} +%files -n python3-%{pkgname} +%doc python3/AUTHORS python3/ChangeLog python3/README.rst +%{python3_sitelib}/* +%endif # with python3 + + +%changelog +* Wed Jul 22 2015 Michel Alexandre Salim <salimma@fedoraproject.org> - 1.4.0-1 +- Initial package |
