]> git.pld-linux.org Git - packages/python3-regex.git/blob - python3-regex.spec
cb13587b80eb1989d57b8e084ce7481c034ceb2b
[packages/python3-regex.git] / python3-regex.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4
5 %define         module  regex
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}
9 Version:        2022.3.15
10 Release:        2
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)
23
24 %description
25 Alternative regular expression module, to replace re.
26
27 %description -l pl.UTF-8
28 Moduł wyrażeń regularnych alternatywny dla oryginalnego re.
29
30 %prep
31 %setup -q -n %{module}-%{version}
32
33 %build
34 %py3_build
35
36 %if %{with tests}
37 # directory with test_regex.py must not contain regex*
38 install -d tests_3
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
42 %endif
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46
47 %py3_install
48
49 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/regex/test_regex.py \
50         $RPM_BUILD_ROOT%{py3_sitedir}/regex/__pycache__/test_regex.*
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %files
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
This page took 0.057831 seconds and 2 git commands to generate.