]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - python.spec
- .egg-info is python version specific (and sometimes setup.py), not distro line
[projects/template-specs.git] / python.spec
index 50a0abf18c06ca58b0b8a7e7df498a755f436367..bd1fe8ca140b474c7ce25abe12cc39d06305742c 100644 (file)
@@ -1,38 +1,52 @@
+%define        module  template
 Summary:       -
 Summary(pl.UTF-8):     -
-Name:          template
+Name:          python-%{module}
 Version:       _
 Release:       0.1
 License:       - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
 Group:         Development/Languages/Python
 Source0:       %{name}-%{version}.tar.gz
 # Source0-md5: -
-#Source1:      -
-# Source1-md5: -
-#Patch0:               %{name}-DESTDIR.patch
 URL:           -
-%pyrequires_eq python-modules
+BuildRequires: python-devel
+BuildRequires: rpm-pythonprov
+# if py_postclean is used
+BuildRequires: rpmbuild(macros) >= 1.219
+#Requires:             python-libs
+Requires:              python-modules
 #BuildArch:    noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 
+%description -l pl.UTF-8
+
 %prep
-%setup -q
+%setup -q -n %{module}-%{version}
 
 %build
-python setup.py build
+export CFLAGS="%{rpmcflags}"
+%{__python} setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-python setup.py install \
+%{__python} setup.py install \
        --optimize=2 \
        --root=$RPM_BUILD_ROOT
 
+%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%py_comp $RPM_BUILD_ROOT%{py_sitedir}
+%py_postclean
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
+%{py_sitedir}/*.py[co]
+%attr(755,root,root) %{py_sitedir}/*.so
+%if "%{py_ver}" > "2.4"
+%{py_sitedir}/TEMPLATE-*.egg-info
+%endif
This page took 0.026618 seconds and 4 git commands to generate.