SPECS: python-genshi.spec - speedups bcond, cflags

glen glen at pld-linux.org
Wed Aug 6 19:28:43 CEST 2008


Author: glen                         Date: Wed Aug  6 17:28:43 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- speedups bcond, cflags

---- Files affected:
SPECS:
   python-genshi.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/python-genshi.spec
diff -u SPECS/python-genshi.spec:1.1 SPECS/python-genshi.spec:1.2
--- SPECS/python-genshi.spec:1.1	Wed Aug  6 19:06:33 2008
+++ SPECS/python-genshi.spec	Wed Aug  6 19:28:37 2008
@@ -4,6 +4,11 @@
 #   An optional C extension could not be compiled, speedups will not be
 #   available:
 # - /usr/include/python2.4/pyport.h:616:2: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
+#
+# Conditional build:
+%bcond_without	speedups	# skip optional C extension build
+%bcond_without	tests		# build without tests
+#
 Summary:	Python toolkit for generation of output for the web
 Name:		python-genshi
 Version:	0.5.1
@@ -15,6 +20,7 @@
 URL:		http://genshi.edgewall.org/
 BuildRequires:	python-devel
 BuildRequires:	rpm-pythonprov
+BuildRequires:	python-setuptools-devel
 BuildRequires:	rpmbuild(macros) >= 1.219
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -27,12 +33,16 @@
 %setup -q -n Genshi-%{version}
 
 %build
+export CFLAGS="%{rpmcflags}"
 %{__python} setup.py build
+%{!?with_tests:%{__python} setup.py test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__python} setup.py install \
 	--optimize=2 \
+	--skip-build \
+	%{!?with_speedups:--without-speedups} \
 	--root=$RPM_BUILD_ROOT
 
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
@@ -47,9 +57,13 @@
 %doc ChangeLog
 %{py_sitedir}/genshi/*.py[co]
 %dir %{py_sitedir}/genshi/filters
-%{py_sitedir}/genshi/filters/transform.py[co]
+%{py_sitedir}/genshi/filters/*.py[co]
 %dir %{py_sitedir}/genshi/template
-%{py_sitedir}/genshi/template/text.py[co]
+%{py_sitedir}/genshi/template/*.py[co]
+
+%if %{with speedups}
+%attr(755,root,root) %{py_sitedir}/genshi/_speedups.so
+%endif
 
 # egg info is built with py 2.4 too
 %{py_sitedir}/Genshi-*.egg-info
@@ -60,5 +74,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2008/08/06 17:28:37  glen
+- speedups bcond, cflags
+
 Revision 1.1  2008/08/06 17:06:33  glen
 - new, C-extension has build failures here
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/python-genshi.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list