]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - examples and docs for python3 | |
3 | # | |
4 | %bcond_without python3 | |
5 | %bcond_without python2 | |
6 | %define module SQLAlchemy | |
7 | # | |
8 | Summary: Database Abstraction Library | |
9 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych | |
10 | Name: python-SQLAlchemy | |
11 | Version: 0.6.0 | |
12 | Release: 1 | |
13 | License: MIT | |
14 | Group: Libraries/Python | |
15 | Source0: http://downloads.sourceforge.net/sqlalchemy/%{module}-%{version}.tar.gz | |
16 | # Source0-md5: 575c2ca742e9ab3c08c384dbc4861f86 | |
17 | URL: http://www.sqlalchemy.org/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-devel >= 1:2.4 | |
20 | BuildRequires: python-setuptools >= 0.6-0.a9.1 | |
21 | %endif | |
22 | %if %{with python3} | |
23 | BuildRequires: python3-devel | |
24 | BuildRequires: python3-distribute | |
25 | BuildRequires: python3-2to3 | |
26 | %endif | |
27 | BuildRequires: rpm-pythonprov | |
28 | BuildRequires: rpmbuild(macros) >= 1.219 | |
29 | %if %{with python2} | |
30 | %pyrequires_eq python-modules | |
31 | %endif | |
32 | BuildArch: noarch | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
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. | |
41 | ||
42 | Python 2.x version. | |
43 | ||
44 | %description -l pl.UTF-8 | |
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. | |
50 | ||
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 | ||
76 | %prep | |
77 | %setup -q -n %{module}-%{version} | |
78 | ||
79 | %build | |
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 | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | %if %{with python2} | |
90 | %{__python} setup.py build -b build-2 \ | |
91 | install \ | |
92 | --single-version-externally-managed \ | |
93 | --optimize=2 \ | |
94 | --root=$RPM_BUILD_ROOT | |
95 | ||
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 | ||
109 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
110 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
111 | ||
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc CHANGES README* doc/*.html | |
118 | %{py_sitescriptdir}/SQLAlchemy* | |
119 | %{py_sitescriptdir}/sqlalchemy* | |
120 | %{_examplesdir}/%{name}-%{version} | |
121 | ||
122 | %files -n python3-%{module} | |
123 | %defattr(644,root,root,755) | |
124 | %{py3_sitescriptdir}/SQLAlchemy* | |
125 | %{py3_sitescriptdir}/sqlalchemy* |