3 %bcond_without tests # unit tests
6 Summary: Alternative regular expression module, to replace re
7 Summary(pl.UTF-8): Moduł wyrażeń regularnych alternatywny dla oryginalnego re
8 Name: python3-%{module}
11 License: PSF, Apache v2.0
12 Group: Libraries/Python
13 #Source0Download: https://pypi.org/simple/regex/
14 Source0: https://files.pythonhosted.org/packages/source/r/regex/%{module}-%{version}.tar.gz
15 # Source0-md5: 74f1d120a146bc5a7811ccdbfee3d42d
16 URL: https://bitbucket.org/mrabarnett/mrab-regex
17 BuildRequires: python3-devel >= 1:3.6
18 BuildRequires: python3-setuptools
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
21 Requires: python3-modules >= 1:3.6
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Alternative regular expression module, to replace re.
27 %description -l pl.UTF-8
28 Moduł wyrażeń regularnych alternatywny dla oryginalnego re.
31 %setup -q -n %{module}-%{version}
37 # directory with test_regex.py must not contain regex*
39 ln regex_3/test_regex.py tests_3/test_regex.py
40 PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
41 %{__python3} tests_3/test_regex.py
45 rm -rf $RPM_BUILD_ROOT
49 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/regex/test_regex.py \
50 $RPM_BUILD_ROOT%{py3_sitedir}/regex/__pycache__/test_regex.*
53 rm -rf $RPM_BUILD_ROOT
56 %defattr(644,root,root,755)
57 %doc LICENSE.txt README.rst docs/Features.html
58 %dir %{py3_sitedir}/regex
59 %attr(755,root,root) %{py3_sitedir}/regex/_regex.cpython-*.so
60 %{py3_sitedir}/regex/*.py
61 %{py3_sitedir}/regex/__pycache__
62 %{py3_sitedir}/%{module}-%{version}-py*.egg-info