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