1 |
%define oname storm |
2 |
%define _exclude_files_from_autoprov %{python_sitearch}/.*\\.so |
3 |
|
4 |
Summary: Object Relational Mapper for Python |
5 |
Name: python-%{oname} |
6 |
Version: 0.20 |
7 |
Release: %mkrel 5 |
8 |
Source0: https://launchpad.net/storm/trunk/%{version}/+download/%{oname}-%{version}.tar.bz2 |
9 |
License: GPLv2 |
10 |
URL: http://storm.canonical.com/ |
11 |
Group: Development/Python |
12 |
# https://lists.ubuntu.com/archives/storm/2013-June/001492.html |
13 |
Patch0: python-storm-maxint.patch |
14 |
# https://bugs.launchpad.net/storm/+bug/1199578 |
15 |
Patch1: storm-0.20-exclude-tests.patch |
16 |
BuildRequires: pkgconfig(python) |
17 |
BuildRequires: python-setuptools |
18 |
Requires: python-sqlite2 |
19 |
|
20 |
%description |
21 |
Storm is an object-relation mapper (ORM) for the Python language. It allows |
22 |
rows from a relational database to be seen as objects in an object-oriented |
23 |
language like Python. |
24 |
|
25 |
- Storm lets you efficiently access and update large datasets by allowing you |
26 |
to formulate complex queries spanning multiple tables using Python. |
27 |
|
28 |
- Storm allows you to fallback to SQL if needed (or if you just prefer), |
29 |
allowing you to mix "old school" code and ORM code |
30 |
|
31 |
%package mysql |
32 |
Summary: MySQL backend for %{name} |
33 |
Group: Development/Python |
34 |
Requires: %{name} = %{version}-%{release} |
35 |
Requires: python-mysql |
36 |
|
37 |
%description mysql |
38 |
The %{name}-mysql package contains the MySQL database backend for |
39 |
%{name}. |
40 |
|
41 |
%package postgresql |
42 |
Summary: PostgreSQL backend for %{name} |
43 |
Group: Development/Python |
44 |
Requires: %{name} = %{version}-%{release} |
45 |
Requires: python-psycopg2 |
46 |
|
47 |
%description postgresql |
48 |
The %{name}-postgresql package contains the PostgreSQL database |
49 |
backend for %{name}. |
50 |
|
51 |
|
52 |
%package django |
53 |
Summary: Support for using %{name} as Django ORM |
54 |
Group: Development/Python |
55 |
Requires: python-django |
56 |
Requires: %{name}-zope = %{version}-%{release} |
57 |
|
58 |
%description django |
59 |
The %{name}-django package contains an alternative ORM implementation |
60 |
for Django. |
61 |
|
62 |
|
63 |
%package zope |
64 |
Summary: Zope integration for %{name} |
65 |
Group: Development/Python |
66 |
Requires: %{name} = %{version}-%{release} |
67 |
Requires: python-zope-interface |
68 |
|
69 |
%description zope |
70 |
The %{name}-zope package provides Zope integration for %{name}. |
71 |
|
72 |
|
73 |
%package twisted |
74 |
Summary: Twisted integration for %{name} |
75 |
Group: Development/Python |
76 |
Requires: %{name} = %{version}-%{release} |
77 |
Requires: python-twisted-core |
78 |
|
79 |
%description twisted |
80 |
The %{name}-twisted package provides Twisted integration for %{name}. |
81 |
|
82 |
|
83 |
%prep |
84 |
%setup -q -n %{oname}-%{version} |
85 |
%patch0 -p1 |
86 |
%patch1 -p1 |
87 |
|
88 |
%build |
89 |
%{__python} setup.py build |
90 |
|
91 |
%install |
92 |
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT |
93 |
|
94 |
%files |
95 |
%doc LICENSE NEWS README TODO tests/tutorial.txt |
96 |
%exclude %{python_sitearch}/storm/django |
97 |
%exclude %{python_sitearch}/storm/zope |
98 |
%exclude %{python_sitearch}/storm/cextensions.c |
99 |
%exclude %{python_sitearch}/storm/databases/mysql.* |
100 |
%exclude %{python_sitearch}/storm/databases/postgres.* |
101 |
%exclude %{python_sitearch}/storm/twisted |
102 |
%{python_sitearch}/storm* |
103 |
|
104 |
%files django |
105 |
%{python_sitearch}/storm/django |
106 |
|
107 |
%files zope |
108 |
%{python_sitearch}/storm/zope |
109 |
|
110 |
%files mysql |
111 |
%{python_sitearch}/storm/databases/mysql.* |
112 |
|
113 |
%files postgresql |
114 |
%{python_sitearch}/storm/databases/postgres.* |
115 |
|
116 |
%files twisted |
117 |
%{python_sitearch}/storm/twisted |