]>
Commit | Line | Data |
---|---|---|
0f266947 AF |
1 | # TODO: |
2 | # - examples and docs for python3 | |
a563aeca | 3 | # - builds, but got syntax errors when buildings |
a5d67c27 | 4 | # - rename to python-sqlalchemy to match "import" line |
0f266947 | 5 | # |
54e13700 ER |
6 | %bcond_without python2 # CPython 2.x module |
7 | %bcond_without python3 # CPython 3.x module | |
8 | ||
176bba03 | 9 | %define module SQLAlchemy |
666da082 | 10 | Summary: Database Abstraction Library |
40827375 | 11 | Summary(pl.UTF-8): Biblioteka abstrakcji baz danych |
1ce1e260 | 12 | Name: python-%{module} |
54e13700 | 13 | Version: 0.6.9 |
c16ae5a6 | 14 | Release: 2 |
666da082 | 15 | License: MIT |
4fc44ee0 | 16 | Group: Libraries/Python |
af4c7ed3 | 17 | Source0: http://downloads.sourceforge.net/sqlalchemy/%{module}-%{version}.tar.gz |
54e13700 | 18 | # Source0-md5: 518c5eeca5623bb1fbac74f6917f922a |
666da082 | 19 | URL: http://www.sqlalchemy.org/ |
a5d67c27 ER |
20 | BuildRequires: rpm-pythonprov |
21 | BuildRequires: rpmbuild(macros) >= 1.219 | |
0f266947 | 22 | %if %{with python2} |
d05dd446 | 23 | BuildRequires: python-devel >= 1:2.4 |
a563aeca | 24 | BuildRequires: python-distribute |
666da082 | 25 | BuildRequires: python-setuptools >= 0.6-0.a9.1 |
0f266947 AF |
26 | %endif |
27 | %if %{with python3} | |
cf2a3598 | 28 | BuildRequires: python3-2to3 |
0f266947 | 29 | BuildRequires: python3-devel |
cf2a3598 | 30 | BuildRequires: python3-modules |
0f266947 | 31 | %endif |
0f266947 | 32 | %if %{with python2} |
a5d67c27 | 33 | Requires: 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 |
176bba03 | 80 | %setup -q -n %{module}-%{version} |
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 | |
0f266947 AF |
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 |
a5d67c27 ER |
118 | %{py_sitescriptdir}/sqlalchemy |
119 | %{py_sitescriptdir}/sqlalchemy_nose | |
120 | %{py_sitescriptdir}/SQLAlchemy-%{version}-py*.egg-info | |
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) | |
a5d67c27 ER |
126 | %{py3_sitescriptdir}/sqlalchemy |
127 | %{py3_sitescriptdir}/sqlalchemy_nose | |
128 | %{py3_sitescriptdir}/SQLAlchemy-%{version}-py*.egg-info | |
bcebf730 | 129 | %endif |