]> git.pld-linux.org Git - packages/python-psycopg2.git/blame - python-psycopg2.spec
Version: 2.5
[packages/python-psycopg2.git] / python-psycopg2.spec
CommitLineData
fa6eecba 1#
2# todo:
fa6eecba 3# - lib64 patch
df9bb384 4
1ce53046
JK
5# Conditional build:
6%bcond_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
f93a45b9 8
1ce53046 9%define module psycopg2
3bacd1f7 10Summary: psycopg is a PostgreSQL database adapter for Python
f4a85503 11Summary(pl.UTF-8): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
3bacd1f7 12Name: python-%{module}
1ce53046 13Version: 2.5
943dc275 14Release: 1
258ebeda 15License: GPL
4b5b5919 16Group: Libraries/Python
1ce53046
JK
17Source0: http://initd.org/psycopg/tarballs/PSYCOPG-2-5/%{module}-%{version}.tar.gz
18# Source0-md5: facd82faa067e99b80146a0ee2f842f6
fa6eecba 19#Patch0: %{name}-lib64.patch
258ebeda 20URL: http://www.initd.org/software/psycopg/
dd6f8fe2 21BuildRequires: autoconf
258ebeda 22BuildRequires: postgresql-backend-devel
c72332e3 23BuildRequires: postgresql-devel
1ce53046
JK
24%if %{with python2}
25BuildRequires: python-devel >= 2.5
26%endif
27%if %{with python3}
28BuildRequires: python3-devel >= 2.5
29%endif
399bddde 30BuildRequires: rpm-pythonprov
258ebeda 31Requires: postgresql-libs
1ce53046 32%if %{with python2}
89ddf330 33Requires: python-modules
07c88ab6 34%if "%{pld_release}" == "ac"
54964aba 35BuildRequires: python-mx-DateTime-devel
36Requires: python-mx-DateTime
07c88ab6 37%else
4093edd6 38# if somebody really needs mx.DateTime, then one can request mx.Datetime
39# usage on runtime;
40# it is pointless to use 'Requires' or 'Suggest' field because
41# - python provides its own datetime implementation
42# - one can request it on runtime (as said above)
43# - usage of mx.DateTime type is application specific
0e0021ce 44# Sure, but make mx-DateTime conditional build work
07c88ab6 45BuildConflicts: python-egenix-mx-base
46%endif
0e0021ce 47Requires: python-pytz
1ce53046
JK
48%endif
49%if %{with python3}
50Requires: python3-modules
51Requires: python3-pytz
52%endif
3bacd1f7 53BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
3bacd1f7
MK
54
55%description
56psycopg is a PostgreSQL database adapter for the Python programming
57language (just like pygresql and popy.) It was written from scratch
58with the aim of being very small and fast, and stable as a rock. The
59main advantages of psycopg are that it supports the full Python
60DBAPI-2.0 and being thread safe at level 2.
61
3a08e339 62%description -l pl.UTF-8
3bacd1f7 63psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
3a08e339
JR
64PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku
65z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą
66psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest
3bacd1f7
MK
67'thread safe' na poziomie 2.
68
1ce53046
JK
69%package -n python3-%{module}
70Summary: psycopg is a PostgreSQL database adapter for Python
71Summary(pl.UTF-8): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
72Group: Libraries/Python
73
74%description -n python3-%{module}
75psycopg is a PostgreSQL database adapter for the Python programming
76language (just like pygresql and popy.) It was written from scratch
77with the aim of being very small and fast, and stable as a rock. The
78main advantages of psycopg are that it supports the full Python
79DBAPI-2.0 and being thread safe at level 2.
80
81%description -n python3-%{module} -l pl.UTF-8
82psycopg jest przeznaczonym dla Pythona interfejsem do bazy danych
83PostgreSQL (tak jak pygresql i popy). Został zakodowany od początku
84z założeniem że ma być bardzo mały, szybki i stabilny. Główna zaletą
85psycopg jest, że w jest pełni zgodny z standardem DBAPI-2.0 i jest
86'thread safe' na poziomie 2.
87
88
3bacd1f7 89%prep
ad85baa5 90%setup -q -n %{module}-%{version}
fa6eecba 91#%if "%{_lib}" == "lib64"
92#%patch0 -p1
93#%endif
3bacd1f7
MK
94
95%build
1ce53046
JK
96%if %{with python2}
97%{__python} setup.py build
98%endif
99%if %{with python3}
100%{__python3} setup.py build
101%endif
3bacd1f7
MK
102
103%install
104rm -rf $RPM_BUILD_ROOT
3bacd1f7 105
1ce53046
JK
106%if %{with python2}
107%{__python} setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
fa6eecba 108
921d82ea
MK
109# find $RPM_BUILD_ROOT%{py_libdir} -type f -name "*.py" | xargs rm
110%py_postclean
1ce53046
JK
111%endif
112%if %{with python3}
113%{__python3} setup.py install --optimize=2 --root=$RPM_BUILD_ROOT
114%endif
fa6eecba 115
3bacd1f7
MK
116%clean
117rm -rf $RPM_BUILD_ROOT
118
1ce53046 119%if %{with python2}
3bacd1f7
MK
120%files
121%defattr(644,root,root,755)
1ce53046 122%doc NEWS AUTHORS README doc/HACKING doc/SUCCESS
fa6eecba 123%dir %{py_sitedir}/%{module}
124%attr(755,root,root) %{py_sitedir}/%{module}/*.so
125%{py_sitedir}/%{module}/*.py[co]
432cab47 126%if "%{pld_release}" != "ac"
f53e9079 127%{py_sitedir}/*.egg-info
df9bb384 128%endif
1ce53046
JK
129%{py_sitedir}/%{module}/tests
130%endif
131
132%if %{with python3}
133%files -n python3-%{module}
134%defattr(644,root,root,755)
135%doc NEWS AUTHORS README doc/HACKING doc/SUCCESS
136%dir %{py3_sitedir}/%{module}
137%dir %{py3_sitedir}/%{module}/__pycache__
138%attr(755,root,root) %{py3_sitedir}/%{module}/*.so
139%{py3_sitedir}/%{module}/*.py
140%{py3_sitedir}/%{module}/__pycache__/*.py*
141%{py3_sitedir}/*.egg-info
142%{py3_sitedir}/%{module}/tests
143%endif
This page took 0.105088 seconds and 4 git commands to generate.