-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython-psycopg2.spec
More file actions
80 lines (69 loc) · 2.4 KB
/
Copy pathpython-psycopg2.spec
File metadata and controls
80 lines (69 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# todo:
# - lib64 patch
%define module psycopg2
Summary: psycopg is a PostgreSQL database adapter for Python
Summary(pl.UTF-8): psycopg jest przeznaczonym dla Pythona interfejsem do bazy PostgreSQL
Name: python-%{module}
Version: 2.0.11
Release: 1
License: GPL
Group: Libraries/Python
Source0: http://initd.org/pub/software/psycopg/%{module}-%{version}.tar.gz
# Source0-md5: eec2a45bcea75a00cbf20a15ab1b8bae
#Patch0: %{name}-lib64.patch
URL: http://www.initd.org/software/psycopg/
BuildRequires: autoconf
BuildRequires: postgresql-backend-devel
BuildRequires: postgresql-devel
BuildRequires: python-devel
BuildRequires: rpm-pythonprov
Requires: postgresql-libs
Requires: python-modules
%if "%{pld_release}" == "ac"
BuildRequires: python-mx-DateTime-devel
Requires: python-mx-DateTime
%else
# if somebody really needs mx.DateTime, then one can request mx.Datetime
# usage on runtime;
# it is pointless to use 'Requires' or 'Suggest' field because
# - python provides its own datetime implementation
# - one can request it on runtime (as said above)
# - usage of mx.DateTime type is application specific
BuildConflicts: python-mx-DateTime
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
psycopg is a PostgreSQL database adapter for the Python programming
language (just like pygresql and popy.) It was written from scratch
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.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
'thread safe' na poziomie 2.
%prep
%setup -q -n %{module}-%{version}
#%if "%{_lib}" == "lib64"
#%patch0 -p1
#%endif
%build
python setup.py build
%install
rm -rf $RPM_BUILD_ROOT
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 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