Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| d12250bec3 | |||
| 8ad3bd3925 |
68
python-rfc3339-validator-no-six.patch
Normal file
68
python-rfc3339-validator-no-six.patch
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
Index: rfc3339_validator-0.1.4/rfc3339_validator.egg-info/requires.txt
|
||||||
|
===================================================================
|
||||||
|
--- rfc3339_validator-0.1.4.orig/rfc3339_validator.egg-info/requires.txt
|
||||||
|
+++ rfc3339_validator-0.1.4/rfc3339_validator.egg-info/requires.txt
|
||||||
|
@@ -1 +0,0 @@
|
||||||
|
-six
|
||||||
|
Index: rfc3339_validator-0.1.4/rfc3339_validator.py
|
||||||
|
===================================================================
|
||||||
|
--- rfc3339_validator-0.1.4.orig/rfc3339_validator.py
|
||||||
|
+++ rfc3339_validator-0.1.4/rfc3339_validator.py
|
||||||
|
@@ -6,11 +6,9 @@ __version__ = '0.1.4'
|
||||||
|
|
||||||
|
import re
|
||||||
|
import calendar
|
||||||
|
-import six
|
||||||
|
|
||||||
|
RFC3339_REGEX_FLAGS = 0
|
||||||
|
-if six.PY3:
|
||||||
|
- RFC3339_REGEX_FLAGS |= re.ASCII
|
||||||
|
+RFC3339_REGEX_FLAGS |= re.ASCII
|
||||||
|
|
||||||
|
RFC3339_REGEX = re.compile(r"""
|
||||||
|
^
|
||||||
|
Index: rfc3339_validator-0.1.4/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- rfc3339_validator-0.1.4.orig/setup.py
|
||||||
|
+++ rfc3339_validator-0.1.4/setup.py
|
||||||
|
@@ -8,9 +8,7 @@ from setuptools import setup, find_packa
|
||||||
|
with open('README.md') as readme_file:
|
||||||
|
readme = readme_file.read()
|
||||||
|
|
||||||
|
-requirements = [
|
||||||
|
- 'six',
|
||||||
|
-]
|
||||||
|
+requirements = []
|
||||||
|
|
||||||
|
setup_requirements = []
|
||||||
|
|
||||||
|
Index: rfc3339_validator-0.1.4/tests/test_rfc3339_validator.py
|
||||||
|
===================================================================
|
||||||
|
--- rfc3339_validator-0.1.4.orig/tests/test_rfc3339_validator.py
|
||||||
|
+++ rfc3339_validator-0.1.4/tests/test_rfc3339_validator.py
|
||||||
|
@@ -8,7 +8,6 @@ from rfc3339_validator import validate_r
|
||||||
|
import strict_rfc3339
|
||||||
|
from hypothesis import given, settings, example
|
||||||
|
import hypothesis.strategies as st
|
||||||
|
-import six
|
||||||
|
|
||||||
|
# It is supposed to be used to generate both valid and invalid dates
|
||||||
|
RFC3339_REGEX = r"""
|
||||||
|
@@ -30,16 +29,11 @@ RFC3339_REGEX = r"""
|
||||||
|
)
|
||||||
|
$
|
||||||
|
"""
|
||||||
|
-if six.PY3:
|
||||||
|
- RFC3339_REGEX_FLAG = re.X | re.A
|
||||||
|
-else:
|
||||||
|
- RFC3339_REGEX_FLAG = re.X
|
||||||
|
+RFC3339_REGEX_FLAG = re.X | re.A
|
||||||
|
RFC3339_REGEX_ASCII = re.compile(RFC3339_REGEX, RFC3339_REGEX_FLAG)
|
||||||
|
RFC3339_REGEX_UNICODE = re.compile(RFC3339_REGEX, re.X)
|
||||||
|
|
||||||
|
|
||||||
|
-@pytest.mark.skipif(six.PY2, reason="Requires python3 or higher, because strftime on python 2 only supports dates "
|
||||||
|
- "newer than 1900")
|
||||||
|
@given(datetime_str=st.datetimes().filter(lambda d: d.year > 1000).map(lambda d: d.strftime("%Y-%m-%dT%H:%M:%SZ")))
|
||||||
|
def test_valid_dates(datetime_str):
|
||||||
|
assert validate_rfc3339(datetime_str)
|
||||||
@@ -1,4 +1,11 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 5 09:53:54 UTC 2023 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not require six
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/naimetti/rfc3339-validator/issues/11
|
||||||
|
+ python-rfc3339-validator-no-six.patch
|
||||||
|
|
||||||
Fri Apr 21 12:33:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Apr 21 12:33:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
- add sle15_python_module_pythons (jsc#PED-68)
|
- add sle15_python_module_pythons (jsc#PED-68)
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-rfc3339-validator
|
Name: python-rfc3339-validator
|
||||||
Version: 0.1.4
|
Version: 0.1.4
|
||||||
@@ -25,15 +24,15 @@ Summary: A pure python RFC3339 validator
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/naimetti/rfc3339-validator
|
URL: https://github.com/naimetti/rfc3339-validator
|
||||||
Source: https://files.pythonhosted.org/packages/source/r/rfc3339_validator/rfc3339_validator-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/r/rfc3339_validator/rfc3339_validator-%{version}.tar.gz
|
||||||
|
# https://github.com/naimetti/rfc3339-validator/issues/11
|
||||||
|
Patch0: python-rfc3339-validator-no-six.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-six
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module hypothesis}
|
BuildRequires: %{python_module hypothesis}
|
||||||
BuildRequires: %{python_module pytest >= 3}
|
BuildRequires: %{python_module pytest >= 3}
|
||||||
BuildRequires: %{python_module six}
|
|
||||||
BuildRequires: %{python_module strict-rfc3339}
|
BuildRequires: %{python_module strict-rfc3339}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -42,7 +41,7 @@ BuildRequires: %{python_module strict-rfc3339}
|
|||||||
A pure python RFC3339 validator
|
A pure python RFC3339 validator
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n rfc3339_validator-%{version}
|
%autosetup -p1 -n rfc3339_validator-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|||||||
Reference in New Issue
Block a user