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