pyp2rpm 3.3.5-4 (znver1;i686;aarch64;x86_64) 2020-13410
-9999

Status rejected
Submitter itchka [@T] compuserve.com
Platform rolling
Repository main
URL https://abf.openmandriva.org/build_lists/927999
Packages
pyp2rpm-3.3.5-4.znver1.source
pyp2rpm-3.3.5-4.znver1.binary
pyp2rpm-3.3.5-4.i686.source
pyp2rpm-3.3.5-4.i686.binary
pyp2rpm-3.3.5-4.aarch64.binary
pyp2rpm-3.3.5-4.aarch64.source
pyp2rpm-3.3.5-4.x86_64.source
pyp2rpm-3.3.5-4.x86_64.binary
Build Date 2020-12-29 13:45:27 +0000 UTC
Last Updated 2021-01-04 04:24:59.803436645 +0000 UTC
$ git show --format=fuller --patch-with-stat --summary 79625074b04d642eb3fd794b47f47673017319e2

commit 79625074b04d642eb3fd794b47f47673017319e2
Author:     Colin <itchka@compuserve.com>
AuthorDate: Tue Dec 29 13:39:11 2020 +0000
Commit:     Colin <itchka@compuserve.com>
CommitDate: Tue Dec 29 13:39:11 2020 +0000

    Fix manpage
    Change code to recognise OpenMandriva template as default.
---
 add-openmandriva.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++
 pyp2rpm.spec           |  3 ++-
 2 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 add-openmandriva.patch

diff --git a/add-openmandriva.patch b/add-openmandriva.patch
new file mode 100644
index 0000000..b47e410
--- /dev/null
+++ b/add-openmandriva.patch
@@ -0,0 +1,56 @@
+diff --git a/pyp2rpm/convertor.py b/pyp2rpm/convertor.py
+index 7a01ad7..8a419b9 100644
+--- a/pyp2rpm/convertor.py
++++ b/pyp2rpm/convertor.py
+@@ -224,7 +224,8 @@ class Convertor(object):
+             name_convertor.NameConvertor.distro = self.distro
+             if self.autonc or (self.autonc is None and
+                 (self.distro == 'fedora' or
+-                 self.distro == 'mageia')):
++                 self.distro == 'mageia' or
++                 self.distro == 'openmandriva')):
+                 logger.debug("Using AutoProvidesNameConvertor to convert "
+                              "names of the packages.")
+                 self._name_convertor = name_convertor.AutoProvidesNameConvertor(
+diff --git a/pyp2rpm/name_convertor.py b/pyp2rpm/name_convertor.py
+index 0152bc9..9fa4407 100644
+--- a/pyp2rpm/name_convertor.py
++++ b/pyp2rpm/name_convertor.py
+@@ -106,6 +106,11 @@ class NameConvertor(object):
+         logger.debug('Rpmized name of {0}: {1}.'.format(name, rpmized_name))
+         return NameConvertor.rpm_versioned_name(rpmized_name, python_version)
+ 
++        if self.distro == 'openmandriva':
++            rpmized_name = rpmized_name.lower()
++        logger.debug('Rpmized name of {0}: {1}.'.format(name, rpmized_name))
++        return NameConvertor.rpm_versioned_name(rpmized_name, python_version)
++
+     def base_name(self, name):
+         """Removes any python prefixes of suffixes from name if present."""
+         base_name = name.replace('.', "-")
+diff --git a/pyp2rpm/settings.py b/pyp2rpm/settings.py
+index 5e5f5f2..935582b 100644
+--- a/pyp2rpm/settings.py
++++ b/pyp2rpm/settings.py
+@@ -1,17 +1,18 @@
+ from pyp2rpm import utils
+ 
+-DEFAULT_TEMPLATE = 'fedora'
++DEFAULT_TEMPLATE = 'openmandriva'
+ DEFAULT_PYTHON_VERSIONS = {
+     'fedora': ['3'],
+     'epel7': ['2', '3'],
+     'epel6': ['2'],
+     'mageia': ['3'],
+-    'pld': ['2', '3']
++    'pld': ['2', '3'],
++    'openmandriva': ['3']
+ }
+ DEFAULT_PYTHON_VERSION = DEFAULT_PYTHON_VERSIONS[DEFAULT_TEMPLATE][0]
+ DEFAULT_PKG_SOURCE = 'pypi'
+ DEFAULT_METADATA_SOURCE = 'pypi'
+-DEFAULT_DISTRO = 'fedora'
++DEFAULT_DISTRO = 'openmandriva'
+ DEFAULT_PKG_SAVE_PATH = utils.get_default_save_path()
+ KNOWN_DISTROS = DEFAULT_PYTHON_VERSIONS.keys()
+ ARCHIVE_SUFFIXES = ['.tar', '.tgz', '.tar.gz', '.tar.bz2',
diff --git a/pyp2rpm.spec b/pyp2rpm.spec
index 0b53d2a..ddbadf0 100644
--- a/pyp2rpm.spec
+++ b/pyp2rpm.spec
@@ -2,7 +2,7 @@
 
 Name:           pyp2rpm
 Version:        3.3.5
-Release:        3
+Release:        4
 Group:          Development/Python
 Summary:        Convert Python packages to RPM SPECFILES
 
@@ -10,6 +10,7 @@ License:        MIT
 URL:            https://github.com/fedora-python/pyp2rpm
 Source0:        https://pypi.python.org/packages/89/83/efcc943c2aa19cb348433b08dcd7a055e58bb4db224d41769b2a33968949/pyp2rpm-%{version}.tar.gz
 Patch0:         add-openmandriva-spec-template.patch
+Patch1:         add-openmandriva.patch
 BuildArch:      noarch
  
 BuildRequires:  python-devel
Not Available

itchka [@T] compuserve.comSuperceded1424d 17hrs
benbullard79 [@T] cox.netNo Comment.1421d 00hrs