%define oname storm %define _exclude_files_from_autoprov %{python_sitearch}/.*\\.so Summary: Object Relational Mapper for Python Name: python-%{oname} Version: 0.20 Release: %mkrel 10 Source0: https://launchpad.net/storm/trunk/%{version}/+download/%{oname}-%{version}.tar.bz2 License: GPLv2 URL: https://storm.canonical.com/ Group: Development/Python # https://lists.ubuntu.com/archives/storm/2013-June/001492.html Patch0: python-storm-maxint.patch # https://bugs.launchpad.net/storm/+bug/1199578 Patch1: storm-0.20-exclude-tests.patch BuildRequires: pkgconfig(python) BuildRequires: python-setuptools Requires: python-sqlite2 %description Storm is an object-relation mapper (ORM) for the Python language. It allows rows from a relational database to be seen as objects in an object-oriented language like Python. - Storm lets you efficiently access and update large datasets by allowing you to formulate complex queries spanning multiple tables using Python. - Storm allows you to fallback to SQL if needed (or if you just prefer), allowing you to mix "old school" code and ORM code %package mysql Summary: MySQL backend for %{name} Group: Development/Python Requires: %{name} = %{version}-%{release} Requires: python-mysql %description mysql The %{name}-mysql package contains the MySQL database backend for %{name}. %package postgresql Summary: PostgreSQL backend for %{name} Group: Development/Python Requires: %{name} = %{version}-%{release} Requires: python-psycopg2 %description postgresql The %{name}-postgresql package contains the PostgreSQL database backend for %{name}. %package django Summary: Support for using %{name} as Django ORM Group: Development/Python Requires: python-django Requires: %{name}-zope = %{version}-%{release} %description django The %{name}-django package contains an alternative ORM implementation for Django. %package zope Summary: Zope integration for %{name} Group: Development/Python Requires: %{name} = %{version}-%{release} Requires: python-zope-interface %description zope The %{name}-zope package provides Zope integration for %{name}. %package twisted Summary: Twisted integration for %{name} Group: Development/Python Requires: %{name} = %{version}-%{release} Requires: python-twisted-core %description twisted The %{name}-twisted package provides Twisted integration for %{name}. %prep %setup -q -n %{oname}-%{version} %autopatch -p1 %build %py2_build %install %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %files %doc LICENSE NEWS README TODO tests/tutorial.txt %exclude %{python_sitearch}/storm/django %exclude %{python_sitearch}/storm/zope %exclude %{python_sitearch}/storm/cextensions.c %exclude %{python_sitearch}/storm/databases/mysql.* %exclude %{python_sitearch}/storm/databases/postgres.* %exclude %{python_sitearch}/storm/twisted %{python2_sitearch}/storm* %files django %{python2_sitearch}/storm/django %files zope %{python2_sitearch}/storm/zope %files mysql %{python2_sitearch}/storm/databases/mysql.* %files postgresql %{python2_sitearch}/storm/databases/postgres.* %files twisted %{python2_sitearch}/storm/twisted