]> git.pld-linux.org Git - packages/python-sqlalchemy.git/blob - python-SQLAlchemy.spec
5f54a264161c446e96bd77ab5007a88c7fb7cdeb
[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.8
13 Release:        1
14 License:        MIT
15 Group:          Libraries/Python
16 Source0:        http://downloads.sourceforge.net/sqlalchemy/%{module}-%{version}.tar.gz
17 # Source0-md5:  af56550a6eb8b7a8874b02c97407d73c
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 %endif
107
108 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
109 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %files
115 %defattr(644,root,root,755)
116 %doc CHANGES README* doc/*.html
117 %{py_sitescriptdir}/SQLAlchemy*
118 %{py_sitescriptdir}/sqlalchemy*
119 %{_examplesdir}/%{name}-%{version}
120
121 %if %{with python3}
122 %files -n python3-%{module}
123 %defattr(644,root,root,755)
124 %{py3_sitescriptdir}/SQLAlchemy*
125 %{py3_sitescriptdir}/sqlalchemy*
126 %endif
This page took 0.032235 seconds and 3 git commands to generate.