[packages/python-regex] - updated to 2020.11.13
qboosh
qboosh at pld-linux.org
Fri Feb 5 21:45:13 CET 2021
commit 1154056075219337ac0a1d15952ddf16db8c4d1e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Feb 5 21:45:38 2021 +0100
- updated to 2020.11.13
python-regex.spec | 102 ++++++++++++++++++++++++++----------------------------
1 file changed, 50 insertions(+), 52 deletions(-)
---
diff --git a/python-regex.spec b/python-regex.spec
index 6b56bae..780f76e 100644
--- a/python-regex.spec
+++ b/python-regex.spec
@@ -1,89 +1,95 @@
-
+#
# Conditional build:
-%bcond_with doc # don't build doc
-%bcond_without tests # do not perform "make test"
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module regex
Summary: Alternative regular expression module, to replace re
-Summary(pl.UTF-8): Alternatywny modułu wyrażeń regularnych w stosunku do oryginalnego re
+Summary(pl.UTF-8): Moduł wyrażeń regularnych alternatywny dla oryginalnego re
Name: python-%{module}
-Version: 2018.02.21
-Release: 3
-License: PSF
+Version: 2020.11.13
+Release: 1
+License: PSF, Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/regex/
Source0: https://files.pythonhosted.org/packages/source/r/regex/%{module}-%{version}.tar.gz
-# Source0-md5: 81c128915267f59738b2ac5757b8a460
+# Source0-md5: 4310bfc300d49224476fcd032a8ce5f7
URL: https://bitbucket.org/mrabarnett/mrab-regex
BuildRequires: rpm-pythonprov
-# for the py_build, py_install macros
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
-BuildRequires: python-devel
+BuildRequires: python-devel >= 1:2.7
BuildRequires: python-setuptools
%endif
%if %{with python3}
-BuildRequires: python3-devel
+BuildRequires: python3-devel >= 1:3.6
BuildRequires: python3-setuptools
%endif
-Requires: python-modules
+Requires: python-modules >= 1:2.7
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
+Alternative regular expression module, to replace re.
%description -l pl.UTF-8
+Moduł wyrażeń regularnych alternatywny dla oryginalnego re.
%package -n python3-%{module}
Summary: Alternative regular expression module, to replace re
-Summary(pl.UTF-8): Alternatywny modułu wyrażeń regularnych w stosunku do oryginalnego re
+Summary(pl.UTF-8): Moduł wyrażeń regularnych alternatywny dla oryginalnego re
Group: Libraries/Python
-Requires: python3-modules
+Requires: python3-modules >= 1:3.6
%description -n python3-%{module}
+Alternative regular expression module, to replace re.
%description -n python3-%{module} -l pl.UTF-8
-
-
-%package apidocs
-Summary: %{module} API documentation
-Summary(pl.UTF-8): Dokumentacja API %{module}
-Group: Documentation
-
-%description apidocs
-API documentation for %{module}.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API %{module}.
+Moduł wyrażeń regularnych alternatywny dla oryginalnego re.
%prep
%setup -q -n %{module}-%{version}
%build
%if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+# directory with test_regex.py must not contain regex*
+install -d tests_2
+ln regex_2/test_regex.py tests_2/test_regex.py
+PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
+%{__python} tests_2/test_regex.py
+%endif
%endif
%if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+# directory with test_regex.py must not contain regex*
+install -d tests_3
+ln regex_3/test_regex.py tests_3/test_regex.py
+PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
+%{__python3} tests_3/test_regex.py
%endif
-
-%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
%endif
%install
rm -rf $RPM_BUILD_ROOT
+
%if %{with python2}
%py_install
+
%py_postclean
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/regex/test_regex.py*
%endif
%if %{with python3}
%py3_install
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/regex/test_regex.py \
+ $RPM_BUILD_ROOT%{py3_sitedir}/regex/__pycache__/test_regex.*
%endif
%clean
@@ -92,28 +98,20 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc docs README
-%{py_sitedir}/_%{module}_core.py[co]
-%{py_sitedir}/%{module}.py[co]
-%{py_sitedir}/test_%{module}.py[co]
-%attr(755,root,root) %{py_sitedir}/_%{module}.so
-%{py_sitedir}/%{module}-*-py*.egg-info
+%doc LICENSE.txt README.rst docs/Features.html
+%dir %{py_sitedir}/regex
+%attr(755,root,root) %{py_sitedir}/regex/_regex.so
+%{py_sitedir}/regex/*.py[co]
+%{py_sitedir}/%{module}-%{version}-py*.egg-info
%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc docs README
-%{py3_sitedir}/%{module}.py
-%{py3_sitedir}/test_%{module}.py
-%{py3_sitedir}/_%{module}_core.py
-%%attr(755,root,root) %{py3_sitedir}/_%{module}.*.so
-%{py3_sitedir}/__pycache__/*
-%{py3_sitedir}/%{module}-*-py*.egg-info
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc docs/_build/html/*
+%doc LICENSE.txt README.rst docs/Features.html
+%dir %{py3_sitedir}/regex
+%attr(755,root,root) %{py3_sitedir}/regex/_regex.cpython-*.so
+%{py3_sitedir}/regex/*.py
+%{py3_sitedir}/regex/__pycache__
+%{py3_sitedir}/%{module}-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-regex.git/commitdiff/1154056075219337ac0a1d15952ddf16db8c4d1e
More information about the pld-cvs-commit
mailing list