]> git.pld-linux.org Git - packages/python-psycopg2.git/blobdiff - python-psycopg2.spec
- fixed typo to include missing egg file properly, thx glen
[packages/python-psycopg2.git] / python-psycopg2.spec
index 2bbba74c6f2b0f33b65cf0ca847278f7da8b05f6..a5478cb80c544bd49b46c519efa574bb98809757 100644 (file)
@@ -1,22 +1,36 @@
-%include       /usr/lib/rpm/macros.python
-%define        module psycopg
+#
+# todo:
+# - lib64 patch
+
+%define        module  psycopg2
+
 Summary:       psycopg is a PostgreSQL database adapter for Python
-Summary(pl):   psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
+Summary(pl.UTF-8):     psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
 Name:          python-%{module}
-Version:       1.1.9
-Release:       2
+Version:       2.0.8
+Release:       5
 License:       GPL
 Group:         Libraries/Python
-Source0:       http://initd.org/pub/software/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5: 3a8ab26a7b9d83c179675866e7d6d414
-Patch0:                %{name}-dumb-ac-fix.patch
+Source0:       http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
+# Source0-md5: 2c31827878d436b0c89e777989ff55af
+#Patch0:               %{name}-lib64.patch
 URL:           http://www.initd.org/software/psycopg/
+BuildRequires: autoconf
 BuildRequires: postgresql-backend-devel
+BuildRequires: postgresql-devel
 BuildRequires: python-devel
-BuildRequires: python-mx-DateTime-devel
+BuildRequires: rpm-pythonprov
 Requires:      postgresql-libs
 %pyrequires_eq python-modules
+%if "%{pld_release}" == "ac"
+BuildRequires: python-mx-DateTime-devel
 Requires:      python-mx-DateTime
+%else
+# allow mx.DateTime to be optional
+# don't use Suggest - it is rare to use mx.DateTime; python provides its
+# own datetime implementation, now
+BuildConflicts:   python-mx-DateTime
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -26,36 +40,38 @@ with the aim of being very small and fast, and stable as a rock. The
 main advantages of psycopg are that it supports the full Python
 DBAPI-2.0 and being thread safe at level 2.
 
-%description -l pl
+%description -l pl.UTF-8
 psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
-PostgreSQL (tak jak pygresql i popy). Zosta³ zakodowany od pocz±tku
-z za³o¿eniem ¿e ma byæ bardzo ma³y, szybki i stabilny. G³ówna zalet±
-psycopg jest, ¿e w jest pe³ni zgodny z standardem DBAPI-2.0 i jest
+PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku
+z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą
+psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest
 'thread safe' na poziomie 2.
 
 %prep
 %setup -q -n %{module}-%{version}
-%patch0 -p1
+#%if "%{_lib}" == "lib64"
+#%patch0 -p1
+#%endif
 
 %build
-%{__autoconf}
-
-%configure \
-       --with-python=%{_bindir}/python \
-       --with-mxdatetime-includes=%{py_incdir}/mx \
-       --with-postgres-includes=%{_includedir}/postgresql/server
-%{__make}
+python setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{py_sitedir}
 
-install psycopgmodule.so $RPM_BUILD_ROOT%{py_sitedir}
+python setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
+
+find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS CREDITS FAQ NEWS README RELEASE-1.0 SUCCESS TODO doc
-%attr(755,root,root) %{py_sitedir}/*.so
+%doc ChangeLog AUTHORS README doc/HACKING doc/SUCCESS doc/TODO
+%dir %{py_sitedir}/%{module}
+%attr(755,root,root) %{py_sitedir}/%{module}/*.so
+%{py_sitedir}/%{module}/*.py[co]
+%if "%{pld_release}" != "ac"
+%{py_sitedir}/*.egg-info
+%endif
This page took 0.063568 seconds and 4 git commands to generate.