%{?!python:%define python python} %{?!pybasever:%{expand:%%define pybasever %(%{__python} -c "import sys ; print sys.version[:3]")}} %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define origname Axiom Name: %{python}-axiom Version: 0.4.0 Release: 2%{?dist} Summary: An in-process object-relational database Group: Development/Libraries License: MIT URL: http://www.divmod.org/trac/wiki/DivmodAxiom Source0: http://divmod.org/trac/attachment/wiki/SoftwareReleases/%{origname}-%{version}.tar.gz?format=raw BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: %{python}-twisted-core >= 2.1.1 BuildRequires: %{python}-epsilon >= 0.4.0 # for FC3 and earlier %if "%{pybasever}" < "2.4" Requires: python(abi) = %{pybasever} %endif Requires: %{python}-twisted-core >= 2.1.1 Requires: %{python}-epsilon >= 0.4.0 Requires: sqlite Requires: python-sqlite2 Requires(post): %{python} Requires(post): %{python}-twisted-core >= 2.1.1 %description Axiom is an object database, or alternatively, an object-relational mapper. Its primary goal is to provide an object-oriented layer with what we consider to be the key aspects of OO, i.e. polymorphism and message dispatch, without hindering the power of an RDBMS. It is designed to "feel pythonic", without encouraging the typical ORM behavior such as potato programming. Axiom provides a full interface to the database, which strongly suggests that you do not write any SQL of your own. Metaprogramming is difficult and dangerous (as many, many SQL injection attacks amply demonstrate). Writing your own SQL is still possible, however, and Axiom does have several methods which return fragments of generated schema if you wish to use them in your own queries. Axiom currently supports only SQLite and does NOT have any features for dealing with concurrency. %prep %setup -n %{origname}-%{version} -q %build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --root $RPM_BUILD_ROOT # so we can ghost it touch $RPM_BUILD_ROOT%{python_sitelib}/axiom/plugins/dropin.cache %clean rm -rf $RPM_BUILD_ROOT %post -p %{__python} from twisted.plugin import IPlugin, getPlugins import axiom.plugins list(getPlugins(IPlugin, axiom.plugins)) %files %defattr(-,root,root,-) %doc NAME.txt %{_bindir}/axiomatic %dir %{python_sitelib}/axiom/ %{python_sitelib}/axiom/*.py %{python_sitelib}/axiom/*.pyc %ghost %{python_sitelib}/axiom/*.pyo %dir %{python_sitelib}/axiom/benchmarks/ %{python_sitelib}/axiom/benchmarks/*.py %{python_sitelib}/axiom/benchmarks/*.pyc %ghost %{python_sitelib}/axiom/benchmarks/*.pyo %dir %{python_sitelib}/axiom/examples/ %{python_sitelib}/axiom/examples/*.py %{python_sitelib}/axiom/examples/*.pyc %ghost %{python_sitelib}/axiom/examples/*.pyo %dir %{python_sitelib}/axiom/plugins/ %{python_sitelib}/axiom/plugins/*.py %{python_sitelib}/axiom/plugins/*.pyc %ghost %{python_sitelib}/axiom/plugins/*.pyo %ghost %{python_sitelib}/axiom/plugins/dropin.cache %dir %{python_sitelib}/axiom/scripts/ %{python_sitelib}/axiom/scripts/*.py %{python_sitelib}/axiom/scripts/*.pyc %ghost %{python_sitelib}/axiom/scripts/*.pyo %dir %{python_sitelib}/axiom/test/ %{python_sitelib}/axiom/test/*.py %{python_sitelib}/axiom/test/*.pyc %ghost %{python_sitelib}/axiom/test/*.pyo %dir %{python_sitelib}/axiom/test/historic/ %{python_sitelib}/axiom/test/historic/*.py %{python_sitelib}/axiom/test/historic/*.pyc %ghost %{python_sitelib}/axiom/test/historic/*.pyo %{python_sitelib}/axiom/test/historic/account1to2.axiom.tbz2 %changelog * Fri Jun 09 2006 Thomas Vander Stichele - 0.4.0-2 - rebuild axiom plugin cache and ghost the dropin.cache file * Thu Jun 08 2006 Thomas Vander Stichele - 0.4.0-1 - initial package