[packages/pyp2rpm] - build with python 3 - rediff patches
baggins
baggins at pld-linux.org
Sat Mar 6 21:07:39 CET 2021
commit 45c8ad12b7081703d9b3da390166ab4601767251
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat Mar 6 21:07:11 2021 +0100
- build with python 3
- rediff patches
default-distro.patch | 9 +++++----
default-savepath.patch | 7 ++++---
no-rpmdev-packager.patch | 9 +++++----
pyp2rpm.spec | 29 +++++++++++++++--------------
4 files changed, 29 insertions(+), 25 deletions(-)
---
diff --git a/pyp2rpm.spec b/pyp2rpm.spec
index 1fae2e9..d55d97b 100644
--- a/pyp2rpm.spec
+++ b/pyp2rpm.spec
@@ -16,6 +16,7 @@ Patch2: default-distro.patch
URL: https://github.com/fedora-python/pyp2rpm
BuildRequires: python3-flexmock >= 0.9.3
BuildRequires: python3-setuptools
+BuildRequires: python3-wheel
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with tests}
@@ -42,7 +43,7 @@ information though).
%patch2 -p1
%build
-%py_build
+%py3_build
%if %{with tests}
PYTHONPATH=$(pwd) py.test-3
@@ -50,8 +51,7 @@ PYTHONPATH=$(pwd) py.test-3
%install
rm -rf $RPM_BUILD_ROOT
-%py_install
-%py_postclean
+%py3_install
%clean
rm -rf $RPM_BUILD_ROOT
@@ -60,14 +60,15 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc README.md LICENSE
%attr(755,root,root) %{_bindir}/pyp2rpm
-%dir %{py_sitescriptdir}/%{name}
-%{py_sitescriptdir}/%{name}/*.py[co]
-%{py_sitescriptdir}/%{name}/command
-%dir %{py_sitescriptdir}/%{name}/templates
-%{py_sitescriptdir}/%{name}/templates/epel6.spec
-%{py_sitescriptdir}/%{name}/templates/epel7.spec
-%{py_sitescriptdir}/%{name}/templates/fedora.spec
-%{py_sitescriptdir}/%{name}/templates/macros.spec
-%{py_sitescriptdir}/%{name}/templates/mageia.spec
-%{py_sitescriptdir}/%{name}/templates/pld.spec
-%{py_sitescriptdir}/%{name}-%{version}-py*.egg-info
+%dir %{py3_sitescriptdir}/%{name}
+%{py3_sitescriptdir}/%{name}/__pycache__
+%{py3_sitescriptdir}/%{name}/*.py
+%{py3_sitescriptdir}/%{name}/command
+%dir %{py3_sitescriptdir}/%{name}/templates
+%{py3_sitescriptdir}/%{name}/templates/epel6.spec
+%{py3_sitescriptdir}/%{name}/templates/epel7.spec
+%{py3_sitescriptdir}/%{name}/templates/fedora.spec
+%{py3_sitescriptdir}/%{name}/templates/macros.spec
+%{py3_sitescriptdir}/%{name}/templates/mageia.spec
+%{py3_sitescriptdir}/%{name}/templates/pld.spec
+%{py3_sitescriptdir}/%{name}-%{version}-py*.egg-info
diff --git a/default-distro.patch b/default-distro.patch
index 1c73862..21f8c9c 100644
--- a/default-distro.patch
+++ b/default-distro.patch
@@ -1,14 +1,15 @@
---- pyp2rpm-3.3.0/pyp2rpm/settings.py~ 2017-12-14 17:50:37.000000000 +0200
-+++ pyp2rpm-3.3.0/pyp2rpm/settings.py 2018-02-04 14:50:17.285186784 +0200
+diff -urNp -x '*.orig' pyp2rpm-3.3.2.org/pyp2rpm/settings.py pyp2rpm-3.3.2/pyp2rpm/settings.py
+--- pyp2rpm-3.3.2.org/pyp2rpm/settings.py 2018-03-21 14:54:40.000000000 +0100
++++ pyp2rpm-3.3.2/pyp2rpm/settings.py 2021-03-06 21:01:41.556267070 +0100
@@ -1,6 +1,6 @@
from pyp2rpm import utils
-DEFAULT_TEMPLATE = 'fedora'
+DEFAULT_TEMPLATE = 'pld'
DEFAULT_PYTHON_VERSIONS = {
- 'fedora': ['3', '2'],
+ 'fedora': ['3'],
'epel7': ['2', '3'],
-@@ -11,7 +11,7 @@
+@@ -11,7 +11,7 @@ DEFAULT_PYTHON_VERSIONS = {
DEFAULT_PYTHON_VERSION = DEFAULT_PYTHON_VERSIONS[DEFAULT_TEMPLATE][0]
DEFAULT_PKG_SOURCE = 'pypi'
DEFAULT_METADATA_SOURCE = 'pypi'
diff --git a/default-savepath.patch b/default-savepath.patch
index db466e4..6249c97 100644
--- a/default-savepath.patch
+++ b/default-savepath.patch
@@ -1,6 +1,7 @@
---- pyp2rpm-3.3.0/pyp2rpm/utils.py~ 2017-12-14 17:50:37.000000000 +0200
-+++ pyp2rpm-3.3.0/pyp2rpm/utils.py 2018-02-04 14:47:29.799743953 +0200
-@@ -163,7 +163,6 @@
+diff -urNp -x '*.orig' pyp2rpm-3.3.2.org/pyp2rpm/utils.py pyp2rpm-3.3.2/pyp2rpm/utils.py
+--- pyp2rpm-3.3.2.org/pyp2rpm/utils.py 2018-03-21 14:54:40.000000000 +0100
++++ pyp2rpm-3.3.2/pyp2rpm/utils.py 2021-03-06 21:01:41.346267537 +0100
+@@ -163,7 +163,6 @@ def get_default_save_path():
else:
save_path = rpm_eval(macro)
if not save_path:
diff --git a/no-rpmdev-packager.patch b/no-rpmdev-packager.patch
index 6cf1c9f..9adca2e 100644
--- a/no-rpmdev-packager.patch
+++ b/no-rpmdev-packager.patch
@@ -1,6 +1,7 @@
---- pyp2rpm-3.3.0/pyp2rpm/package_data.py~ 2018-02-04 14:48:00.000000000 +0200
-+++ pyp2rpm-3.3.0/pyp2rpm/package_data.py 2018-02-04 14:49:12.598463752 +0200
-@@ -2,6 +2,7 @@
+diff -urNp -x '*.orig' pyp2rpm-3.3.2.org/pyp2rpm/package_data.py pyp2rpm-3.3.2/pyp2rpm/package_data.py
+--- pyp2rpm-3.3.2.org/pyp2rpm/package_data.py 2018-03-21 14:54:40.000000000 +0100
++++ pyp2rpm-3.3.2/pyp2rpm/package_data.py 2021-03-06 21:01:41.449600641 +0100
+@@ -2,6 +2,7 @@ import subprocess
import time
import locale
import logging
@@ -8,7 +9,7 @@
from pyp2rpm import version
from pyp2rpm import utils
-@@ -90,15 +90,9 @@
+@@ -89,15 +90,9 @@ class PackageData(object):
def get_changelog_date_packager(self):
"""Returns part of the changelog entry, containing date and packager.
"""
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pyp2rpm.git/commitdiff/45c8ad12b7081703d9b3da390166ab4601767251
More information about the pld-cvs-commit
mailing list