]> git.pld-linux.org Git - packages/python-sqlalchemy.git/blob - python-sqlalchemy.spec
- updated to 1.4.50
[packages/python-sqlalchemy.git] / python-sqlalchemy.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  tests   # unit tests
6
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
12 Version:        1.4.50
13 Release:        1
14 License:        MIT
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
24 %if %{with python2}
25 BuildRequires:  python-devel >= 1:2.7
26 BuildRequires:  python-modules >= 1:2.7
27 BuildRequires:  python-setuptools >= 0.6-0.a9.1
28 %if %{with tests}
29 BuildRequires:  python-mock
30 BuildRequires:  python-pytest >= 4.6.11
31 BuildRequires:  python-pytest-xdist
32 %endif
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-devel >= 1:3.4
36 BuildRequires:  python3-modules >= 1:3.4
37 BuildRequires:  python3-setuptools >= 0.6-0.a9.1
38 %if %{with tests}
39 BuildRequires:  python3-pytest >= 6.2
40 BuildRequires:  python3-pytest-xdist
41 %endif
42 %endif
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)
47
48 %description
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.
54
55 Python 2.x version.
56
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.
63
64 Wersja dla pythona 2.x.
65
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
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
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.
88
89 Wersja dla Pythona 3.x.
90
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
95 BuildArch:      noarch
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
107 BuildArch:      noarch
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
115 %prep
116 %setup -q -n SQLAlchemy-%{version}
117 %patch0 -p1
118
119 %build
120 %if %{with python2}
121 %py_build
122
123 %if %{with tests}
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
128 %endif
129 %endif
130
131 %if %{with python3}
132 %py3_build
133
134 %if %{with tests}
135 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
136 PYTHONPATH=$(echo $(pwd)/build-3/lib.linux-*) \
137 %{__python3} -m pytest test
138 %endif
139 %endif
140
141 %install
142 rm -rf $RPM_BUILD_ROOT
143
144 %if %{with python2}
145 %py_install
146
147 %py_postclean
148 %endif
149
150 %if %{with python3}
151 %py3_install
152 %endif
153
154 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
155 cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
156
157 %clean
158 rm -rf $RPM_BUILD_ROOT
159
160 %files
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
181
182 %if %{with python3}
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
205 %endif
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}
This page took 0.061884 seconds and 4 git commands to generate.