%global modname datanommer.models Name: python-datanommer-models Version: 0.4.3 Release: 1%{?dist} Summary: SQLAlchemy models for datanommer Group: Development/Libraries License: GPLv3+ URL: http://pypi.python.org/pypi/%{modname} Source0: http://pypi.python.org/packages/source/d/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-nose BuildRequires: fedmsg Requires: fedmsg BuildRequires: python-alembic Requires: python-alembic %if %{?rhel}%{!?rhel:0} >= 6 BuildRequires: python-sqlalchemy0.7 Requires: python-sqlalchemy0.7 %else BuildRequires: python-sqlalchemy >= 0.7 Requires: python-sqlalchemy >= 0.7 %endif %description SQLAlchemy models for datanommer. %prep %setup -q -n %{modname}-%{version} # Make sure that epel/rhel picks up the correct version of sqlalchemy %{__awk} 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"sqlalchemy>=0.7\"]; import pkg_resources"}1' setup.py > setup.py.tmp %{__mv} setup.py.tmp setup.py # Remove upstream egg-info so that it gets rebuilt. rm -rf *.egg-info %build %{__python} setup.py build %install %{__python} setup.py install -O1 --skip-build --root=%{buildroot} # fedmsg owns this directory, but we're going to add a file. %{__mkdir_p} %{buildroot}%{_sysconfdir}/fedmsg.d/ %{__cp} fedmsg.d/example-datanommer.py %{buildroot}%{_sysconfdir}/fedmsg.d/datanommer.py # DB upgrade/downgrade scripts %{__mkdir_p} %{buildroot}%{_datadir}/%{modname}/ %{__cp} alembic.ini %{buildroot}%{_datadir}/%{modname}/alembic.ini %{__cp} -r alembic/ %{buildroot}%{_datadir}/%{modname}/alembic/ %check %{__python} setup.py test %files %doc README.rst LICENSE %{python_sitelib}/datanommer/ %{python_sitelib}/%{modname}-%{version}* %{_datadir}/%{modname}/ %config(noreplace) %{_sysconfdir}/fedmsg.d/datanommer.py* %changelog * Mon Apr 22 2013 Ralph Bean - 0.4.3-1 - Bugfixes to category assignment. - New convenience classmethods on Message, User, and Package. - Removed old BuildRequires on bunch, argparse, and orderedict. * Thu Feb 14 2013 Ralph Bean - 0.4.2-1 - Latest upstream with improved alembic migration. * Thu Feb 07 2013 Ralph Bean - 0.4.1-1 - Latest upstream contributed by Jessica Anderson. - Included alembic upgrade scripts in /usr/share/datanommer.models/ * Thu Nov 08 2012 Ralph Bean - 0.2.0-6 - Patch setup.py to pull in the correct sqlalchemy for el6. - Add BR for python-argparse and python-ordereddict. * Thu Nov 08 2012 Ralph Bean - 0.2.0-5 - Added temporary BR on python-bunch to get around an old moksha issue. * Mon Oct 22 2012 Ralph Bean - 0.2.0-4 - Remove explicit versioned Conflicts with old datanommer. * Fri Oct 12 2012 Ralph Bean - 0.2.0-3 - Remove unneccessary CFLAGS definition. * Thu Oct 11 2012 Ralph Bean - 0.2.0-2 - Remove upstream egg-info so that its gets rebuilt. * Thu Oct 11 2012 Ralph Bean - 0.2.0-1 - Initial split out from the main datanommer package.