]>
Commit | Line | Data |
---|---|---|
0f266947 AF |
1 | # TODO: |
2 | # - examples and docs for python3 | |
aabbbe81 | 3 | # builds, but got syntax errors when buildings |
0f266947 | 4 | # |
54e13700 ER |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
aabbbe81 | 8 | %define module sqlalchemy |
666da082 | 9 | Summary: Database Abstraction Library |
40827375 | 10 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych |
1ce1e260 | 11 | Name: python-%{module} |
aabbbe81 | 12 | Version: 0.9.8 |
ff5d3e54 | 13 | Release: 2 |
666da082 | 14 | License: MIT |
4fc44ee0 | 15 | Group: Libraries/Python |
aabbbe81 ER |
16 | Source0: https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz |
17 | # Source0-md5: 470ca4da4a0081efc830f0d90dd91682 | |
666da082 | 18 | URL: http://www.sqlalchemy.org/ |
a5d67c27 ER |
19 | BuildRequires: rpm-pythonprov |
20 | BuildRequires: rpmbuild(macros) >= 1.219 | |
0f266947 | 21 | %if %{with python2} |
d05dd446 | 22 | BuildRequires: python-devel >= 1:2.4 |
a563aeca | 23 | BuildRequires: python-distribute |
666da082 | 24 | BuildRequires: python-setuptools >= 0.6-0.a9.1 |
0f266947 AF |
25 | %endif |
26 | %if %{with python3} | |
cf2a3598 | 27 | BuildRequires: python3-2to3 |
0f266947 | 28 | BuildRequires: python3-devel |
cf2a3598 | 29 | BuildRequires: python3-modules |
0f266947 | 30 | %endif |
0f266947 | 31 | %if %{with python2} |
a5d67c27 | 32 | Requires: python-modules |
0f266947 | 33 | %endif |
aabbbe81 | 34 | Provides: python-SQLAlchemy = %{version}-%{release} |
2427a309 | 35 | Obsoletes: python-SQLAlchemy < 0.9.8 |
666da082 | 36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
38 | %description | |
bbaffef6 ER |
39 | The Python SQL toolkit and Object Relational Mapper that gives |
40 | application developers the full power and flexibility of SQL. | |
41 | SQLAlchemy provides a full suite of well known enterprise-level | |
42 | persistence patterns, designed for efficient and high-performing | |
43 | database access, adapted into a simple and Pythonic domain language. | |
666da082 | 44 | |
0f266947 AF |
45 | Python 2.x version. |
46 | ||
2aabef56 | 47 | %description -l pl.UTF-8 |
2aea6699 JB |
48 | Zestaw narzędzi SQL dla Pythona oraz odwzorowań obiektowo-relacyjnych |
49 | dających programistom całą potęgę i elastyczność SQL-a. SQLAlchemy | |
50 | udostępnia pełny zbiór dobrze znanych wzorców trwałości, | |
51 | zaprojektowanych do wydajnego dostępu do baz danych, zaadoptowanych do | |
52 | prostej, pythonowej domeny językowej. | |
f3fd8b7b | 53 | |
0f266947 AF |
54 | Wersja dla pythona 2.x. |
55 | ||
56 | %package -n python3-%{module} | |
57 | Summary: Database Abstraction Library | |
58 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych | |
59 | Group: Libraries/Python | |
aabbbe81 | 60 | Provides: python3-SQLAlchemy = %{version}-%{release} |
2427a309 | 61 | Obsoletes: python3-SQLAlchemy < 0.9.8 |
0f266947 AF |
62 | |
63 | %description -n python3-%{module} | |
64 | The Python SQL toolkit and Object Relational Mapper that gives | |
65 | application developers the full power and flexibility of SQL. | |
66 | SQLAlchemy provides a full suite of well known enterprise-level | |
67 | persistence patterns, designed for efficient and high-performing | |
68 | database access, adapted into a simple and Pythonic domain language. | |
69 | ||
70 | Python 3.x version. | |
71 | ||
1ce1e260 | 72 | %description -n python3-%{module} -l pl.UTF-8 |
0f266947 AF |
73 | Zestaw narzędzi SQL dla Pythona oraz odwzorowań obiektowo-relacyjnych |
74 | dających programistom całą potęgę i elastyczność SQL-a. SQLAlchemy | |
75 | udostępnia pełny zbiór dobrze znanych wzorców trwałości, | |
76 | zaprojektowanych do wydajnego dostępu do baz danych, zaadoptowanych do | |
77 | prostej, pythonowej domeny językowej. | |
78 | ||
79 | Wersja dla Pythona 3.x. | |
80 | ||
666da082 | 81 | %prep |
aabbbe81 | 82 | %setup -q -n SQLAlchemy-%{version} |
666da082 | 83 | |
84 | %build | |
0f266947 | 85 | %if %{with python2} |
aabbbe81 ER |
86 | CC="%{__cc}" \ |
87 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ | |
0f266947 AF |
88 | %{__python} setup.py build -b build-2 |
89 | %endif | |
90 | %if %{with python3} | |
aabbbe81 ER |
91 | CC="%{__cc}" \ |
92 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ | |
0f266947 AF |
93 | %{__python3} setup.py build -b build-3 |
94 | %endif | |
666da082 | 95 | |
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
0f266947 AF |
98 | %if %{with python2} |
99 | %{__python} setup.py build -b build-2 \ | |
100 | install \ | |
666da082 | 101 | --single-version-externally-managed \ |
102 | --optimize=2 \ | |
103 | --root=$RPM_BUILD_ROOT | |
def14030 | 104 | |
0f266947 AF |
105 | %py_postclean |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
109 | %{__python3} setup.py build -b build-3 \ | |
110 | install \ | |
0f266947 AF |
111 | --root=$RPM_BUILD_ROOT \ |
112 | --optimize=2 | |
0f266947 AF |
113 | %endif |
114 | ||
3e5d0494 | 115 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
116 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
666da082 | 117 | |
666da082 | 118 | %clean |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %files | |
122 | %defattr(644,root,root,755) | |
def14030 | 123 | %doc CHANGES README* doc/*.html |
aabbbe81 ER |
124 | %{py_sitedir}/sqlalchemy |
125 | %{py_sitedir}/SQLAlchemy-%{version}-py*.egg-info | |
2aea6699 | 126 | %{_examplesdir}/%{name}-%{version} |
0f266947 | 127 | |
bcebf730 | 128 | %if %{with python3} |
0f266947 AF |
129 | %files -n python3-%{module} |
130 | %defattr(644,root,root,755) | |
aabbbe81 ER |
131 | %{py3_sitedir}/sqlalchemy |
132 | %{py3_sitedir}/SQLAlchemy-%{version}-py*.egg-info | |
bcebf730 | 133 | %endif |