3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without tests # unit tests
7 %define module sqlalchemy
8 Summary: Database Abstraction Library for Python 2
9 Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 2
10 Name: python-%{module}
11 # keep 1.x here for python2 support
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/sqlalchemy/
17 Source0: https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz
18 # Source0-md5: 0796f9734d5898945d7802ad00ac1723
19 Patch0: %{name}-tests.patch
20 URL: https://www.sqlalchemy.org/
21 BuildRequires: rpm-build >= 4.6
22 BuildRequires: rpm-pythonprov
23 BuildRequires: rpmbuild(macros) >= 1.714
25 BuildRequires: python-devel >= 1:2.7
26 BuildRequires: python-modules >= 1:2.7
27 BuildRequires: python-setuptools >= 0.6-0.a9.1
29 BuildRequires: python-mock
30 BuildRequires: python-pytest >= 4.6.11
31 BuildRequires: python-pytest-xdist
35 BuildRequires: python3-devel >= 1:3.4
36 BuildRequires: python3-modules >= 1:3.4
37 BuildRequires: python3-setuptools >= 0.6-0.a9.1
39 BuildRequires: python3-pytest >= 6.2
40 BuildRequires: python3-pytest-xdist
43 Requires: python-modules
44 Provides: python-SQLAlchemy = %{version}-%{release}
45 Obsoletes: python-SQLAlchemy < 0.9.8
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
57 %description -l pl.UTF-8
58 Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona,
59 dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
60 udostępnia pełny zbiór dobrze znanych wzorców trwałości,
61 zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz
62 danych, zaadaptowanych do prostego, pythonowego języka.
64 Wersja dla pythona 2.x.
66 %package -n python3-%{module}
67 Summary: Database Abstraction Library for Python 3
68 Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 3
69 Group: Libraries/Python
70 Provides: python3-SQLAlchemy = %{version}-%{release}
71 Obsoletes: python3-SQLAlchemy < 0.9.8
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.
82 %description -n python3-%{module} -l pl.UTF-8
83 Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona,
84 dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
85 udostępnia pełny zbiór dobrze znanych wzorców trwałości,
86 zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz
87 danych, zaadaptowanych do prostego, pythonowego języka.
89 Wersja dla Pythona 3.x.
92 Summary: API documentation for Python SQLAlchemy module
93 Summary(pl.UTF-8): Dokumentacja API modułu Pythona SQLAlchemy
98 API documentation for Python SQLAlchemy module.
100 %description apidocs -l pl.UTF-8
101 Dokumentacja API modułu Pythona SQLAlchemy.
104 Summary: Examples for Python SQLAlchemy module
105 Summary(pl.UTF-8): Przykłady do modułu Pythona SQLAlchemy
109 %description examples
110 Examples for Python SQLAlchemy module.
112 %description examples -l pl.UTF-8
113 Przykłady do modułu Pythona SQLAlchemy.
116 %setup -q -n SQLAlchemy-%{version}
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
135 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
136 PYTHONPATH=$(echo $(pwd)/build-3/lib.linux-*) \
137 %{__python3} -m pytest test
142 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
155 cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
158 rm -rf $RPM_BUILD_ROOT
161 %defattr(644,root,root,755)
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
170 %{py_sitedir}/sqlalchemy/future
171 %{py_sitedir}/sqlalchemy/orm
172 %{py_sitedir}/sqlalchemy/pool
173 %{py_sitedir}/sqlalchemy/sql
174 %{py_sitedir}/sqlalchemy/testing
175 %{py_sitedir}/sqlalchemy/util
176 %attr(755,root,root) %{py_sitedir}/sqlalchemy/cimmutabledict.so
177 %attr(755,root,root) %{py_sitedir}/sqlalchemy/cprocessors.so
178 %attr(755,root,root) %{py_sitedir}/sqlalchemy/cresultproxy.so
179 %{py_sitedir}/sqlalchemy/*.py[co]
180 %{py_sitedir}/SQLAlchemy-%{version}-py*.egg-info
183 %files -n python3-%{module}
184 %defattr(644,root,root,755)
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
193 %{py3_sitedir}/sqlalchemy/future
194 %{py3_sitedir}/sqlalchemy/orm
195 %{py3_sitedir}/sqlalchemy/pool
196 %{py3_sitedir}/sqlalchemy/sql
197 %{py3_sitedir}/sqlalchemy/testing
198 %{py3_sitedir}/sqlalchemy/util
199 %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cimmutabledict.cpython-*.so
200 %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cprocessors.cpython-*.so
201 %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cresultproxy.cpython-*.so
202 %{py3_sitedir}/sqlalchemy/*.py
203 %{py3_sitedir}/sqlalchemy/__pycache__
204 %{py3_sitedir}/SQLAlchemy-%{version}-py*.egg-info
208 %defattr(644,root,root,755)
209 %doc doc/{_images,_modules,_static,changelog,core,dialects,faq,orm,*.html,*.js}
212 %defattr(644,root,root,755)
213 %{_examplesdir}/%{name}-%{version}