LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-axiom.spec of Package python-axiom (Project home:netmask)

%{?!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.5.27
Release:        0%{?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
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  %{python}-twisted-core >= 2.1.1
BuildRequires:  %{python}-epsilon >= 0.4.0
BuildRequires:  %{python}-devel
# 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
Requires(post):   %{python}-twisted-conch

%description
A small utility package that depends on tools too recent for Twisted (like
datetime in python2.4) but performs generic enough functions that it can be
used in projects that don't want to share Divmod's other projects' large
footprint.

Currently included:

    * A powerful date/time formatting and import/export class (ExtimeDotTime),
      for exchanging date and time information between all Python's various
      ways to interpret objects as times or time deltas.
    * Tools for managing concurrent asynchronous processes within Twisted.
    * A metaclass which helps you define classes with explicit states.
    * A featureful Version class.
    * A formal system for application of monkey-patches. 

%prep
%setup -n %{origname}-%{version} -q

%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --skip-build --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
%{python_sitelib}/axiom/batch.tac
#%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
%{python_sitelib}/axiom/test/historic/*.tbz2
#%ghost %{python_sitelib}/axiom/test/historic/*.pyo


%changelog
* Sat Feb 09 2007 Mauricio Teixeira <mteixeira@webset.net> 0.5.27
- initial package