]> git.pld-linux.org Git - packages/python-parse.git/blob - python-parse.spec
- new
[packages/python-parse.git] / python-parse.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        parse() - the opposite of format()
8 Summary(pl.UTF-8):      parse() - odwrotność format()
9 Name:           python-parse
10 # keep 1.12.x here for python2 support
11 Version:        1.12.1
12 Release:        1
13 License:        MIT
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/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules >= 1:3.4
25 BuildRequires:  python3-setuptools
26 %endif
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
29 Requires:       python-modules >= 1:2.7
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Parse strings using a specification based on the Python format()
35 syntax.
36
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().
40
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
46
47 %description -n python3-parse
48 Parse strings using a specification based on the Python format()
49 syntax.
50
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().
54
55 %prep
56 %setup -q -n parse-%{version}
57
58 %build
59 %if %{with python2}
60 %py_build
61
62 %if %{with tests}
63 %{__python} test_parse.py
64 %endif
65 %endif
66
67 %if %{with python3}
68 %py3_build
69
70 %if %{with tests}
71 %{__python3} test_parse.py
72 %endif
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python2}
79 %py_install
80
81 %py_postclean
82 %endif
83
84 %if %{with python3}
85 %py3_install
86 %endif
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %files
93 %defattr(644,root,root,755)
94 %doc README.rst
95 %{py_sitescriptdir}/parse.py[co]
96 %{py_sitescriptdir}/parse-%{version}-py*.egg-info
97 %endif
98
99 %if %{with python3}
100 %files -n python3-parse
101 %defattr(644,root,root,755)
102 %doc README.rst
103 %{py3_sitescriptdir}/parse.py
104 %{py3_sitescriptdir}/__pycache__/parse.cpython-*.py[co]
105 %{py3_sitescriptdir}/parse-%{version}-py*.egg-info
106 %endif
This page took 0.062301 seconds and 3 git commands to generate.