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