[packages/python-coverage] - pl, python[23] bconds
qboosh
qboosh at pld-linux.org
Sun Mar 20 18:33:16 CET 2016
commit 89c96ed0eafe4379da7566c3fecc1d1020b051b4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 20 18:37:27 2016 +0100
- pl, python[23] bconds
python-coverage.spec | 64 +++++++++++++++++++++++++++++++++++++---------------
1 file changed, 46 insertions(+), 18 deletions(-)
---
diff --git a/python-coverage.spec b/python-coverage.spec
index 2b5f5ca..e6b43bd 100644
--- a/python-coverage.spec
+++ b/python-coverage.spec
@@ -1,20 +1,30 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
%define module coverage
Summary: Tool for measuring code coverage of Python programs
+Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie
Name: python-%{module}
Version: 3.7.1
Release: 6
License: BSD
Group: Development/Languages/Python
-Source0: http://pypi.python.org/packages/source/c/coverage/%{module}-%{version}.tar.gz
+#Source0Download: https://pypi.python.org/simple/coverage/
+Source0: https://pypi.python.org/packages/source/c/coverage/%{module}-%{version}.tar.gz
# Source0-md5: c47b36ceb17eaff3ecfab3bcd347d0df
-URL: http://nedbatchelder.com/code/coverage
+URL: http://coverage.readthedocs.org/
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python2}
BuildRequires: python-devel
BuildRequires: python-setuptools
-BuildRequires: rpm-pythonprov
+%endif
+%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-distribute
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
+%endif
Requires: python-modules
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -24,8 +34,15 @@ It monitors your program, noting which parts of the code have been
executed, then analyzes the source to identify code that could have
been executed but was not.
+%description -l pl.UTF-8
+Coverage.py to narzędzie do szacowania pokrycia kodu programów w
+Pythonie. Monitoruje program, zapisując, które części kodu zostały
+wykonane, a następnie analizuje kod źródłowy w celu zidentyfikowania
+kodu, który mógłby zostać wykonany, ale nie był.
+
%package -n python3-%{module}
Summary: Tool for measuring code coverage of Python programs
+Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie
Group: Development/Languages/Python
Requires: python3-modules
@@ -35,33 +52,41 @@ It monitors your program, noting which parts of the code have been
executed, then analyzes the source to identify code that could have
been executed but was not.
+%description -n python3-%{module} -l pl.UTF-8
+Coverage.py to narzędzie do szacowania pokrycia kodu programów w
+Pythonie. Monitoruje program, zapisując, które części kodu zostały
+wykonane, a następnie analizuje kod źródłowy w celu zidentyfikowania
+kodu, który mógłby zostać wykonany, ale nie był.
+
%prep
%setup -q -n %{module}-%{version}
%build
-%py_build --build-base py2
-%py3_build --build-base py3
+%if %{with python2}
+%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
%install
rm -rf $RPM_BUILD_ROOT
-%py_build \
- --build-base py2 \
- install \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
-
-%py3_build \
- --build-base py3 \
- install \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
+%if %{with python2}
+%py_install
%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
%doc CHANGES.txt README.txt
@@ -73,7 +98,9 @@ rm -rf $RPM_BUILD_ROOT
%if "%{py_ver}" > "2.4"
%{py_sitedir}/coverage-%{version}*.egg-info
%endif
+%endif
+%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
%doc CHANGES.txt README.txt
@@ -84,3 +111,4 @@ rm -rf $RPM_BUILD_ROOT
%{py3_sitedir}/%{module}/__pycache__
%{py3_sitedir}/%{module}/htmlfiles
%{py3_sitedir}/*.egg-info
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-coverage.git/commitdiff/89c96ed0eafe4379da7566c3fecc1d1020b051b4
More information about the pld-cvs-commit
mailing list