SPECS: python-psycopg2.spec (NEW) - new spec, based on python-psyc...

jajcus jajcus at pld-linux.org
Sat May 27 17:22:42 CEST 2006


Author: jajcus                       Date: Sat May 27 15:22:42 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- new spec, based on python-psycopg.spec

---- Files affected:
SPECS:
   python-psycopg2.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/python-psycopg2.spec
diff -u /dev/null SPECS/python-psycopg2.spec:1.1
--- /dev/null	Sat May 27 17:22:42 2006
+++ SPECS/python-psycopg2.spec	Sat May 27 17:22:36 2006
@@ -0,0 +1,113 @@
+# $Revision$, $Date$
+
+%define 	module	psycopg2
+
+Summary:	psycopg is a PostgreSQL database adapter for Python
+Summary(pl):	psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
+Name:		python-%{module}
+Version:	2.0
+%define		beta	b8
+Release:	0.%{beta}.1
+License:	GPL
+Group:		Libraries/Python
+Source0:	http://initd.org/pub/software/psycopg/%{module}-%{version}%{beta}.tar.gz
+URL:		http://initd.org/tracker/psycopg/wiki/PsycopgTwo
+BuildRequires:	postgresql-backend-devel
+BuildRequires:	postgresql-devel
+BuildRequires:	python-devel
+BuildRequires:	rpm-pythonprov
+Requires:	postgresql-libs
+%pyrequires_eq	python-modules
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define zope_subname ZPsycopgDA
+
+%description
+psycopg is a PostgreSQL database adapter for the Python programming
+language. This is version 2, a complete rewrite of the original code to
+provide new-style classes for connection and cursor objects and other sweet
+candies. Like the original, psycopg 2 was written with the aim of being
+very small and fast, and stable as a rock.
+
+psycopg is different from the other database adapter because it was
+designed for heavily multi-threaded applications that create and destroy
+lots of cursors and make a conspicuous number of concurrent INSERTs or
+UPDATEs. psycopg 2 also provide full asycronous operations for the really
+brave programmer.
+
+%description -l pl
+psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
+PostgreSQL. To jest wersja 2, napisana zupełnie od nowa, aby udostępnić
+klasy nowego typu dla obiektów połączeń i kursorów oraz inne udogodnienia.
+
+%package -n Zope-%{zope_subname}2
+Summary:	Zope PostgreSQL database adapter
+Summary(pl):	Interfejs bazy danych PostgreSQL do Zope
+Group:		Development/Languages/Python
+Requires:	%{name} = %{version}-%{release}
+Requires:	Zope
+Obsoletes:	Zope-%{zope_subname}
+
+%description -n Zope-%{zope_subname}2
+Zope PostgreSQL database adapter.
+
+%description -n Zope-%{zope_subname}2 -l pl
+Interfejs bazy danych PostgreSQL do Zope.
+
+%prep
+%setup -q -n %{module}-%{version}%{beta}
+
+%build
+python setup.py build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
+
+python ./setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT%{py_sitedir} -name "*.py" | xargs rm -f
+
+cp -ar %{zope_subname}/* $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
+%py_comp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
+%py_ocomp $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}
+rm -f $RPM_BUILD_ROOT%{_datadir}/Zope-%{zope_subname}/*.py
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n Zope-%{zope_subname}2
+/usr/sbin/installzopeproduct %{_datadir}/Zope-%{zope_subname} %{zope_subname}
+if [ -f /var/lock/subsys/zope ]; then
+	/etc/rc.d/init.d/zope restart >&2
+fi
+
+%postun -n Zope-%{zope_subname}2
+if [ "$1" = "0" ]; then
+	/usr/sbin/installzopeproduct -d %{zope_subname} 
+	if [ -f /var/lock/subsys/zope ]; then
+		/etc/rc.d/init.d/zope restart >&2
+	fi
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README
+%dir %{py_sitedir}/%{module}
+%{py_sitedir}/%{module}/*.pyc
+%{py_sitedir}/%{module}/*.pyo
+%attr(755,root,root) %{py_sitedir}/%{module}/*.so
+
+%files -n Zope-%{zope_subname}2
+%defattr(644,root,root,755)
+%{_datadir}/Zope-%{zope_subname}
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2006/05/27 15:22:36  jajcus
+- new spec, based on python-psycopg.spec
+
================================================================


More information about the pld-cvs-commit mailing list