]>
Commit | Line | Data |
---|---|---|
0f266947 | 1 | # |
54e13700 ER |
2 | %bcond_without python2 # CPython 2.x module |
3 | %bcond_without python3 # CPython 3.x module | |
0b211bb2 | 4 | %bcond_without tests # unit tests |
54e13700 | 5 | |
aabbbe81 | 6 | %define module sqlalchemy |
0b211bb2 JB |
7 | Summary: Database Abstraction Library for Python 2 |
8 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 2 | |
1ce1e260 | 9 | Name: python-%{module} |
0b211bb2 | 10 | Version: 1.2.7 |
909ae053 | 11 | Release: 1 |
666da082 | 12 | License: MIT |
4fc44ee0 | 13 | Group: Libraries/Python |
0b211bb2 JB |
14 | #Source0Download: https://pypi.org/simple/sqlalchemy/ |
15 | Source0: https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz | |
16 | # Source0-md5: d228d11a6f41b94cb3a3789b5cdbd111 | |
17 | Patch0: %{name}-tests.patch | |
666da082 | 18 | URL: http://www.sqlalchemy.org/ |
a5d67c27 | 19 | BuildRequires: rpm-pythonprov |
0b211bb2 | 20 | BuildRequires: rpmbuild(macros) >= 1.714 |
0f266947 | 21 | %if %{with python2} |
0b211bb2 JB |
22 | BuildRequires: python-devel >= 1:2.7 |
23 | BuildRequires: python-modules >= 1:2.7 | |
666da082 | 24 | BuildRequires: python-setuptools >= 0.6-0.a9.1 |
0b211bb2 JB |
25 | %if %{with tests} |
26 | BuildRequires: python-mock | |
27 | BuildRequires: python-pytest >= 2.5.2 | |
28 | BuildRequires: python-pytest-xdist | |
29 | %endif | |
0f266947 AF |
30 | %endif |
31 | %if %{with python3} | |
0b211bb2 JB |
32 | BuildRequires: python3-devel >= 1:3.2 |
33 | BuildRequires: python3-modules >= 1:3.2 | |
34 | BuildRequires: python3-setuptools >= 0.6-0.a9.1 | |
35 | %if %{with tests} | |
36 | BuildRequires: python3-pytest >= 2.5.2 | |
37 | BuildRequires: python3-pytest-xdist | |
0f266947 | 38 | %endif |
0f266947 | 39 | %endif |
0b211bb2 | 40 | Requires: python-modules |
aabbbe81 | 41 | Provides: python-SQLAlchemy = %{version}-%{release} |
2427a309 | 42 | Obsoletes: python-SQLAlchemy < 0.9.8 |
666da082 | 43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
45 | %description | |
bbaffef6 ER |
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. | |
666da082 | 51 | |
0f266947 AF |
52 | Python 2.x version. |
53 | ||
2aabef56 | 54 | %description -l pl.UTF-8 |
0b211bb2 JB |
55 | Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona, |
56 | dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy | |
2aea6699 | 57 | udostępnia pełny zbiór dobrze znanych wzorców trwałości, |
0b211bb2 JB |
58 | zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz |
59 | danych, zaadaptowanych do prostego, pythonowego języka. | |
f3fd8b7b | 60 | |
0f266947 AF |
61 | Wersja dla pythona 2.x. |
62 | ||
63 | %package -n python3-%{module} | |
0b211bb2 JB |
64 | Summary: Database Abstraction Library for Python 3 |
65 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych dla Pythona 3 | |
0f266947 | 66 | Group: Libraries/Python |
aabbbe81 | 67 | Provides: python3-SQLAlchemy = %{version}-%{release} |
2427a309 | 68 | Obsoletes: python3-SQLAlchemy < 0.9.8 |
0f266947 AF |
69 | |
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. | |
76 | ||
77 | Python 3.x version. | |
78 | ||
1ce1e260 | 79 | %description -n python3-%{module} -l pl.UTF-8 |
0b211bb2 JB |
80 | Zestaw narzędzi SQL oraz odwzorowań obiektowo-relacyjnych dla Pythona, |
81 | dający programistom całą potęgę i elastyczność SQL-a. SQLAlchemy | |
0f266947 | 82 | udostępnia pełny zbiór dobrze znanych wzorców trwałości, |
0b211bb2 JB |
83 | zaprojektowanych z myślą o efektywny i wydajnym dostępem do baz |
84 | danych, zaadaptowanych do prostego, pythonowego języka. | |
0f266947 AF |
85 | |
86 | Wersja dla Pythona 3.x. | |
87 | ||
0b211bb2 JB |
88 | %package apidocs |
89 | Summary: API documentation for Python SQLAlchemy module | |
90 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona SQLAlchemy | |
91 | Group: Documentation | |
92 | %if "%{_rpmversion}" >= "5" | |
93 | BuildArch: noarch | |
94 | %endif | |
95 | ||
96 | %description apidocs | |
97 | API documentation for Python SQLAlchemy module. | |
98 | ||
99 | %description apidocs -l pl.UTF-8 | |
100 | Dokumentacja API modułu Pythona SQLAlchemy. | |
101 | ||
102 | %package examples | |
103 | Summary: Examples for Python SQLAlchemy module | |
104 | Summary(pl.UTF-8): Przykłady do modułu Pythona SQLAlchemy | |
105 | Group: Documentation | |
106 | %if "%{_rpmversion}" >= "5" | |
107 | BuildArch: noarch | |
108 | %endif | |
109 | ||
110 | %description examples | |
111 | Examples for Python SQLAlchemy module. | |
112 | ||
113 | %description examples -l pl.UTF-8 | |
114 | Przykłady do modułu Pythona SQLAlchemy. | |
115 | ||
666da082 | 116 | %prep |
aabbbe81 | 117 | %setup -q -n SQLAlchemy-%{version} |
0b211bb2 | 118 | %patch0 -p1 |
666da082 | 119 | |
120 | %build | |
0f266947 | 121 | %if %{with python2} |
0b211bb2 | 122 | %py_build %{?with_tests:test} |
0f266947 | 123 | %endif |
0b211bb2 | 124 | |
0f266947 | 125 | %if %{with python3} |
0b211bb2 | 126 | %py3_build %{?with_tests:test} |
0f266947 | 127 | %endif |
666da082 | 128 | |
129 | %install | |
130 | rm -rf $RPM_BUILD_ROOT | |
0f266947 | 131 | %if %{with python2} |
0b211bb2 | 132 | %py_install |
def14030 | 133 | |
0f266947 AF |
134 | %py_postclean |
135 | %endif | |
136 | ||
137 | %if %{with python3} | |
96131776 | 138 | %py3_install |
0f266947 AF |
139 | %endif |
140 | ||
3e5d0494 | 141 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
0b211bb2 | 142 | cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
666da082 | 143 | |
666da082 | 144 | %clean |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
147 | %files | |
148 | %defattr(644,root,root,755) | |
0b211bb2 JB |
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] | |
aabbbe81 | 165 | %{py_sitedir}/SQLAlchemy-%{version}-py*.egg-info |
0f266947 | 166 | |
bcebf730 | 167 | %if %{with python3} |
0f266947 AF |
168 | %files -n python3-%{module} |
169 | %defattr(644,root,root,755) | |
0b211bb2 JB |
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__ | |
aabbbe81 | 187 | %{py3_sitedir}/SQLAlchemy-%{version}-py*.egg-info |
bcebf730 | 188 | %endif |
0b211bb2 JB |
189 | |
190 | %files apidocs | |
191 | %defattr(644,root,root,755) | |
192 | %doc doc/{_images,_modules,_static,changelog,core,dialects,faq,orm,*.html,*.js} | |
193 | ||
194 | %files examples | |
195 | %defattr(644,root,root,755) | |
196 | %{_examplesdir}/%{name}-%{version} |