]>
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: - |
278010a4 | 12 | BuildRequires: python-devel |
0a48bf0d | 13 | BuildRequires: rpm-pythonprov |
7592d76f JB |
14 | # if py_postclean is used |
15 | BuildRequires: rpmbuild(macros) >= 1.219 | |
10305643 | 16 | #Requires: python-libs |
17 | Requires: python-modules | |
7170a7b1 ER |
18 | #BuildArch: noarch |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %description | |
22 | ||
e6f4b058 | 23 | %description -l pl.UTF-8 |
24 | ||
7170a7b1 | 25 | %prep |
641675c1 | 26 | %setup -q -n %{module}-%{version} |
7170a7b1 ER |
27 | |
28 | %build | |
46094905 ER |
29 | # CC/CFLAGS is only for arch packages - remove on noarch packages |
30 | CC="%{__cc}" \ | |
31 | CFLAGS="%{rpmcflags}" \ | |
7592d76f | 32 | %{__python} setup.py build |
7170a7b1 ER |
33 | |
34 | %install | |
35 | rm -rf $RPM_BUILD_ROOT | |
7592d76f | 36 | %{__python} setup.py install \ |
7170a7b1 ER |
37 | --optimize=2 \ |
38 | --root=$RPM_BUILD_ROOT | |
39 | ||
9a83d846 | 40 | # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages! |
e5a26a61 ER |
41 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
42 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
43 | %py_postclean | |
44 | ||
7170a7b1 ER |
45 | %clean |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
7170a7b1 ER |
48 | %files |
49 | %defattr(644,root,root,755) | |
50 | %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO | |
9a83d846 | 51 | # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages! |
e5a26a61 ER |
52 | %{py_sitedir}/*.py[co] |
53 | %attr(755,root,root) %{py_sitedir}/*.so | |
ef0b62a1 | 54 | %if "%{py_ver}" > "2.4" |
47501bae | 55 | %{py_sitedir}/TEMPLATE-*.egg-info |
ef278603 | 56 | %endif |