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