3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: parse() - the opposite of format()
8 Summary(pl.UTF-8): parse() - odwrotność format()
10 # keep 1.12.x here for python2 support
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/parse/
16 Source0: https://files.pythonhosted.org/packages/source/p/parse/parse-%{version}.tar.gz
17 # Source0-md5: 8fc634769f1d841f14a52dd731ca447a
18 URL: https://pypi.org/project/parse/
20 BuildRequires: python-modules >= 1:2.7
21 BuildRequires: python-setuptools
24 BuildRequires: python3-modules >= 1:3.4
25 BuildRequires: python3-setuptools
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.714
29 Requires: python-modules >= 1:2.7
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Parse strings using a specification based on the Python format()
37 %description -l pl.UTF-8
38 Rozkład łańcuchów znaków przy użyciu specyfikacji opartej na składni
39 pythonowej metody format().
41 %package -n python3-parse
42 Summary: parse() - the opposite of format()
43 Summary(pl.UTF-8): parse() - odwrotność format()
44 Group: Libraries/Python
45 Requires: python3-modules >= 1:3.4
47 %description -n python3-parse
48 Parse strings using a specification based on the Python format()
51 %description -n python3-parse -l pl.UTF-8
52 Rozkład łańcuchów znaków przy użyciu specyfikacji opartej na składni
53 pythonowej metody format().
56 %setup -q -n parse-%{version}
63 %{__python} test_parse.py
71 %{__python3} test_parse.py
76 rm -rf $RPM_BUILD_ROOT
89 rm -rf $RPM_BUILD_ROOT
93 %defattr(644,root,root,755)
95 %{py_sitescriptdir}/parse.py[co]
96 %{py_sitescriptdir}/parse-%{version}-py*.egg-info
100 %files -n python3-parse
101 %defattr(644,root,root,755)
103 %{py3_sitescriptdir}/parse.py
104 %{py3_sitescriptdir}/__pycache__/parse.cpython-*.py[co]
105 %{py3_sitescriptdir}/parse-%{version}-py*.egg-info