]> git.pld-linux.org Git - packages/python-configparser.git/blame - python-configparser.spec
- release 2
[packages/python-configparser.git] / python-configparser.spec
CommitLineData
f4b092e9
JB
1#
2# Conditional build:
0fbef234 3%bcond_without doc # Sphinx documentation
f4b092e9
JB
4%bcond_without tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
0fbef234 6%bcond_with python3 # CPython 3.x module (not needed for Python 3.7+)
f4b092e9 7
0fbef234
JB
8Summary: Updated configparser from Python 3.7 to Python 2
9Summary(pl.UTF-8): Uaktualniony configparser z Pythona 3.7 do Pythona 2
f4b092e9 10Name: python-configparser
0fbef234 11Version: 4.0.2
14704947 12Release: 2
f4b092e9
JB
13License: BSD
14Group: Libraries/Python
0fbef234 15#Source0Download: https://pypi.org/simple/configparser/
f4b092e9 16Source0: https://files.pythonhosted.org/packages/source/c/configparser/configparser-%{version}.tar.gz
0fbef234
JB
17# Source0-md5: 35926cc4b9133f1f9ca70a1fd2fdf237
18URL: https://pypi.org/project/configparser/
f4b092e9
JB
19%if %{with python2}
20BuildRequires: python >= 1:2.6
21BuildRequires: python-modules >= 1:2.6
22BuildRequires: python-setuptools
0fbef234
JB
23BuildRequires: python-setuptools_scm >= 1.15.0
24%if %{with additional_tests}
25BuildRequires: python-pytest >= 3.5
26BuildRequires: python-pytest-black-multipy
27BuildRequires: python-pytest-checkdocs >= 1.2
28BuildRequires: python-pytest-flake8
29%endif
f4b092e9
JB
30%endif
31%if %{with python3}
32BuildRequires: python3 >= 1:3.4
33BuildRequires: python3-modules >= 1:3.4
34BuildRequires: python3-setuptools
0fbef234
JB
35BuildRequires: python3-setuptools_scm >= 1.15.0
36%if %{with additional_tests}
37BuildRequires: python3-pytest >= 3.5
38BuildRequires: python3-pytest-black-multipy
39BuildRequires: python3-pytest-checkdocs >= 1.2
40BuildRequires: python3-pytest-flake8
41%endif
f4b092e9
JB
42%endif
43BuildRequires: rpm-pythonprov
44BuildRequires: rpmbuild(macros) >= 1.714
0fbef234
JB
45%if %{with doc}
46BuildRequires: python3-jaraco.packaging >= 3.2
47BuildRequires: python3-rst.linker >= 1.9
48BuildRequires: sphinx-pdg-3
49%endif
f4b092e9
JB
50Requires: python-backports
51Requires: python-modules >= 1:2.6
52BuildArch: noarch
53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55%description
56The ancient ConfigParser module available in the standard library 2.x
57has seen a major update in Python 3.2. This is a backport of those
0fbef234 58changes so that they can be used directly in Python 2.6 - 3.6.
f4b092e9
JB
59
60%description -l pl.UTF-8
61Przestarzały moduł ConfigParser dostępny w bibliotece standardowej
62Pythona 2.x został znacząco uaktualniony w Pythonie 3.2. Niniejszy
63moduł zawiera backport tych zmian, aby można ich było używać
0fbef234 64bezpośrednio w Pythonie 2.6 - 3.6.
f4b092e9
JB
65
66%package -n python3-configparser
0fbef234
JB
67Summary: Updated configparser from Python 3.7 to older Python 3
68Summary(pl.UTF-8): Uaktualniony configparser z Pythona 3.7 do starszego Pythona 3
f4b092e9
JB
69Group: Libraries/Python
70Requires: python3-modules >= 1:3.4
71
72%description -n python3-configparser
73The ancient ConfigParser module available in the standard library 2.x
74has seen a major update in Python 3.2. This is a backport of those
0fbef234 75changes so that they can be used directly in Python 2.6 - 3.6.
f4b092e9
JB
76
77%description -n python3-configparser -l pl.UTF-8
78Przestarzały moduł ConfigParser dostępny w bibliotece standardowej
79Pythona 2.x został znacząco uaktualniony w Pythonie 3.2. Niniejszy
80moduł zawiera backport tych zmian, aby można ich było używać
0fbef234
JB
81bezpośrednio w Pythonie 2.6 - 3.6.
82
83%package apidocs
84Summary: API documentation for Python configparser module
85Summary(pl.UTF-8): Dokumentacja API modułu Pythona configparser
86Group: Documentation
87
88%description apidocs
89API documentation for Python configparser module.
90
91%description apidocs -l pl.UTF-8
92Dokumentacja API modułu Pythona configparser.
f4b092e9
JB
93
94%prep
95%setup -q -n configparser-%{version}
96
97%build
98%if %{with python2}
99%py_build
0fbef234
JB
100
101%if %{with tests}
102%{__python} -m unittest discover -s src
103%endif
f4b092e9
JB
104%endif
105
106%if %{with python3}
107%py3_build
0fbef234
JB
108
109%if %{with tests}
110%{__python3} -m unittest discover -s src
111%endif
112%endif
113
114%if %{with doc}
115sphinx-build-3 -b html docs docs/_build/html
f4b092e9
JB
116%endif
117
118%install
119rm -rf $RPM_BUILD_ROOT
120
121%if %{with python2}
122%py_install
123
124%py_postclean
a9ce0343 125
b49244b8
AM
126# https://bitbucket.org/ambv/configparser/issues/21/configparser-should-not-declare-a
127# hack for: import configparser and from backports import configparser to work
02e090dd
AM
128ln -s ../../configparser.pyc $RPM_BUILD_ROOT%{py_sitescriptdir}/backports/configparser/
129ln -s ../../configparser.pyo $RPM_BUILD_ROOT%{py_sitescriptdir}/backports/configparser/
0fbef234
JB
130
131# belongs to python-backports.spec
132%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/backports/__init__.py*
f4b092e9
JB
133%endif
134
135%if %{with python3}
136%py3_install
0fbef234
JB
137
138# belongs to python-backports.spec
139%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/backports/__init__.py*
140%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/backports/__pycache__
f4b092e9
JB
141%endif
142
143%clean
144rm -rf $RPM_BUILD_ROOT
145
146%if %{with python2}
147%files
148%defattr(644,root,root,755)
149%doc README.rst configparser.rst
150%{py_sitescriptdir}/backports/configparser
151%{py_sitescriptdir}/configparser.py[co]
f4b092e9
JB
152%{py_sitescriptdir}/configparser-%{version}-py*.egg-info
153%endif
154
155%if %{with python3}
156%files -n python3-configparser
157%defattr(644,root,root,755)
158%doc README.rst configparser.rst
f4b092e9 159%{py3_sitescriptdir}/backports/configparser
0fbef234
JB
160%{py3_sitescriptdir}/configparser.py
161%{py3_sitescriptdir}/__pycache__/configparser.cpython-*.py[co]
f4b092e9
JB
162%{py3_sitescriptdir}/configparser-%{version}-py*.egg-info
163%endif
0fbef234
JB
164
165%if %{with doc}
166%files apidocs
167%defattr(644,root,root,755)
168%doc docs/_build/html/{_static,*.html,*.js}
169%endif
This page took 0.307882 seconds and 4 git commands to generate.