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