[packages/python-extras] - new
qboosh
qboosh at pld-linux.org
Tue Dec 24 15:18:28 CET 2013
commit 9cc8b8670889f1b0d4482ad6f1e323bb590d7316
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Dec 24 15:18:29 2013 +0100
- new
python-extras-test.patch | 13 +++++
python-extras.spec | 122 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 135 insertions(+)
---
diff --git a/python-extras.spec b/python-extras.spec
new file mode 100644
index 0000000..6d6d403
--- /dev/null
+++ b/python-extras.spec
@@ -0,0 +1,122 @@
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary: Useful extra bits for Python - things that should be in the standard library
+Summary(pl.UTF-8): Przydatne dodatki do Pythona, które powinny być w bibliotece standardowej
+Name: python-extras
+Version: 0.0.3
+Release: 1
+License: MIT
+Group: Libraries/Python
+Source0: https://pypi.python.org/packages/source/e/extras/extras-%{version}.tar.gz
+# Source0-md5: 62d8ba049e3386a6df69b413ea81517b
+Patch0: %{name}-test.patch
+URL: https://github.com/testing-cabal/extras
+BuildRequires: python-distribute
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.219
+# when python3 present
+#BuildRequires: sed >= 4.0
+%if %{with python3}
+BuildRequires: python3-distribute
+%endif
+%if %{with tests}
+%if %{with python2}
+BuildRequires: python-testtools
+%endif
+%if %{with python3}
+BuildRequires: python3-testtools
+%endif
+%endif
+Requires: python-modules
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+extras is a set of extensions to the Python standard library,
+originally written to make the code within testtools cleaner, but now
+split out for general use outside of a testing context.
+
+%description -l pl.UTF-8
+extras to zbiór rozszerzeń biblioteki standardowej Pythona, pierwotnie
+napisany, aby uczynić kod biblioteki testtools czytelniejszym, ale
+później wydzielony do ogólnego użytku, nie tylko w kontekście testów.
+
+%package -n python3-extras
+Summary: Useful extra bits for Python - things that should be in the standard library
+Summary(pl.UTF-8): Przydatne dodatki do Pythona, które powinny być w bibliotece standardowej
+Group: Libraries/Python
+Requires: python3-modules
+
+%description -n python3-extras
+extras is a set of extensions to the Python standard library,
+originally written to make the code within testtools cleaner, but now
+split out for general use outside of a testing context.
+
+%description -n python3-extras -l pl.UTF-8
+extras to zbiór rozszerzeń biblioteki standardowej Pythona, pierwotnie
+napisany, aby uczynić kod biblioteki testtools czytelniejszym, ale
+później wydzielony do ogólnego użytku, nie tylko w kontekście testów.
+
+%prep
+%setup -q -n extras-%{version}
+%patch0 -p1
+
+%build
+%if %{with python2}
+%{__python} setup.py \
+ build --build-base build-2 \
+ %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+ build --build-base build-3 \
+ %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+ build --build-base build-2 \
+ install --skip-build \
+ --root=$RPM_BUILD_ROOT \
+ --optimize=2
+
+%py_postclean
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/extras/tests
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+ build --build-base build-3 \
+ install --skip-build \
+ --root=$RPM_BUILD_ROOT \
+ --optimize=2
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/extras/tests
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE NEWS README.rst
+%{py_sitescriptdir}/extras
+%{py_sitescriptdir}/extras-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-extras
+%defattr(644,root,root,755)
+%doc LICENSE NEWS README.rst
+%{py3_sitescriptdir}/extras
+%{py3_sitescriptdir}/extras-%{version}-py*.egg-info
+%endif
diff --git a/python-extras-test.patch b/python-extras-test.patch
new file mode 100644
index 0000000..7229233
--- /dev/null
+++ b/python-extras-test.patch
@@ -0,0 +1,13 @@
+Avoid:
+error: error in setup.cfg: command 'test' has no such option 'buffer'
+error: error in setup.cfg: command 'test' has no such option 'catch'
+--- extras-0.0.3/setup.cfg.orig 2013-01-21 19:26:30.000000000 +0100
++++ extras-0.0.3/setup.cfg 2013-12-24 10:28:33.949039541 +0100
+@@ -1,7 +1,5 @@
+ [test]
+ test_module = extras.tests
+-buffer = 1
+-catch = 1
+
+ [egg_info]
+ tag_build =
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-extras.git/commitdiff/9cc8b8670889f1b0d4482ad6f1e323bb590d7316
More information about the pld-cvs-commit
mailing list