2 %bcond_without python2 # CPython 2.x module
3 %bcond_without python3 # CPython 3.x module
4 %bcond_without tests # unit tests
6 %define module sqlalchemy
7 Summary: Database Abstraction Library for Python 2
8 Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 2
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/sqlalchemy/
15 Source0: https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz
16 # Source0-md5: 0448f6f777cbca996bd0b2490ebde9cf
17 Patch0: %{name}-tests.patch
18 URL: http://www.sqlalchemy.org/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-devel >= 1:2.7
23 BuildRequires: python-modules >= 1:2.7
24 BuildRequires: python-setuptools >= 0.6-0.a9.1
26 BuildRequires: python-mock
27 BuildRequires: python-pytest >= 2.5.2
28 BuildRequires: python-pytest-xdist
32 BuildRequires: python3-devel >= 1:3.2
33 BuildRequires: python3-modules >= 1:3.2
34 BuildRequires: python3-setuptools >= 0.6-0.a9.1
36 BuildRequires: python3-pytest >= 2.5.2
37 BuildRequires: python3-pytest-xdist
40 Requires: python-modules
41 Provides: python-SQLAlchemy = %{version}-%{release}
42 Obsoletes: python-SQLAlchemy < 0.9.8
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 The Python SQL toolkit and Object Relational Mapper that gives
47 application developers the full power and flexibility of SQL.
48 SQLAlchemy provides a full suite of well known enterprise-level
49 persistence patterns, designed for efficient and high-performing
50 database access, adapted into a simple and Pythonic domain language.
54 %description -l pl.UTF-8
55 Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona,
56 dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
57 udostępnia pełny zbiór dobrze znanych wzorców trwałości,
58 zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz
59 danych, zaadaptowanych do prostego, pythonowego języka.
61 Wersja dla pythona 2.x.
63 %package -n python3-%{module}
64 Summary: Database Abstraction Library for Python 3
65 Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 3
66 Group: Libraries/Python
67 Provides: python3-SQLAlchemy = %{version}-%{release}
68 Obsoletes: python3-SQLAlchemy < 0.9.8
70 %description -n python3-%{module}
71 The Python SQL toolkit and Object Relational Mapper that gives
72 application developers the full power and flexibility of SQL.
73 SQLAlchemy provides a full suite of well known enterprise-level
74 persistence patterns, designed for efficient and high-performing
75 database access, adapted into a simple and Pythonic domain language.
79 %description -n python3-%{module} -l pl.UTF-8
80 Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona,
81 dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy
82 udostępnia pełny zbiór dobrze znanych wzorców trwałości,
83 zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz
84 danych, zaadaptowanych do prostego, pythonowego języka.
86 Wersja dla Pythona 3.x.
89 Summary: API documentation for Python SQLAlchemy module
90 Summary(pl.UTF-8): Dokumentacja API modułu Pythona SQLAlchemy
92 %if "%{_rpmversion}" >= "5"
97 API documentation for Python SQLAlchemy module.
99 %description apidocs -l pl.UTF-8
100 Dokumentacja API modułu Pythona SQLAlchemy.
103 Summary: Examples for Python SQLAlchemy module
104 Summary(pl.UTF-8): Przykłady do modułu Pythona SQLAlchemy
106 %if "%{_rpmversion}" >= "5"
110 %description examples
111 Examples for Python SQLAlchemy module.
113 %description examples -l pl.UTF-8
114 Przykłady do modułu Pythona SQLAlchemy.
117 %setup -q -n SQLAlchemy-%{version}
122 %py_build %{?with_tests:test}
126 %py3_build %{?with_tests:test}
130 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
142 cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
145 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
149 %doc AUTHORS CHANGES LICENSE README.rst
150 %dir %{py_sitedir}/sqlalchemy
151 %{py_sitedir}/sqlalchemy/connectors
152 %{py_sitedir}/sqlalchemy/databases
153 %{py_sitedir}/sqlalchemy/dialects
154 %{py_sitedir}/sqlalchemy/engine
155 %{py_sitedir}/sqlalchemy/event
156 %{py_sitedir}/sqlalchemy/ext
157 %{py_sitedir}/sqlalchemy/orm
158 %{py_sitedir}/sqlalchemy/sql
159 %{py_sitedir}/sqlalchemy/testing
160 %{py_sitedir}/sqlalchemy/util
161 %attr(755,root,root) %{py_sitedir}/sqlalchemy/cprocessors.so
162 %attr(755,root,root) %{py_sitedir}/sqlalchemy/cresultproxy.so
163 %attr(755,root,root) %{py_sitedir}/sqlalchemy/cutils.so
164 %{py_sitedir}/sqlalchemy/*.py[co]
165 %{py_sitedir}/SQLAlchemy-%{version}-py*.egg-info
168 %files -n python3-%{module}
169 %defattr(644,root,root,755)
170 %doc AUTHORS CHANGES LICENSE README.rst
171 %dir %{py3_sitedir}/sqlalchemy
172 %{py3_sitedir}/sqlalchemy/connectors
173 %{py3_sitedir}/sqlalchemy/databases
174 %{py3_sitedir}/sqlalchemy/dialects
175 %{py3_sitedir}/sqlalchemy/engine
176 %{py3_sitedir}/sqlalchemy/event
177 %{py3_sitedir}/sqlalchemy/ext
178 %{py3_sitedir}/sqlalchemy/orm
179 %{py3_sitedir}/sqlalchemy/sql
180 %{py3_sitedir}/sqlalchemy/testing
181 %{py3_sitedir}/sqlalchemy/util
182 %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cprocessors.cpython-*.so
183 %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cresultproxy.cpython-*.so
184 %attr(755,root,root) %{py3_sitedir}/sqlalchemy/cutils.cpython-*.so
185 %{py3_sitedir}/sqlalchemy/*.py
186 %{py3_sitedir}/sqlalchemy/__pycache__
187 %{py3_sitedir}/SQLAlchemy-%{version}-py*.egg-info
191 %defattr(644,root,root,755)
192 %doc doc/{_images,_modules,_static,changelog,core,dialects,faq,orm,*.html,*.js}
195 %defattr(644,root,root,755)
196 %{_examplesdir}/%{name}-%{version}