[packages/pg_activity: 2/3] Switch to new python macros.

matkor matkor at pld-linux.org
Sun Nov 29 22:35:48 CET 2015


commit ba3901fec8232828dafc42b4df2a80c4896f83ed
Author: Mateusz Korniak <matkor at pld-linux.org>
Date:   Sun Nov 29 22:27:22 2015 +0100

    Switch to new python macros.

 pg_activity.spec | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)
---
diff --git a/pg_activity.spec b/pg_activity.spec
index 3c8892a..5e94ac3 100644
--- a/pg_activity.spec
+++ b/pg_activity.spec
@@ -24,11 +24,7 @@ Source0:	https://github.com/julmon/pg_activity/archive/v%{version}.tar.gz
 # Source0-md5:	88096354973c38761f056d04e550f58b
 URL:		https://github.com/julmon/pg_activity
 BuildRequires:	rpm-pythonprov
-# remove BR: python-devel for 'noarch' packages.
-# if py_postclean is used
-BuildRequires:	rpmbuild(macros) >= 1.219
-# if py3* macros are used
-BuildRequires:	rpmbuild(macros) >= 1.612
+BuildRequires:	rpmbuild(macros) >= 1.710
 # when using /usr/bin/env or other in-place substitutions
 #BuildRequires:	sed >= 4.0
 # when python3 present
@@ -44,7 +40,6 @@ BuildRequires:	python3-psycopg2 >= 2.2.1
 BuildRequires:	python3-setuptools
 %endif
 # Below Rs only work for main package (python2)
-#Requires:		python-libs
 Requires:	python-modules
 Requires:	python-psutil
 Requires:	python-psycopg2
@@ -91,11 +86,11 @@ cp -a "$@" py3
 
 %build
 %if %{with python2}
-%{__python} setup.py build --build-base build-2 %{?with_tests:test} --with-man
+%py_build
 %endif
 
 %if %{with python3}
-%{__python3} setup.py build --build-base build-3 %{?with_tests:test} --with-man
+%py3_build
 %endif
 
 %if %{with doc}
@@ -106,26 +101,14 @@ rm -rf _build/html/_sources
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %if %{with python2}
-%{__python} setup.py \
-	build --build-base build-2 \
-	install --skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
-
+%py_install
 %py_postclean
 %endif
-
 %if %{with python3}
-%{__python3} setup.py \
-	build --build-base build-3 \
-	install --skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+%py3_install
 %endif
 
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pg_activity.git/commitdiff/3fdbf89971829e98cef5baba56af5c38762b3c79



More information about the pld-cvs-commit mailing list