From 2a04b260af506f146e1adde4b4bb232c65eb8e81 Mon Sep 17 00:00:00 2001 From: Luke Macken Date: Jan 09 2010 05:54:42 +0000 Subject: - Add python-daemon-1.5.2-import.patch, which fixes the use of __import__ to work on Python 2.4 --- diff --git a/python-daemon-1.5.2-import.patch b/python-daemon-1.5.2-import.patch new file mode 100644 index 0000000..dca125f --- /dev/null +++ b/python-daemon-1.5.2-import.patch @@ -0,0 +1,11 @@ +--- setup.py.orig 2010-01-08 20:29:20.000000000 -0500 ++++ setup.py 2010-01-08 20:31:00.000000000 -0500 +@@ -19,7 +19,7 @@ + + distribution_name = "python-daemon" + main_module_name = 'daemon' +-main_module = __import__(main_module_name, fromlist=['version']) ++main_module = __import__(main_module_name, globals(), {}, ['version']) + version = main_module.version + + short_description, long_description = ( diff --git a/python-daemon.spec b/python-daemon.spec index 1336178..f081e20 100644 --- a/python-daemon.spec +++ b/python-daemon.spec @@ -3,13 +3,14 @@ Name: python-daemon Version: 1.5.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library to implement a well-behaved Unix daemon process Group: Development/Languages License: Python URL: http://pypi.python.org/pypi/python-daemon/ Source0: http://pypi.python.org/packages/source/p/python-daemon/%{name}-%{version}.tar.gz +Patch0: %{name}-%{version}-import.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -23,6 +24,7 @@ This library implements the well-behaved daemon specification of PEP 3143, %prep %setup -q +%patch0 -p0 -b .import sed -i -e '/^#!\//, 1d' daemon/version/version_info.py @@ -50,6 +52,10 @@ PYTHONPATH=$(pwd) nosetests %{python_sitelib}/python_daemon-%{version}-py%{pyver}.egg-info/ %changelog +* Fri Jan 08 2010 Luke Macken - 1.5.2-2 +- Add python-daemon-1.5.2-import.patch, which fixes the use of + __import__ to work on Python 2.4 + * Wed Dec 23 2009 Thomas Spura - 1.5.2-1 - add missing BR: python-nose - also add lockfile as R (bug #513546)