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