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