15
0
forked from pool/python-exrex

- add fix-setup-encoding.patch to fix encoding issues in setup.py

- Skip Python 2.
- run the tests.
- remove add-license.patch, included in upstream

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exrex?expand=0&rev=13
This commit is contained in:
2021-02-25 20:11:51 +00:00
committed by Git OBS Bridge
parent eeb88b45f0
commit 846ca81359
3 changed files with 32 additions and 3 deletions

23
fix-setup-encoding.patch Normal file
View File

@@ -0,0 +1,23 @@
From 09a1ef0962268460f66084a992fee1aff77dc141 Mon Sep 17 00:00:00 2001
From: Sebastian Wagner <wagner@cert.at>
Date: Thu, 25 Feb 2021 21:03:56 +0100
Subject: [PATCH] setup.py: declare encoding as utf-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
the ellipsis (…) causes troubles otherwise on "old" python versions as
3.6
---
setup.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.py b/setup.py
index 29c5a87..475a86f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
import io
import os
import sys

View File

@@ -1,8 +1,10 @@
-------------------------------------------------------------------
Thu Feb 25 19:25:16 UTC 2021 - Sebastian Wagner <sebix+novell.com@sebix.at>
- run the tests
- remove add-license.patch
- add fix-setup-encoding.patch to fix encoding issues in setup.py
- Skip Python 2.
- run the tests.
- remove add-license.patch, included in upstream
- Update to revision 49909345:
- Fix: added py_modules
- Fix: Typo in email address

View File

@@ -18,6 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define revision fd1e21ffc7c16fd5637a5c440224766417e840f9
%define skip_python2 1
Name: python-exrex
Version: 0.10.5+git119
Release: 0
@@ -27,6 +28,8 @@ Group: Development/Languages/Python
URL: https://github.com/asciimoo/exrex
#Source: https://files.pythonhosted.org/packages/source/e/exrex/exrex-%%{version}.tar.gz
Source: https://github.com/asciimoo/exrex/archive/%{revision}.tar.gz#/exrex-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-setup-encoding.patch
Patch0: https://github.com/asciimoo/exrex/pull/53.patch#/fix-setup-encoding.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -42,6 +45,7 @@ A command line tool and python module that generates all or random matching stri
%prep
%setup -q -n exrex-%{revision}
sed -i '1s/^#!.*//' exrex.py
%patch0 -p1
%build
%python_build
@@ -54,7 +58,7 @@ rm %{buildroot}%{_bindir}/exrex.py
%check
%{python_expand # comment
PYTHONPATH=%{buildroot}%{$python_sitelib} $python ./tests.py}
LANG=C.UTF-8 PYTHONPATH=%{buildroot}%{$python_sitelib} $python ./tests.py}
%post
%python_install_alternative exrex