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