Blob Blame History Raw
%global modname fedbadges

Name:               python-fedbadges
Version:            0.4.2
Release:            1%{?dist}
Summary:            fedmsg consumer for awarding open badges

Group:              Development/Libraries
License:            GPLv2+
URL:                http://pypi.python.org/pypi/fedbadges
Source0:            http://pypi.python.org/packages/source/f/%{modname}/%{modname}-%{version}.tar.gz

BuildArch:          noarch

BuildRequires:      python2-devel
BuildRequires:      python-setuptools
BuildRequires:      fedmsg
BuildRequires:      PyYAML
BuildRequires:      python-fedmsg-meta-fedora-infrastructure
BuildRequires:      python-tahrir-api
BuildRequires:      python-datanommer-models
BuildRequires:      python-zope-sqlalchemy

BuildRequires:      python-nose
BuildRequires:      python-mock

Requires:           fedmsg
Requires:           PyYAML
Requires:           python-fedmsg-meta-fedora-infrastructure
Requires:           python-tahrir-api >= 0.6.0
Requires:           python-datanommer-models
Requires:           python-zope-sqlalchemy


%description
fedbadges is the python module necessary to award Open Badges from
fedmsg bus activity.  It installs a 'consumer' for the fedmsg-hub.
Each message it receives is compared against any number of rules defined
in config files on disk.  If any match, badges are awarded to the
appropriate users.

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

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

sed -i 's/install_requires/#install_requires/' setup.py

%build
%{__python} setup.py build

%install
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}

# This executable just doesn't work.  So remove it.  Our code
# can still be used via the fedmsg-hub daemon.
rm %{buildroot}/%{_bindir}/fedmsg-badges

%check
%{__python} setup.py test

%files
%doc README.rst LICENSE
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}*

%changelog
* Mon Mar 31 2014 Ralph Bean <rbean@redhat.com> - 0.4.2-1
- Bugfix release.

* Wed Mar 05 2014 Ralph Bean <rbean@redhat.com> - 0.4.1-1
- Bugfix release.

* Tue Mar 04 2014 Ralph Bean <rbean@redhat.com> - 0.4.0-1
- Start tracking the events that trigger badges
- New pkgdb criteria rule.
- Optimizations with frozensets.

* Mon Aug 26 2013 Ralph Bean <rbean@redhat.com> - 0.3.0-1
- Latest upstream.
- Make use of enhanced tahrir-api for fedmsg and rank caching.
- Allow more complex datanommer query "operations".

* Tue Jul 30 2013 Ralph Bean <rbean@redhat.com> - 0.2.4-2
- Patch: allow recipient_nick2fas.

* Tue Jul 30 2013 Ralph Bean <rbean@redhat.com> - 0.2.4-1
- Latest upstream.  Excludes opted-out users.

* Wed Jul 17 2013 Ralph Bean <rbean@redhat.com> - 0.2.3-1
- Latest upstream with simplified badge ids.

* Tue Jul 16 2013 Ralph Bean <rbean@redhat.com> - 0.2.2-1
- Latest upstream with DB transaction support.

* Fri Jun 07 2013 Ralph Bean <rbean@redhat.com> - 0.2.0-1
- Initial packaging for Fedora.