]>
Commit | Line | Data |
---|---|---|
b81eefa5 | 1 | %define module template |
7170a7b1 ER |
2 | Summary: - |
3 | Summary(pl.UTF-8): - | |
b81eefa5 | 4 | Name: python-%{module} |
7170a7b1 ER |
5 | Version: _ |
6 | Release: 0.1 | |
7 | License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here) | |
8 | Group: Development/Languages/Python | |
9 | Source0: %{name}-%{version}.tar.gz | |
10 | # Source0-md5: - | |
7170a7b1 | 11 | URL: - |
dbb3e196 | 12 | # remove BR: python-devel for 'noarch' packages. |
278010a4 | 13 | BuildRequires: python-devel |
dbb3e196 | 14 | BuildRequires: python-distribute |
0a48bf0d | 15 | BuildRequires: rpm-pythonprov |
7592d76f JB |
16 | # if py_postclean is used |
17 | BuildRequires: rpmbuild(macros) >= 1.219 | |
10305643 | 18 | #Requires: python-libs |
19 | Requires: python-modules | |
7170a7b1 ER |
20 | #BuildArch: noarch |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | ||
e6f4b058 | 25 | %description -l pl.UTF-8 |
26 | ||
7170a7b1 | 27 | %prep |
641675c1 | 28 | %setup -q -n %{module}-%{version} |
7170a7b1 ER |
29 | |
30 | %build | |
46094905 ER |
31 | # CC/CFLAGS is only for arch packages - remove on noarch packages |
32 | CC="%{__cc}" \ | |
33 | CFLAGS="%{rpmcflags}" \ | |
7592d76f | 34 | %{__python} setup.py build |
7170a7b1 ER |
35 | |
36 | %install | |
37 | rm -rf $RPM_BUILD_ROOT | |
7592d76f | 38 | %{__python} setup.py install \ |
7170a7b1 ER |
39 | --optimize=2 \ |
40 | --root=$RPM_BUILD_ROOT | |
41 | ||
9a83d846 | 42 | # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages! |
e5a26a61 ER |
43 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
44 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
45 | %py_postclean | |
46 | ||
7170a7b1 ER |
47 | %clean |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
7170a7b1 ER |
50 | %files |
51 | %defattr(644,root,root,755) | |
52 | %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO | |
9a83d846 | 53 | # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages! |
e5a26a61 ER |
54 | %{py_sitedir}/*.py[co] |
55 | %attr(755,root,root) %{py_sitedir}/*.so | |
ef0b62a1 | 56 | %if "%{py_ver}" > "2.4" |
47501bae | 57 | %{py_sitedir}/TEMPLATE-*.egg-info |
ef278603 | 58 | %endif |