%define py_version %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
%define py_prefix %(%{__python} -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
%define py_libdir %{py_prefix}/lib/python%{py_version}
%define py_incdir %{py_prefix}/include/python%{py_version}
%define py_sitedir %{py_libdir}/site-packages
%define debug_package %{nil}
%define version 0.2.1
%define release 1
# set git to %{nil} (release) or to YYYYMMDD.123456 (git build)
%define git %{nil}
%if "%{?git}" != ""
%define release_prefix 0.
%define release_suffix .git.%{git}
%endif
Name: kobo
Version: %{version}
Release: %{?release_prefix}%{release}%{?release_suffix}%{?dist}
License: LGPLv2
Summary: Python modules for tools development
Group: Development/Libraries
URL: https://fedorahosted.org/kobo/
Source0: https://fedorahosted.org/releases/k/o/kobo/%{name}-%{version}%{?release_suffix}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel >= 2.4
# require python-hashlib in python 2.4
%if "%{py_version}" == "2.4"
Requires: python-hashlib
%endif
%description
Kobo is a set of python modules designed for rapid tools development.
%package django
Summary: Django components
Group: Development/Libraries
Requires: kobo = %{version}-%{release}
%description django
Django components.
%package client
Summary: CLI client
Group: Development/Libraries
Requires: kobo = %{version}-%{release}
%description client
CLI client.
%package worker
Summary: Worker daemon processing tasks submitted to the hub
Group: Development/Libraries
Requires: kobo = %{version}-%{release}
%description worker
Worker daemon processing tasks submitted to the hub.
%package hub
Summary: Xml-rpc and web interface to a task database
Group: Development/Libraries
Requires: kobo = %{version}-%{release}
Requires: Django >= 1
%description hub
Hub is a xml-rpc and web interface to a task database.
%package rpmlib
Summary: Functions to manipulate with RPM files
Group: Development/Libraries
Requires: kobo = %{version}-%{release}
Requires: rpm-python
Requires: koji
%description rpmlib
Rpmlib contains functions to manipulate with RPM files.
%prep
%setup -q -n %{name}-%{version}%{?release_suffix}
%build
echo OK
%install
rm -rf ${RPM_BUILD_ROOT}
python setup.py install --root=${RPM_BUILD_ROOT}
# delete the egg-info file
egg_info=$RPM_BUILD_ROOT/%{py_sitedir}/%{name}-*.egg-info
if [ -f $egg_info ]; then
rm $egg_info
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%{py_sitedir}/kobo/*.py*
%exclude %{py_sitedir}/kobo/rpmlib.py*
%doc AUTHORS
%doc COPYING
%doc LICENSE
%files django
%defattr(644,root,root,755)
%{py_sitedir}/kobo/django
%files client
%defattr(644,root,root,755)
%{py_sitedir}/kobo/client
%files worker
%defattr(644,root,root,755)
%{py_sitedir}/kobo/worker
%files hub
%defattr(644,root,root,755)
%{py_sitedir}/kobo/hub
%files rpmlib
%defattr(644,root,root,755)
%{py_sitedir}/kobo/rpmlib.py*
%changelog
* Mon Feb 15 2010 Daniel Mach <dmach@redhat.com> - 0.2.1-1
- Split rpmlib to a subpackage.
- Add missing "compare_nvr" to __all__. (Daniel Mach)
- Remove duplicate subtask removal in Task.wait(). (Tomas Kopecek)
- Parent task didn't wake up even if all child tasks were finished. (Tomas Kopecek)
- Change 'make log' to use C locales and automatically fill name and email from GIT. (Daniel Mach)
- Fix spawn_subtask argument. (cherry picked from commit 374a4165c16d6b34fa486a38525753969e549415) (Tomas Kopecek)
- Fix XML-RPC method registration. (original patch by Xuqing Kuang) (Daniel Mach)
- Convert rpm.labelCompare's arguments to string to prevent segfaulting. Add compare_nvr tests. (Tomas Kopecek)
- Add Task.get_time_display() to get time spent in task in human readable form. (Daniel Mach)
- Use koji.get_sigpacket_key_id() to read sigkey id from a rpm header. (Daniel Mach)
* Thu Nov 5 2009 Daniel Mach <dmach@redhat.com> - 0.2.0-1
- Rewrite menu to get rid of tuples in menu definition. Always use MenuItem classes. (Daniel Mach)
- Send task logs to hub to enable realtime log watching. (Daniel Mach)
- Add menu_item helper. (Tomas Kopecek)
- New version of menu component. (Tomas Kopecek)
- Order tasks to assign by priority first. (Daniel Mach)
- Fix spacing errors to be more PEP 8 compliant. (Daniel Mach)
- Handle SystemExit in TaskManager.run_task(). (Daniel Mach)
- Add a shortcut and pkgset support for computing hashlib based hashes. (Daniel Mach)
- Add hack enabling 'VERBOSE' log level in the python logging module and Logger class. (Daniel Mach)
- Run tests in alphabetical order. (Daniel Mach)
- Fix TaskAdmin to search for user in correct db field. (Tomas Kopecek)
- More convenient admin listing for Worker model. (Tomas Kopecek)
- Add files to cache faster (skip stat call when possible). (Tomas Kopecek)
- Remove deps on postgresql, httpd, mod_auth_kerb and python-krbV.
- Add AUTHORS, COPYING and LICENSE to kobo.rpm.
* Tue Aug 18 2009 Daniel Mach <dmach@redhat.com> - 0.1.2-1
- Read default paginate_by value from settings in kobo.django.views.generic.object_list. (Tomas Kopecek)
- Add read_from_file() and rename save() to save_to_file() in kobo.shortcuts. (Daniel Mach)
- Reverse FileUpload default ordering. (Daniel Mach)
- Add kobo.conf.get_dict_value() to support dicts with default values. (Daniel Mach)
- Add direct access to files via pkgset.RpmWrapper. (Tomas Kopecek)
- Add documentation to django.auth.krb5. (Daniel Mach)
- Fix worker key generation in kobo.hub.models.Worker.save(). (Daniel Mach)
- Fix a security hole in krb5 middleware: a user was able to log in as different user to admin interface. (Daniel Mach)
- Change Makefile to run tests before creating source tarball. (Daniel Mach)
- Change HubProxy._hub verification to fix exceptions in Python2.6. (Martin Magr)
- Another SQL performance improvement in Task admin. (Tomas Kopecek)
- Set Task.parent as raw_id field to improve admin performance. (Daniel Mach)
- Add (spent) time method to Task and display it in the admin listing. (Tomas Kopecek)
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Jul 22 2009 Daniel Mach <dmach@redhat.com> - 0.1.1-1
- Enhance types.Enum to support help_text and additonal options. Update tests for types module. (Daniel Mach)
- Remove temp directory after file upload. (Tomas Kopecek)
- Remove MANIFEST in make clean. (Daniel Mach)
- Fix shortcuts.run to read complete stdout. (Jan Blazek)
- Add rpmlib.get_file_list_from_header() which extracts file list, colors and checksums from a rpm header. (Daniel Mach)
- Add get_digest_algo_from_header() function to read rpm digest algorithm. (Daniel Mach)
- Update epydoc docstrings in kobo.rpmlib. (Daniel Mach)
- Fix deadlock in run(). Use proc.poll() instead of proc.wait(). (Daniel Mach)
- Update epydoc docstrings in kobo.shortcuts. (Daniel Mach)
- Fix AtributeError when active_submenu is None. (Daniel Mach)
- Return menu dict even if no menu is active. (Daniel Mach)
- Do not allow to register plugins to PluginContainer base class. Add several tests. (Daniel Mach)
- Add test runner. (Daniel Mach)
- Add support for empty submenus. (Martin Magr)
* Wed Jun 17 2009 Daniel Mach <dmach@redhat.com> - 0.1.0-1
- first release