]>
Commit | Line | Data |
---|---|---|
0f266947 | 1 | # |
be381d2c | 2 | # Conditional build: |
54e13700 ER |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
0b211bb2 | 5 | %bcond_without tests # unit tests |
54e13700 | 6 | |
aabbbe81 | 7 | %define module sqlalchemy |
0b211bb2 JB |
8 | Summary: Database Abstraction Library for Python 2 |
9 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 2 | |
1ce1e260 | 10 | Name: python-%{module} |
852d765b | 11 | Version: 1.4.45 |
3168f477 | 12 | Release: 1 |
666da082 | 13 | License: MIT |
4fc44ee0 | 14 | Group: Libraries/Python |
0b211bb2 JB |
15 | #Source0Download: https://pypi.org/simple/sqlalchemy/ |
16 | Source0: https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz | |
852d765b | 17 | # Source0-md5: 3149ecb3aa245d057bad91484728c565 |
0b211bb2 | 18 | Patch0: %{name}-tests.patch |
11c82359 | 19 | URL: https://www.sqlalchemy.org/ |
a5d67c27 | 20 | BuildRequires: rpm-pythonprov |
0b211bb2 | 21 | BuildRequires: rpmbuild(macros) >= 1.714 |
0f266947 | 22 | %if %{with python2} |
0b211bb2 JB |
23 | BuildRequires: python-devel >= 1:2.7 |
24 | BuildRequires: python-modules >= 1:2.7 | |
666da082 | 25 | BuildRequires: python-setuptools >= 0.6-0.a9.1 |
0b211bb2 JB |
26 | %if %{with tests} |
27 | BuildRequires: python-mock | |
28 | BuildRequires: python-pytest >= 2.5.2 | |
29 | BuildRequires: python-pytest-xdist | |
30 | %endif | |
0f266947 AF |
31 | %endif |
32 | %if %{with python3} | |
be381d2c JB |
33 | BuildRequires: python3-devel >= 1:3.4 |
34 | BuildRequires: python3-modules >= 1:3.4 | |
0b211bb2 JB |
35 | BuildRequires: python3-setuptools >= 0.6-0.a9.1 |
36 | %if %{with tests} | |
37 | BuildRequires: python3-pytest >= 2.5.2 | |
38 | BuildRequires: python3-pytest-xdist | |
0f266947 | 39 | %endif |
0f266947 | 40 | %endif |
0b211bb2 | 41 | Requires: python-modules |
aabbbe81 | 42 | Provides: python-SQLAlchemy = %{version}-%{release} |
2427a309 | 43 | Obsoletes: python-SQLAlchemy < 0.9.8 |
666da082 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
46 | %description | |
bbaffef6 ER |
47 | The Python SQL toolkit and Object Relational Mapper that gives |
48 | application developers the full power and flexibility of SQL. | |
49 | SQLAlchemy provides a full suite of well known enterprise-level | |
50 | persistence patterns, designed for efficient and high-performing | |
51 | database access, adapted into a simple and Pythonic domain language. | |
666da082 | 52 | |
0f266947 AF |
53 | Python 2.x version. |
54 | ||
2aabef56 | 55 | %description -l pl.UTF-8 |
0b211bb2 JB |
56 | Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona, |
57 | dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy | |
2aea6699 | 58 | udostępnia pełny zbiór dobrze znanych wzorców trwałości, |
0b211bb2 JB |
59 | zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz |
60 | danych, zaadaptowanych do prostego, pythonowego języka. | |
f3fd8b7b | 61 | |
0f266947 AF |
62 | Wersja dla pythona 2.x. |
63 | ||
64 | %package -n python3-%{module} | |
0b211bb2 JB |
65 | Summary: Database Abstraction Library for Python 3 |
66 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 3 | |
0f266947 | 67 | Group: Libraries/Python |
aabbbe81 | 68 | Provides: python3-SQLAlchemy = %{version}-%{release} |
2427a309 | 69 | Obsoletes: python3-SQLAlchemy < 0.9.8 |
0f266947 AF |
70 | |
71 | %description -n python3-%{module} | |
72 | The Python SQL toolkit and Object Relational Mapper that gives | |
73 | application developers the full power and flexibility of SQL. | |
74 | SQLAlchemy provides a full suite of well known enterprise-level | |
75 | persistence patterns, designed for efficient and high-performing | |
76 | database access, adapted into a simple and Pythonic domain language. | |
77 | ||
78 | Python 3.x version. | |
79 | ||
1ce1e260 | 80 | %description -n python3-%{module} -l pl.UTF-8 |
0b211bb2 JB |
81 | Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona, |
82 | dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy | |
0f266947 | 83 | udostępnia pełny zbiór dobrze znanych wzorców trwałości, |
0b211bb2 JB |
84 | zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz |
85 | danych, zaadaptowanych do prostego, pythonowego języka. | |
0f266947 AF |
86 | |
87 | Wersja dla Pythona 3.x. | |
88 | ||
0b211bb2 JB |
89 | %package apidocs |
90 | Summary: API documentation for Python SQLAlchemy module | |
91 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona SQLAlchemy | |
92 | Group: Documentation | |
0b211bb2 | 93 | BuildArch: noarch |
0b211bb2 JB |
94 | |
95 | %description apidocs | |
96 | API documentation for Python SQLAlchemy module. | |
97 | ||
98 | %description apidocs -l pl.UTF-8 | |
99 | Dokumentacja API modułu Pythona SQLAlchemy. | |
100 | ||
101 | %package examples | |
102 | Summary: Examples for Python SQLAlchemy module | |
103 | Summary(pl.UTF-8): Przykłady do modułu Pythona SQLAlchemy | |
104 | Group: Documentation | |
0b211bb2 | 105 | BuildArch: noarch |
0b211bb2 JB |
106 | |
107 | %description examples | |
108 | Examples for Python SQLAlchemy module. | |
109 | ||
110 | %description examples -l pl.UTF-8 | |
111 | Przykłady do modułu Pythona SQLAlchemy. | |
112 | ||
666da082 | 113 | %prep |
aabbbe81 | 114 | %setup -q -n SQLAlchemy-%{version} |
0b211bb2 | 115 | %patch0 -p1 |
666da082 | 116 | |
117 | %build | |
0f266947 | 118 | %if %{with python2} |
be381d2c JB |
119 | %py_build |
120 | ||
121 | %if %{with tests} | |
122 | %{__python} -m pytest test | |
123 | %endif | |
0f266947 | 124 | %endif |
0b211bb2 | 125 | |
0f266947 | 126 | %if %{with python3} |
be381d2c JB |
127 | %py3_build |
128 | ||
129 | %if %{with tests} | |
130 | %{__python3} -m pytest test | |
131 | %endif | |
0f266947 | 132 | %endif |
666da082 | 133 | |
134 | %install | |
135 | rm -rf $RPM_BUILD_ROOT | |
0f266947 | 136 | %if %{with python2} |
0b211bb2 | 137 | %py_install |
def14030 | 138 | |
0f266947 AF |
139 | %py_postclean |
140 | %endif | |
141 | ||
142 | %if %{with python3} | |
96131776 | 143 | %py3_install |
0f266947 AF |
144 | %endif |
145 | ||
3e5d0494 | 146 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
0b211bb2 | 147 | cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
666da082 | 148 | |
666da082 | 149 | %clean |
150 | rm -rf $RPM_BUILD_ROOT | |
151 | ||
152 | %files | |
153 | %defattr(644,root,root,755) | |
0b211bb2 JB |
154 | %doc AUTHORS CHANGES LICENSE README.rst |
155 | %dir %{py_sitedir}/sqlalchemy | |
156 | %{py_sitedir}/sqlalchemy/connectors | |
157 | %{py_sitedir}/sqlalchemy/databases | |
158 | %{py_sitedir}/sqlalchemy/dialects | |
159 | %{py_sitedir}/sqlalchemy/engine | |
160 | %{py_sitedir}/sqlalchemy/event | |
161 | %{py_sitedir}/sqlalchemy/ext | |
3168f477 | 162 | %{py_sitedir}/sqlalchemy/future |
0b211bb2 | 163 | %{py_sitedir}/sqlalchemy/orm |
be381d2c | 164 | %{py_sitedir}/sqlalchemy/pool |
0b211bb2 JB |
165 | %{py_sitedir}/sqlalchemy/sql |
166 | %{py_sitedir}/sqlalchemy/testing | |
167 | %{py_sitedir}/sqlalchemy/util | |
3168f477 | 168 | %attr(755,root,root) %{py_sitedir}/sqlalchemy/cimmutabledict.so |
0b211bb2 JB |
169 | %attr(755,root,root) %{py_sitedir}/sqlalchemy/cprocessors.so |
170 | %attr(755,root,root) %{py_sitedir}/sqlalchemy/cresultproxy.so | |
0b211bb2 | 171 | %{py_sitedir}/sqlalchemy/*.py[co] |
aabbbe81 | 172 | %{py_sitedir}/SQLAlchemy-%{version}-py*.egg-info |
0f266947 | 173 | |
bcebf730 | 174 | %if %{with python3} |
0f266947 AF |
175 | %files -n python3-%{module} |
176 | %defattr(644,root,root,755) | |
0b211bb2 JB |
177 | %doc AUTHORS CHANGES LICENSE README.rst |
178 | %dir %{py3_sitedir}/sqlalchemy | |
179 | %{py3_sitedir}/sqlalchemy/connectors | |
180 | %{py3_sitedir}/sqlalchemy/databases | |
181 | %{py3_sitedir}/sqlalchemy/dialects | |
182 | %{py3_sitedir}/sqlalchemy/engine | |
183 | %{py3_sitedir}/sqlalchemy/event | |
184 | %{py3_sitedir}/sqlalchemy/ext | |
3168f477 | 185 | %{py3_sitedir}/sqlalchemy/future |
0b211bb2 | 186 | %{py3_sitedir}/sqlalchemy/orm |
be381d2c | 187 | %{py3_sitedir}/sqlalchemy/pool |
0b211bb2 JB |
188 | %{py3_sitedir}/sqlalchemy/sql |
189 | %{py3_sitedir}/sqlalchemy/testing | |
190 | %{py3_sitedir}/sqlalchemy/util | |
3168f477 | 191 | %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cimmutabledict.cpython-*.so |
0b211bb2 JB |
192 | %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cprocessors.cpython-*.so |
193 | %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cresultproxy.cpython-*.so | |
3168f477 | 194 | #%attr(755,root,root) %{py3_sitedir}/sqlalchemy/cutils.cpython-*.so |
0b211bb2 JB |
195 | %{py3_sitedir}/sqlalchemy/*.py |
196 | %{py3_sitedir}/sqlalchemy/__pycache__ | |
aabbbe81 | 197 | %{py3_sitedir}/SQLAlchemy-%{version}-py*.egg-info |
bcebf730 | 198 | %endif |
0b211bb2 JB |
199 | |
200 | %files apidocs | |
201 | %defattr(644,root,root,755) | |
202 | %doc doc/{_images,_modules,_static,changelog,core,dialects,faq,orm,*.html,*.js} | |
203 | ||
204 | %files examples | |
205 | %defattr(644,root,root,755) | |
206 | %{_examplesdir}/%{name}-%{version} |