1 %define module template
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
12 BuildRequires: python-devel
13 BuildRequires: rpm-pythonprov
14 # if py_postclean is used
15 BuildRequires: rpmbuild(macros) >= 1.219
16 #Requires: python-libs
17 Requires: python-modules
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %description -l pl.UTF-8
26 %setup -q -n %{module}-%{version}
29 # CC/CFLAGS is only for arch packages - remove on noarch packages
31 CFLAGS="%{rpmcflags}" \
32 %{__python} setup.py build
35 rm -rf $RPM_BUILD_ROOT
36 %{__python} setup.py install \
38 --root=$RPM_BUILD_ROOT
40 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
41 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
42 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
46 rm -rf $RPM_BUILD_ROOT
49 %defattr(644,root,root,755)
50 %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
51 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
52 %{py_sitedir}/*.py[co]
53 %attr(755,root,root) %{py_sitedir}/*.so
54 %if "%{py_ver}" > "2.4"
55 %{py_sitedir}/TEMPLATE-*.egg-info