]>
Commit | Line | Data |
---|---|---|
0f266947 AF |
1 | # TODO: |
2 | # - examples and docs for python3 | |
3 | # | |
4 | %bcond_without python3 | |
5 | %bcond_without python2 | |
176bba03 | 6 | %define module SQLAlchemy |
0f266947 | 7 | # |
666da082 | 8 | Summary: Database Abstraction Library |
40827375 | 9 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych |
666da082 | 10 | Name: python-SQLAlchemy |
c7fa20e4 | 11 | Version: 0.6.0 |
f8e5d67d | 12 | Release: 1 |
666da082 | 13 | License: MIT |
4fc44ee0 | 14 | Group: Libraries/Python |
af4c7ed3 | 15 | Source0: http://downloads.sourceforge.net/sqlalchemy/%{module}-%{version}.tar.gz |
c7fa20e4 | 16 | # Source0-md5: 575c2ca742e9ab3c08c384dbc4861f86 |
666da082 | 17 | URL: http://www.sqlalchemy.org/ |
0f266947 | 18 | %if %{with python2} |
d05dd446 | 19 | BuildRequires: python-devel >= 1:2.4 |
666da082 | 20 | BuildRequires: python-setuptools >= 0.6-0.a9.1 |
0f266947 AF |
21 | %endif |
22 | %if %{with python3} | |
23 | BuildRequires: python3-devel | |
24 | BuildRequires: python3-distribute | |
25 | %endif | |
eff90088 | 26 | BuildRequires: rpm-pythonprov |
bbaffef6 | 27 | BuildRequires: rpmbuild(macros) >= 1.219 |
0f266947 | 28 | %if %{with python2} |
666da082 | 29 | %pyrequires_eq python-modules |
0f266947 | 30 | %endif |
666da082 | 31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
bbaffef6 ER |
35 | The Python SQL toolkit and Object Relational Mapper that gives |
36 | application developers the full power and flexibility of SQL. | |
37 | SQLAlchemy provides a full suite of well known enterprise-level | |
38 | persistence patterns, designed for efficient and high-performing | |
39 | database access, adapted into a simple and Pythonic domain language. | |
666da082 | 40 | |
0f266947 AF |
41 | Python 2.x version. |
42 | ||
2aabef56 | 43 | %description -l pl.UTF-8 |
2aea6699 JB |
44 | Zestaw narzędzi SQL dla Pythona oraz odwzorowań obiektowo-relacyjnych |
45 | dających programistom całą potęgę i elastyczność SQL-a. SQLAlchemy | |
46 | udostępnia pełny zbiór dobrze znanych wzorców trwałości, | |
47 | zaprojektowanych do wydajnego dostępu do baz danych, zaadoptowanych do | |
48 | prostej, pythonowej domeny językowej. | |
f3fd8b7b | 49 | |
0f266947 AF |
50 | Wersja dla pythona 2.x. |
51 | ||
52 | %package -n python3-%{module} | |
53 | Summary: Database Abstraction Library | |
54 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych | |
55 | Group: Libraries/Python | |
56 | ||
57 | %description -n python3-%{module} | |
58 | The Python SQL toolkit and Object Relational Mapper that gives | |
59 | application developers the full power and flexibility of SQL. | |
60 | SQLAlchemy provides a full suite of well known enterprise-level | |
61 | persistence patterns, designed for efficient and high-performing | |
62 | database access, adapted into a simple and Pythonic domain language. | |
63 | ||
64 | Python 3.x version. | |
65 | ||
66 | %description -l pl.UTF-8 -n python3-%{module} | |
67 | Zestaw narzędzi SQL dla Pythona oraz odwzorowań obiektowo-relacyjnych | |
68 | dających programistom całą potęgę i elastyczność SQL-a. SQLAlchemy | |
69 | udostępnia pełny zbiór dobrze znanych wzorców trwałości, | |
70 | zaprojektowanych do wydajnego dostępu do baz danych, zaadoptowanych do | |
71 | prostej, pythonowej domeny językowej. | |
72 | ||
73 | Wersja dla Pythona 3.x. | |
74 | ||
666da082 | 75 | %prep |
176bba03 | 76 | %setup -q -n %{module}-%{version} |
666da082 | 77 | |
78 | %build | |
0f266947 AF |
79 | %if %{with python2} |
80 | %{__python} setup.py build -b build-2 | |
81 | %endif | |
82 | %if %{with python3} | |
83 | %{__python3} setup.py build -b build-3 | |
84 | %endif | |
666da082 | 85 | |
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
0f266947 AF |
88 | %if %{with python2} |
89 | %{__python} setup.py build -b build-2 \ | |
90 | install \ | |
666da082 | 91 | --single-version-externally-managed \ |
92 | --optimize=2 \ | |
93 | --root=$RPM_BUILD_ROOT | |
def14030 | 94 | |
0f266947 AF |
95 | %py_postclean |
96 | %endif | |
97 | ||
98 | %if %{with python3} | |
99 | %{__python3} setup.py build -b build-3 \ | |
100 | install \ | |
101 | --single-version-externally-managed \ | |
102 | --root=$RPM_BUILD_ROOT \ | |
103 | --optimize=2 | |
104 | ||
105 | %py3_postclean | |
106 | %endif | |
107 | ||
3e5d0494 | 108 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
109 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
666da082 | 110 | |
666da082 | 111 | %clean |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %files | |
115 | %defattr(644,root,root,755) | |
def14030 | 116 | %doc CHANGES README* doc/*.html |
666da082 | 117 | %{py_sitescriptdir}/SQLAlchemy* |
118 | %{py_sitescriptdir}/sqlalchemy* | |
2aea6699 | 119 | %{_examplesdir}/%{name}-%{version} |
0f266947 AF |
120 | |
121 | %files -n python3-%{module} | |
122 | %defattr(644,root,root,755) | |
123 | %{py3_sitescriptdir}/SQLAlchemy* | |
124 | %{py3_sitescriptdir}/sqlalchemy* |