[packages/python-pyflakes] - updated to 1.1.0 - fix python3 dependency in python2 package

qboosh qboosh at pld-linux.org
Sun Mar 20 22:18:29 CET 2016


commit a329ee82d3773b103757ff9ee9346dba737ceec4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Mar 20 22:22:38 2016 +0100

    - updated to 1.1.0
    - fix python3 dependency in python2 package

 python-pyflakes.spec | 49 +++++++++++++++++++++++++++----------------------
 1 file changed, 27 insertions(+), 22 deletions(-)
---
diff --git a/python-pyflakes.spec b/python-pyflakes.spec
index a6005fb..cad236a 100644
--- a/python-pyflakes.spec
+++ b/python-pyflakes.spec
@@ -1,6 +1,6 @@
 #
 # Conditional build:
-%bcond_without	tests	# do not perform "make test"
+%bcond_without	tests	# test target
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
@@ -8,24 +8,25 @@
 Summary:	Passive checker of Python programs
 Summary(pl.UTF-8):	Pasywny program do sprawdzania programów w Pythonie
 Name:		python-%{module}
-Version:	0.9.2
-Release:	2
+Version:	1.1.0
+Release:	1
 License:	MIT
 Group:		Development/Tools
-Source0:	http://pypi.python.org/packages/source/p/pyflakes/%{module}-%{version}.tar.gz
-# Source0-md5:	f7032897353e68f6dc6210dfab39f414
+#Source0Download: https://pypi.python.org/simple/pyflakes/
+Source0:	https://pypi.python.org/packages/source/p/pyflakes/%{module}-%{version}.tar.gz
+# Source0-md5:	e0bf854cd5abd4527e149692925b82eb
 URL:		http://www.divmod.org/projects/pyflakes
 %if %{with python2}
-BuildRequires:	python-devel
-Requires:	python-modules
+BuildRequires:	python-devel >= 1:2.5
+BuildRequires:	python-modules >= 1:2.5
 %endif
-
-%{?with_tests:BuildRequires:	rpm-pythonprov}
-BuildRequires:	rpmbuild(macros) >= 1.710
 %if %{with python3}
-BuildRequires:	python3-devel
-BuildRequires:	python3-modules
+BuildRequires:	python3-devel >= 1:3.2
+BuildRequires:	python3-modules >= 1:3.2
 %endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.5
 Provides:	pyflakes = %{version}-%{release}
 Obsoletes:	pyflakes < 0.4.0-2
 BuildArch:	noarch
@@ -51,7 +52,7 @@ tylko błędów logicznych w programach; nie sprawdza stylu.
 Summary:	Passive checker of Python programs
 Summary(pl.UTF-8):	Pasywny program do sprawdzania programów w Pythonie
 Group:		Libraries/Python
-Requires:	python3-modules
+Requires:	python3-modules >= 1:3.2
 
 %description -n python3-%{module}
 Pyflakes is a simple program which checks Python source files for
@@ -74,14 +75,10 @@ tylko błędów logicznych w programach; nie sprawdza stylu.
 
 %build
 %if %{with python2}
-CC="%{__cc}" \
-CFLAGS="%{rpmcppflags} %{rpmcflags}" \
 %py_build %{?with_tests:test}
 %endif
 
 %if %{with python3}
-CC="%{__cc}" \
-CFLAGS="%{rpmcppflags} %{rpmcflags}" \
 %py3_build %{?with_tests:test}
 %endif
 
@@ -91,14 +88,21 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %py_install
 
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/pyflakes{,-2}
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/pyflakes/test
 %py_postclean
 %endif
 
 %if %{with python3}
 %py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/pyflakes{,-3}
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pyflakes/test
 %endif
 
-rm -rf $RPM_BUILD_ROOT%{py_sitescriptdir}/pyflakes/test
+%if %{with python2}
+ln -sf pyflakes-2 $RPM_BUILD_ROOT%{_bindir}/pyflakes
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -106,16 +110,17 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
+%doc AUTHORS LICENSE NEWS.txt README.rst
 %attr(755,root,root) %{_bindir}/pyflakes
+%attr(755,root,root) %{_bindir}/pyflakes-2
 %{py_sitescriptdir}/pyflakes
-%if "%{py_ver}" > "2.4"
 %{py_sitescriptdir}/pyflakes-%{version}-*.egg-info
 %endif
-%endif
 
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%attr(755,root,root) %{_bindir}/pyflakes-3
+%{py3_sitescriptdir}/pyflakes
+%{py3_sitescriptdir}/pyflakes-%{version}-py*.egg-info
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyflakes.git/commitdiff/a329ee82d3773b103757ff9ee9346dba737ceec4



More information about the pld-cvs-commit mailing list