]> git.pld-linux.org Git - packages/python-logilab-common.git/blob - python-logilab-common.spec
rebuild with python 3.10
[packages/python-logilab-common.git] / python-logilab-common.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # Python 2.x module
4 %bcond_without  python3 # Python 3.x module
5
6 %define module  logilab-common
7 Summary:        Logilab common modules
8 Summary(pl.UTF-8):      Wspólne moduły Logilab
9 Name:           python-logilab-common
10 Version:        0.63.2
11 Release:        11
12 License:        LGPL v2.1+
13 Group:          Development/Languages/Python
14 #Source0Download: https://pypi.python.org/pypi/logilab-common
15 Source0:        https://pypi.python.org/packages/source/l/logilab-common/%{module}-%{version}.tar.gz
16 # Source0-md5:  2bf4599ae1f2ccf4603ca02c5d7e798e
17 URL:            http://www.logilab.org/project/logilab-common
18 %if %{with python2}
19 BuildRequires:  python-devel
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools >= 1:7.0
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-devel
25 BuildRequires:  python3-modules >= 1:3.3
26 BuildRequires:  python3-setuptools >= 1:7.0
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 %pyrequires_eq  python-modules
31 Requires:       python-six >= 1.4.0
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 The package logilab.common contains several modules providing low
37 level functionalities shared among several Python projects developed
38 by Logilab.
39
40 %description -l pl.UTF-8
41 Pakiet logilab.common zawiera różne moduły dostarczające
42 niskopoziomową funkcjonalność wykorzystywaną przez różne pythonowe
43 projekty tworzone przez Logilab.
44
45 %package -n python3-%{module}
46 Summary:        Logilab common modules
47 Summary(pl.UTF-8):      Wspólne moduły Logilab
48 Group:          Development/Languages/Python
49 Requires:       python3-six >= 1.4.0
50
51 %description -n python3-%{module}
52 The package logilab.common contains several modules providing low
53 level functionalities shared among several Python projects developed
54 by Logilab.
55
56 %description -n python3-%{module} -l pl.UTF-8
57 Pakiet logilab.common zawiera różne moduły dostarczające
58 niskopoziomową funkcjonalność wykorzystywaną przez różne pythonowe
59 projekty tworzone przez Logilab.
60
61 %prep
62 %setup -q -n %{module}-%{version}
63
64 # drop python 2.5 egg deps
65 %{__rm} */*/*py2.5.egg
66
67 %build
68 %if %{with python2}
69 %py_build
70 %endif
71 %if %{with python3}
72 %py3_build
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python3}
79 %py3_install
80
81 touch $RPM_BUILD_ROOT%{py3_sitescriptdir}/logilab/__init__.py
82 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}/logilab/
83 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}/logilab/
84
85 mv $RPM_BUILD_ROOT%{_bindir}/pytest{,3}
86 %endif
87
88 %if %{with python2}
89 %py_install
90
91 # because some logilab's software depend on this package
92 # and some not, so they all provide the __init__.py and we
93 # have to remove it in dependent software
94 touch $RPM_BUILD_ROOT%{py_sitescriptdir}/logilab/__init__.py
95 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}/logilab/
96 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}/logilab/
97
98 %py_postclean
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 %doc ChangeLog README
108 # isn't name too generic?
109 %attr(755,root,root) %{_bindir}/pytest
110 %dir %{py_sitescriptdir}/logilab
111 %{py_sitescriptdir}/logilab/__init__.py[co]
112 %{py_sitescriptdir}/logilab/common
113 %{py_sitescriptdir}/logilab_common-%{version}-py*-nspkg.pth
114 %{py_sitescriptdir}/logilab_common-%{version}-py*.egg-info
115 %endif
116
117 %if %{with python3}
118 %files -n python3-%{module}
119 %defattr(644,root,root,755)
120 %doc ChangeLog README
121 # isn't name too generic?
122 %attr(755,root,root) %{_bindir}/pytest3
123 %{py3_sitescriptdir}/logilab
124 %{py3_sitescriptdir}/logilab_common-%{version}-py*-nspkg.pth
125 %{py3_sitescriptdir}/logilab_common-%{version}-py*.egg-info
126 %endif
This page took 0.082014 seconds and 3 git commands to generate.