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