commit b712a5fd011ca16ced9b2a55e13ab936325e7535
Author: Jakub Bogusz <[email protected]>
Date:   Mon Feb 29 17:31:03 2016 +0100

    - updated to 1.3.7
    - updated python macros usage

 python-nose.spec | 57 ++++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 37 insertions(+), 20 deletions(-)
---
diff --git a/python-nose.spec b/python-nose.spec
index e31a7d3..83461fb 100644
--- a/python-nose.spec
+++ b/python-nose.spec
@@ -1,21 +1,27 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+#
 %define                module  nose
 Summary:       A unittest extension with automatic discovery, simplified 
authoring, and output capture
 Summary(pl.UTF-8):     Rozszerzenie testów jednostkowych z automatycznym 
wykrywaniem, prostym tworzeniem i przechwytywaniem wyjścia
 Name:          python-%{module}
-Version:       1.3.6
-Release:       4
+Version:       1.3.7
+Release:       1
 License:       LGPL v2.1
 Group:         Libraries/Python
+#Source0Download:      https://pypi.python.org/pypi/nose
 Source0:       
https://pypi.python.org/packages/source/n/nose/%{module}-%{version}.tar.gz
-# Source0-md5: 0ca546d81ca8309080fc80cb389e7a16
+# Source0-md5: 4d3ad0ff07b61373d2cefc89c5d0b20b
 URL:           https://pypi.python.org/pypi/nose
-BuildRequires: rpmbuild(macros) >= 1.710
 BuildRequires: python-devel >= 1:2.5
 BuildRequires: python-devel-tools >= 1:2.5
 BuildRequires: python-setuptools >= 0.6-0.c5
 BuildRequires: python3-devel
-BuildRequires: python3-distribute
+BuildRequires: python3-setuptools
 BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
 Requires:      python-devel-tools >= 1:2.5
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -64,38 +70,45 @@ opcjonalnie przedstawia raport pokrycia testów.
 %setup -qn %{module}-%{version}
 
 %build
-%py_build --build-base py2
-%py3_build --build-base py3
+%if %{with pyhton2}
+%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
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
 
-%py3_build \
-       --build-base py3 \
-       install \
-       --root=$RPM_BUILD_ROOT \
-       --optimize=2
+%if %{with python3}
+%py3_install
+%endif
 
-mv $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
+%{__mv} $RPM_BUILD_ROOT%{_prefix}/man $RPM_BUILD_ROOT%{_datadir}
 for v in %{py_ver} %{py3_ver} ; do
        cp -p $RPM_BUILD_ROOT%{_mandir}/man1/nosetests.1 
$RPM_BUILD_ROOT%{_mandir}/man1/nosetests-${v}.1
 done
 
+%if %{with python2}
 # default to python2 for now
 ln -sf nosetests-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/nosetests
 echo '.so nosetests-%{py_ver}.1' > $RPM_BUILD_ROOT%{_mandir}/man1/nosetests.1
-
-%py_postclean
+%else
+ln -sf nosetests-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/nosetests
+echo '.so nosetests-%{py3_ver}.1' > $RPM_BUILD_ROOT%{_mandir}/man1/nosetests.1
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGELOG NEWS README.txt
@@ -105,10 +118,14 @@ rm -rf $RPM_BUILD_ROOT
 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %{_mandir}/man1/nosetests-%{py_ver}.1*
 %{_mandir}/man1/nosetests.1*
+%endif
 
+%if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
+%doc AUTHORS CHANGELOG NEWS README.txt
 %attr(755,root,root) %{_bindir}/nosetests-%{py3_ver}
 %{py3_sitescriptdir}/%{module}
 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
 %{_mandir}/man1/nosetests-%{py3_ver}.1*
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-nose.git/commitdiff/b712a5fd011ca16ced9b2a55e13ab936325e7535

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to