Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > b0e3d55869948c173a166c7dbb4eeb26 > files > 1

python-sqlalchemy-traversal-0.4.1-2.fc18.src.rpm

%if 0%{?fedora} > 12 || 0%{?rhel} > 6
#%%global with_python3 1

# Manually disable this until some of the dependencies are available.  Notably,
# python3-colander and python3-pyramid are missing.  They should be available
# soonish.
%global with_python3 0

%endif

%global modname sqlalchemy_traversal

Name:               python-sqlalchemy-traversal
Version:            0.4.1
Release:            2%{?dist}
Summary:            A pyramid extension for traversal with SQLAlchemy objects
Group:              Development/Libraries
# License discussion
# https://github.com/eventray/sqlalchemy_traversal/issues/1
License:            MIT
URL:                http://pypi.python.org/pypi/sqlalchemy_traversal
Source0:            http://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz

BuildArch:          noarch


BuildRequires:      python2-devel
BuildRequires:      python-setuptools

BuildRequires:      python-pyramid
BuildRequires:      python-sqlalchemy
BuildRequires:      python-zope-interface
BuildRequires:      python-colander
BuildRequires:      python-venusian

BuildRequires:      pytest
BuildRequires:      python-mock
BuildRequires:      python-webtest
BuildRequires:      python-unittest2

Requires:           python-pyramid
Requires:           python-sqlalchemy
Requires:           python-zope-interface
Requires:           python-colander
Requires:           python-venusian

%if 0%{?with_python3}
BuildRequires:      python3-devel
BuildRequires:      python3-setuptools

BuildRequires:      python3-pyramid
BuildRequires:      python3-sqlalchemy
BuildRequires:      python3-zope-interface
BuildRequires:      python3-colander
BuildRequires:      python3-venusian

BuildRequires:      python3-pytest
BuildRequires:      python3-mock
BuildRequires:      python3-webtest

Requires:           python3-pyramid
Requires:           python3-sqlalchemy
Requires:           python3-zope-interface
Requires:           python3-colander
Requires:           python3-venusian
%endif

%description
This is a pyramid extension that allows you to use traversal with SQLAlchemy
objects


%if 0%{?with_python3}
%package -n python3-sqlalchemy-traversal
Summary:            A pyramid extension for traversal with SQLAlchemy objects
Group:              Development/Libraries

%description -n python3-sqlalchemy-traversal
This is a pyramid extension that allows you to use traversal with SQLAlchemy
objects

%endif

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

# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info

# Force that a certain version of webob is imported and not the older one.
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"WebOb>=1.2b3\"]; import pkg_resources"}1' setup.py > setup.py.tmp
mv setup.py.tmp setup.py

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif

%build
%{__python} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif


%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
popd
%endif
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}

%check
%{__python} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif

%files
%doc
# README.md and LICENSE should be included in subsequent releases.
# https://github.com/eventray/sqlalchemy_traversal/issues/2
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}*

%if 0%{?with_python3}
%files -n python3-sqlalchemy-traversal
%doc
# README.md and LICENSE should be included in subsequent releases.
# https://github.com/eventray/sqlalchemy_traversal/issues/2
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}-*

%endif

%changelog
* Wed Dec 12 2012 Ralph Bean <rbean@redhat.com> - 0.4.1-2
- Force that the latest version of webob be included by setuptools with awk.

* Fri Dec 07 2012 Ralph Bean <rbean@redhat.com> - 0.4.1-1
- Initial packaging for Fedora