bfd07e
%if ! 0%{?rhel} > 5
bfd07e
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
bfd07e
%endif
bfd07e
bfd07e
%if 0%{?fedora} > 12
bfd07e
%global with_python3 1
bfd07e
%endif
bfd07e
bfd07e
%if 0%{?rhel}
bfd07e
%global with_tests 0
bfd07e
%else
bfd07e
%global with_tests 1
bfd07e
%endif
bfd07e
bfd07e
bfd07e
bfd07e
%global srcname SQLAlchemy
bfd07e
bfd07e
Name:           python-sqlalchemy
bfd07e
Version:        0.9.8
bfd07e
Release:        1%{?dist}
bfd07e
Summary:        Modular and flexible ORM library for python
bfd07e
bfd07e
Group:          Development/Libraries
bfd07e
License:        MIT
bfd07e
URL:            http://www.sqlalchemy.org/
bfd07e
Source0:        http://pypi.python.org/packages/source/S/%{srcname}/%{srcname}-%{version}.tar.gz
bfd07e
Patch0:         python-sqlalchemy-0.9.7-nose-use-build.patch
bfd07e
# Work around failing types test
bfd07e
# https://bitbucket.org/zzzeek/sqlalchemy/issue/3144
bfd07e
Patch1:         python-sqlalchemy-0.9.7-types-test-workaround.patch
bfd07e
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
bfd07e
bfd07e
BuildRequires:  python2-devel >= 2.6
bfd07e
BuildRequires:  python-setuptools
bfd07e
bfd07e
%if 0%{with_tests}
bfd07e
BuildRequires:  python-nose
bfd07e
BuildRequires:  python-mock
bfd07e
%endif
bfd07e
bfd07e
%if 0%{?with_python3}
bfd07e
BuildRequires:  python3-devel
bfd07e
BuildRequires:  python3-setuptools
bfd07e
BuildRequires:  python3-nose
bfd07e
%endif
bfd07e
bfd07e
%description
bfd07e
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
bfd07e
high-level interface to SQL databases.  Database and domain concepts are
bfd07e
decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
bfd07e
provides a powerful mapping layer that can work as automatically or as manually
bfd07e
as you choose, determining relationships based on foreign keys or letting you
bfd07e
define the join conditions explicitly, to bridge the gap between database and
bfd07e
domain.
bfd07e
bfd07e
This package includes the python 2 version of the module.
bfd07e
bfd07e
%if 0%{?with_python3}
bfd07e
%package -n python3-sqlalchemy
bfd07e
Summary:        Modular and flexible ORM library for python
bfd07e
Group:          Development/Libraries
bfd07e
bfd07e
%description -n python3-sqlalchemy
bfd07e
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
bfd07e
high-level interface to SQL databases.  Database and domain concepts are
bfd07e
decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
bfd07e
provides a powerful mapping layer that can work as automatically or as manually
bfd07e
as you choose, determining relationships based on foreign keys or letting you
bfd07e
define the join conditions explicitly, to bridge the gap between database and
bfd07e
domain.
bfd07e
bfd07e
This package includes the python 3 version of the module.
bfd07e
%endif # with_python3
bfd07e
bfd07e
# Filter unnecessary dependencies
bfd07e
%global __provides_exclude_from ^(%{python_sitearch}|%{python3_sitearch})/.*\\.so$
bfd07e
bfd07e
%prep
bfd07e
%setup -q -n %{srcname}-%{version}
bfd07e
%patch0 -p1 -b .nose-use-build
bfd07e
%patch1 -p1 -b .types-test-workaround
bfd07e
bfd07e
%if 0%{?with_python3}
bfd07e
rm -rf %{py3dir}
bfd07e
cp -a . %{py3dir}
bfd07e
%endif # with_python3
bfd07e
bfd07e
%build
bfd07e
sed -i 1d lib/sqlalchemy/testing/runner.py
bfd07e
CFLAGS="%{optflags}" %{__python} setup.py --with-cextensions build
bfd07e
bfd07e
%if 0%{?with_python3}
bfd07e
pushd %{py3dir}
bfd07e
CFLAGS="%{optflags}" %{__python3} setup.py --with-cextensions build
bfd07e
popd
bfd07e
%endif
bfd07e
bfd07e
%install
bfd07e
rm -rf %{buildroot}
bfd07e
bfd07e
mkdir -p %{buildroot}%{python_sitelib}
bfd07e
%{__python} setup.py --with-cextensions install --skip-build --root %{buildroot}
bfd07e
bfd07e
%if 0%{?with_python3}
bfd07e
pushd %{py3dir}
bfd07e
mkdir -p %{buildroot}%{python3_sitelib}
bfd07e
%{__python3} setup.py --with-cextensions install --skip-build --root %{buildroot}
bfd07e
popd
bfd07e
%endif
bfd07e
bfd07e
# remove unnecessary scripts for building documentation
bfd07e
rm -rf doc/build
bfd07e
bfd07e
%clean
bfd07e
rm -rf %{buildroot}
bfd07e
bfd07e
%check
bfd07e
%if 0%{with_tests}
bfd07e
%{__python} ./sqla_nose.py
bfd07e
bfd07e
%if 0%{?with_python3}
bfd07e
pushd %{py3dir}
bfd07e
%{__python3} ./sqla_nose.py
bfd07e
popd
bfd07e
%endif
bfd07e
%endif # with_tests
bfd07e
bfd07e
bfd07e
%files
bfd07e
%defattr(-,root,root,-)
bfd07e
%doc README.rst LICENSE PKG-INFO CHANGES doc examples
bfd07e
%{python_sitearch}/*
bfd07e
bfd07e
%if 0%{?with_python3}
bfd07e
%files -n python3-sqlalchemy
bfd07e
%defattr(-,root,root,-)
bfd07e
%doc LICENSE PKG-INFO doc examples
bfd07e
%{python3_sitearch}/*
bfd07e
%endif # with_python3
bfd07e
bfd07e
%changelog
bfd07e
* Wed May 20 2015 Matej Stuchlik <mstuchli@redhat.com> - 0.9.8-1
bfd07e
- Update to 0.9.8
bfd07e
Resolves: rhbz#1209690
bfd07e
bfd07e
* Tue Sep 30 2014 P J P <pjp@fedoraproject.org> - 0.9.7-3
bfd07e
- Fixed rpmlint error improper permissions ../testing/runner.py
bfd07e
bfd07e
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.7-2
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
bfd07e
bfd07e
* Tue Jul 29 2014 Nils Philippsen <nils@redhat.com> - 0.9.7-1
bfd07e
- version 0.9.7, upstream feature and bugfix release
bfd07e
bfd07e
* Mon Jun 30 2014 Nils Philippsen <nils@redhat.com> - 0.9.6-1
bfd07e
- version 0.9.6, upstream feature and bugfix release
bfd07e
bfd07e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-3
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
bfd07e
bfd07e
* Fri May 16 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.4-2
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
bfd07e
bfd07e
* Thu May 15 2014 Nils Philippsen <nils@redhat.com> - 0.9.4-1
bfd07e
- version 0.9.4, upstream feature and bugfix release
bfd07e
bfd07e
* Thu Feb 20 2014 Nils Philippsen <nils@redhat.com> - 0.9.3-1
bfd07e
- version 0.9.3, upstream feature and bugfix release
bfd07e
bfd07e
* Wed Feb 05 2014 Nils Philippsen <nils@redhat.com> - 0.9.2-1
bfd07e
- version 0.9.2, upstream feature and bugfix release
bfd07e
bfd07e
* Tue Jan 07 2014 Nils Philippsen <nils@redhat.com> - 0.9.1-1
bfd07e
- version 0.9.1, upstream feature and bugfix release
bfd07e
- no need to use 2to3 for python 3.x anymore
bfd07e
- build C extension for python 3.x
bfd07e
- require python2-devel >= 2.6 for building
bfd07e
bfd07e
* Mon Dec 09 2013 Nils Philippsen <nils@redhat.com> - 0.8.4-1
bfd07e
- version 0.8.4, upstream bugfix release
bfd07e
bfd07e
* Tue Oct 29 2013 Nils Philippsen <nils@redhat.com> - 0.8.3-1
bfd07e
- version 0.8.3, upstream bugfix release
bfd07e
bfd07e
* Wed Aug 14 2013 Nils Philippsen <nils@redhat.com> - 0.8.2-1
bfd07e
- version 0.8.2, upstream bugfix release
bfd07e
- drop obsolete sqlalchemy-test-bidirectional-order patch
bfd07e
- fix bogus date in changelog
bfd07e
bfd07e
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-2
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bfd07e
bfd07e
* Mon Apr 29 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.8.1-1
bfd07e
- Upstream bugfix
bfd07e
- Stop calling sa2to3 explicitly on the library.  It seems to break mapper.py's
bfd07e
  import of collections.deque
bfd07e
bfd07e
* Fri Apr 12 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.8.0-1
bfd07e
- Final release of 0.8.0
bfd07e
- Fix for a unittest that assumes order in dicts
bfd07e
bfd07e
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.0-0.2.b1
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bfd07e
bfd07e
* Thu Nov  1 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.8.0-0.1.b1
bfd07e
- Update to 0.8.0 beta
bfd07e
bfd07e
* Mon Aug 13 2012 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.8-4.20120813hg8535
bfd07e
- Update to a snapshot to fix unittest errors with python-3.3
bfd07e
bfd07e
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 0.7.8-3
bfd07e
- remove rhel logic from with_python3 conditional
bfd07e
bfd07e
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.8-2
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
bfd07e
bfd07e
* Mon Jun 18 2012 Nils Philippsen <nils@redhat.com> - 0.7.8-1
bfd07e
- Upstream bugfix release
bfd07e
bfd07e
* Tue May 15 2012 Nils Philippsen <nils@redhat.com> - 0.7.7-1
bfd07e
- Upstream bugfix release
bfd07e
bfd07e
* Tue Mar 20 2012 Nils Philippsen <nils@redhat.com> - 0.7.6-1
bfd07e
- Upstream bugfix release
bfd07e
bfd07e
* Mon Jan 30 2012 Nils Philippsen <nils@redhat.com> - 0.7.5-1
bfd07e
- Upstream bugfix release
bfd07e
- package README.rst instead of README as documentation
bfd07e
bfd07e
* Tue Jan 10 2012 Nils Philippsen <nils@redhat.com> - 0.7.3-2
bfd07e
- rebuild for gcc 4.7
bfd07e
bfd07e
* Mon Oct 17 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.3-1
bfd07e
- Upstream bugfix release
bfd07e
bfd07e
* Mon Aug 1 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.2-1
bfd07e
- Upstream bugfix release
bfd07e
bfd07e
* Mon Jun 06 2011 Nils Philippsen <nils@redhat.com> - 0.7.1-1
bfd07e
- 0.7.1 Upstream release
bfd07e
- no need to fix examples/dynamic_dict/dynamic_dict.py anymore
bfd07e
- use sqla_nose.py to fix %%check
bfd07e
bfd07e
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.6-2
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
bfd07e
bfd07e
* Mon Jan 17 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.6-1
bfd07e
- 0.6.6 Upstream release
bfd07e
bfd07e
* Fri Dec 3 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.5-1
bfd07e
- 0.6.5 Upstream release
bfd07e
bfd07e
* Wed Sep 29 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.4-2
bfd07e
- Filter out the C extensions from provides
bfd07e
bfd07e
* Tue Sep 07 2010 Luke Macken <lmacken@redhat.com> - 0.6.4-1
bfd07e
- 0.6.4 upstream release
bfd07e
bfd07e
* Mon Aug 23 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.3-1
bfd07e
- 0.6.3 upstream release
bfd07e
bfd07e
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com>
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
bfd07e
bfd07e
* Thu Jun 24 2010 Nils Philippsen <nils@redhat.com> - 0.6.1-1
bfd07e
- 0.6.1 upstream release
bfd07e
bfd07e
* Tue Apr 13 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6-0.4.beta3
bfd07e
- Build beta3
bfd07e
bfd07e
* Fri Mar 19 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6-0.3.beta2
bfd07e
- Build beta2 with cextension
bfd07e
bfd07e
* Sun Mar 7 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6-0.2.beta1
bfd07e
- Build python3 package
bfd07e
bfd07e
* Tue Mar 2 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6-0.1.beta1
bfd07e
- 0.6 beta1 upstream release
bfd07e
bfd07e
* Tue Feb 2 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5.8-3
bfd07e
- One last cleanup
bfd07e
bfd07e
* Tue Feb 2 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5.8-2
bfd07e
- just some cleanups to older styles of building packages.
bfd07e
bfd07e
* Mon Feb 1 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5.8-1
bfd07e
- Upstream bugfix release 0.5.8
bfd07e
bfd07e
* Fri Aug 14 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5.5-2
bfd07e
- Upstream bugfix release 0.5.5
bfd07e
bfd07e
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.4-2.p2
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
bfd07e
bfd07e
* Fri Jun 12 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5.4-1.p2
bfd07e
- Upstream bugfix release 0.5.4p2.
bfd07e
bfd07e
* Thu Apr 16 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5.3-1
bfd07e
- Upstream bugfix release.
bfd07e
bfd07e
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-2
bfd07e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
bfd07e
bfd07e
* Wed Feb 11 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5.2-1
bfd07e
- Update to 0.5.2
bfd07e
bfd07e
* Wed Jan 21 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5.1-1
bfd07e
- Update to 0.5.1.
bfd07e
bfd07e
* Mon Dec 1 2008 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5-0.1.rc4
bfd07e
- Update to 0.5.0rc4 which works with the new pysqlite
bfd07e
- And update test cases to work with the new pysqlite
bfd07e
bfd07e
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.4.7-2
bfd07e
- Rebuild for Python 2.6
bfd07e
bfd07e
* Sun Jul 27 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.7-1
bfd07e
- Update to 0.4.7.
bfd07e
bfd07e
* Sun Jun 1 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.6-1
bfd07e
- Update to 0.4.6.
bfd07e
bfd07e
* Tue Apr 8 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.5-1
bfd07e
- Update to 0.4.5.
bfd07e
bfd07e
* Fri Feb 22 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.3-1
bfd07e
- Update to 0.4.3.
bfd07e
bfd07e
* Tue Dec 11 2007 Toshio Kuratomi <a.badger@gmail.com> 0.4.2-1.p3
bfd07e
- Update to 0.4.2p3.
bfd07e
bfd07e
* Tue Dec 11 2007 Toshio Kuratomi <a.badger@gmail.com> 0.4.1-1
bfd07e
- Update to 0.4.1.
bfd07e
bfd07e
* Wed Oct 17 2007 Toshio Kuratomi <a.badger@gmail.com> 0.4.0-1
bfd07e
- SQLAlchemy-0.4.0 final
bfd07e
- Run the testsuite
bfd07e
bfd07e
* Wed Oct  3 2007 Luke Macken <lmacken@redhat.com> 0.4.0-0.4.beta6
bfd07e
- SQLAlchemy-0.4.0beta6
bfd07e
bfd07e
* Tue Sep 11 2007 Toshio Kuratomi <a.badger@gmail.com> - 0.4.0-0.4.beta5
bfd07e
- Update to 0.4beta5.
bfd07e
bfd07e
* Fri Sep 07 2007 Toshio Kuratomi <a.badger@gmail.com> - 0.4.0-0.4.beta4
bfd07e
- setuptools has been fixed.
bfd07e
bfd07e
* Fri Aug 31 2007 Toshio Kuratomi <a.badger@gmail.com> - 0.4.0-0.3.beta4
bfd07e
- setuptools seems to be broken WRT having an active and inactive version
bfd07e
  of an egg.  Have to make both versions inactive and manually setup a copy
bfd07e
  that can be started via import. (Necessary for the sqlalchemy0.3 compat
bfd07e
  package.)
bfd07e
bfd07e
* Tue Aug 28 2007 Toshio Kuratomi <a.badger@gmail.com> - 0.4.0-0.2.beta4
bfd07e
- Modify setuptools to handle the -devel subpackage split in F-8.
bfd07e
bfd07e
* Mon Aug 27 2007 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.4.0-0.1.beta4
bfd07e
- Update to 0.4 beta4.
bfd07e
bfd07e
* Tue Jul 24 2007 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.10-2
bfd07e
- Remove python-abi Requires.  This is automatic since FC4+.
bfd07e
bfd07e
* Tue Jul 24 2007 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.10-1
bfd07e
- Update to new upstream version 0.3.10
bfd07e
bfd07e
* Fri Mar 23 2007 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.6-1
bfd07e
- Update to new upstream version 0.3.6
bfd07e
bfd07e
* Sat Mar 10 2007 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.5-1
bfd07e
- Update to new upstream version 0.3.5
bfd07e
- Simplify the files listing
bfd07e
bfd07e
* Tue Jan 23 2007 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.4-2
bfd07e
- Remember to upload the source tarball to the lookaside cache.
bfd07e
bfd07e
* Tue Jan 23 2007 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.4-1
bfd07e
- Update to new upstream version 0.3.4
bfd07e
bfd07e
* Mon Jan 01 2007 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.3-1
bfd07e
- Update to new upstream version 0.3.3
bfd07e
bfd07e
* Sat Dec 09 2006 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.1-2
bfd07e
- Bump and rebuild for python 2.5 on devel.
bfd07e
- BuildRequire: python-devel as a header is missing otherwise.
bfd07e
bfd07e
* Fri Nov 24 2006 Toshio Kuratomi <toshio@tiki-lounge.com> - 0.3.1-1
bfd07e
- Update to new upstream version 0.3.1
bfd07e
bfd07e
* Sat Sep 16 2006 Shahms E. King <shahms@shahms.com> 0.2.7-2
bfd07e
- Rebuild for FC6
bfd07e
bfd07e
* Thu Aug 17 2006 Shahms E. King <shahms@shahms.com> 0.2.7-1
bfd07e
- Update to new upstream version
bfd07e
bfd07e
* Fri Aug 11 2006 Shahms E. King <shahms@shahms.com> 0.2.6-2
bfd07e
- Include, don't ghost .pyo files per new guidelines
bfd07e
bfd07e
* Tue Aug 08 2006 Shahms E. King <shahms@shahms.com> 0.2.6-1
bfd07e
- Update to new upstream version
bfd07e
bfd07e
* Fri Jul 07 2006 Shahms E. King <shahms@shahms.com> 0.2.4-1
bfd07e
- Update to new upstream version
bfd07e
bfd07e
* Mon Jun 26 2006 Shahms E. King <shahms@shahms.com> 0.2.3-1
bfd07e
- Update to new upstream version
bfd07e
bfd07e
* Wed May 31 2006 Shahms E. King <shahms@shahms.com> 0.2.1-1
bfd07e
- Update to new upstream version