]> git.pld-linux.org Git - packages/python-iniconfig.git/blob - python-iniconfig.spec
5ad6be3f818936975f45aa2a553be4e895325c89
[packages/python-iniconfig.git] / python-iniconfig.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:        Brain-dead simple config-ini parsing
8 Summary(pl.UTF-8):      Bezmyślnie prosta analiza formatu config-ini
9 Name:           python-iniconfig
10 Version:        1.1.1
11 Release:        4
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/iniconfig/
15 Source0:        https://files.pythonhosted.org/packages/source/i/iniconfig/iniconfig-%{version}.tar.gz
16 # Source0-md5:  0b7f3be87481211c183eae095bcea6f1
17 URL:            https://pypi.org/project/iniconfig/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.5
20 BuildRequires:  python-setuptools >= 1:41.2.0
21 BuildRequires:  python-setuptools_scm >= 3
22 %if %{with tests}
23 BuildRequires:  python-pytest
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-setuptools >= 1:41.2.0
29 BuildRequires:  python3-setuptools_scm >= 3
30 %if %{with tests}
31 BuildRequires:  python3-pytest
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 Requires:       python-modules >= 1:2.5
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 iniconfig is a small and simple INI-file parser module.
42
43 %description -l pl.UTF-8
44 iniconfig to mały i prosty moduł parsera plików INI.
45
46 %package -n python3-iniconfig
47 Summary:        Brain-dead simple config-ini parsing
48 Summary(pl.UTF-8):      Bezmyślnie prosta analiza formatu config-ini
49 Group:          Libraries/Python
50 Requires:       python3-modules >= 1:3.2
51
52 %description -n python3-iniconfig
53 iniconfig is a small and simple INI-file parser module.
54
55 %description -n python3-iniconfig -l pl.UTF-8
56 iniconfig to mały i prosty moduł parsera plików INI.
57
58 %prep
59 %setup -q -n iniconfig-%{version}
60
61 %build
62 %if %{with python2}
63 %py_build
64
65 %if %{with tests}
66 PYTHONPATH=$(pwd)/src \
67 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
68 %{__python} -m pytest testing
69 %endif
70 %endif
71
72 %if %{with python3}
73 %py3_build
74
75 %if %{with tests}
76 PYTHONPATH=$(pwd)/src \
77 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
78 %{__python3} -m pytest testing
79 %endif
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %py_install
87
88 %py_postclean
89 %endif
90
91 %if %{with python3}
92 %py3_install
93 %endif
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %files
100 %defattr(644,root,root,755)
101 %doc CHANGELOG LICENSE README.txt example.ini
102 %{py_sitescriptdir}/iniconfig
103 %{py_sitescriptdir}/iniconfig-%{version}-py*.egg-info
104 %endif
105
106 %if %{with python3}
107 %files -n python3-iniconfig
108 %defattr(644,root,root,755)
109 %doc CHANGELOG LICENSE README.txt example.ini
110 %{py3_sitescriptdir}/iniconfig
111 %{py3_sitescriptdir}/iniconfig-%{version}-py*.egg-info
112 %endif
This page took 0.066533 seconds and 2 git commands to generate.