]> git.pld-linux.org Git - packages/python-configobj.git/blob - python-configobj.spec
d4b36990f0764b3d3d39949e05efc04fe9a3fafe
[packages/python-configobj.git] / python-configobj.spec
1 # NOTE:
2 # Pollutes module namespace by
3 # %{py_sitescriptdir}/_version.py*
4
5 #
6 # Conditional build:
7 %bcond_without  python2 # CPython 2.x module
8 %bcond_without  python3 # CPython 3.x module
9
10 %define         module          configobj
11 %define         egg_name        configobj
12 Summary:        Reading and writing config files
13 Summary(pl.UTF-8):      Odczyt i zapis plików konfiguracyjnych
14 Name:           python-configobj
15 Version:        5.0.6
16 Release:        2
17 License:        MIT
18 Group:          Libraries/Python
19 ## Source0:     https://github.com/DiffSK/configobj/archive/%{version}.tar.gz
20 Source0:        https://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
21 # Source0-md5:  e472a3a1c2a67bb0ec9b5d54c13a47d6
22 URL:            https://github.com/DiffSK/configobj
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.714
25 %if %{with python2}
26 BuildRequires:  python-modules
27 BuildRequires:  python-setuptools
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules
31 BuildRequires:  python3-setuptools
32 %endif
33 Requires:       python-modules
34 Requires:       python-six
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Reading and writing config files.
40
41 %description -l pl.UTF-8
42 Odczyt i zapis plików konfiguracyjnych.
43
44 %package -n python3-%{module}
45 Summary:        Reading and writing config files
46 Summary(pl.UTF-8):      Odczyt i zapis plików konfiguracyjnych
47 Group:          Libraries/Python
48 Requires:       python3-modules
49
50 %description -n python3-%{module}
51 Reading and writing config files.
52
53 %description  -n python3-%{module} -l pl.UTF-8
54 Odczyt i zapis plików konfiguracyjnych.
55
56 %prep
57 %setup -q -n configobj-%{version}
58
59 %build
60 %if %{with python2}
61 %py_build
62 %endif
63
64 %if %{with python3}
65 %py3_build
66 %endif
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 %if %{with python2}
71 %py_install
72 %py_postclean
73
74 # Seems not be needed:
75 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/validate.py*
76 %endif
77
78 %if %{with python3}
79 %py3_install
80 # Seems not be needed:
81 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/validate.py
82 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/__pycache__/validate.*
83 %endif
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %files
90 %defattr(644,root,root,755)
91 %{py_sitescriptdir}/%{module}.py[co]
92 # Import error without _version.py
93 %{py_sitescriptdir}/_version.py[co]
94 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
95 %endif
96
97 %if %{with python3}
98 %files -n python3-%{module}
99 %defattr(644,root,root,755)
100 %{py3_sitescriptdir}/%{module}.py
101 %{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
102 # Import error without _version.py
103 %{py3_sitescriptdir}/_version.py
104 %{py3_sitescriptdir}/__pycache__/_version.*.pyc
105 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
106 %endif
This page took 0.128678 seconds and 2 git commands to generate.