attached patch uploaded to DELAYED/4
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
diff -Nru python-central-0.6.12/debian/changelog python-central-0.6.12+nmu1/debian/changelog
--- python-central-0.6.12/debian/changelog 2009-10-29 19:21:57.0 +0100
+++ python-central-0.6.12+nmu1/debian/changelog 2009-11-05 20:56:11.0 +0100
@@ -1,3 +1,12 @@
+python-central (0.6.12+nmu1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Fix move_files() to work with python2.6's new locations. Closes: 547565.
+ * Fix few typos, missing declarations and indentation errors that lead
+to a crash.
+
+ -- Piotr Ożarowski pi...@debian.org Thu, 05 Nov 2009 20:25:12 +0100
+
python-central (0.6.12) unstable; urgency=low
* Fix pycentral debhelper failure, when there are files in the root
diff -Nru python-central-0.6.12/pycentral.py python-central-0.6.12+nmu1/pycentral.py
--- python-central-0.6.12/pycentral.py 2009-10-29 19:19:04.0 +0100
+++ python-central-0.6.12+nmu1/pycentral.py 2009-11-05 20:54:06.0 +0100
@@ -1,6 +1,7 @@
#! /usr/bin/python
-import fnmatch, glob, os, re, string, sys, time, cStringIO
+import glob, os, re, string, sys, time, cStringIO
+import logging
from optparse import OptionParser
from ConfigParser import SafeConfigParser
@@ -18,7 +19,7 @@
shared_base = '/usr/share/pycentral/'
shared_base2 = '/usr/share/pyshared/'
-pycentral_version = '0.6.11'
+pycentral_version = '0.6.12+nmu1'
req_pycentral_version = '0.6.11'
def samefs(path1, path2):
@@ -232,7 +233,7 @@
for ext in ('c', 'o'):
for fn in files:
fnc = fn + ext
- yield fnc
+yield fnc
installed_runtimes = None
default_runtime = None
@@ -242,7 +243,6 @@
global default_runtime
if not installed_runtimes:
-import glob
installed_runtimes = []
default_version = pyversions.default_version(version_only=True)
supported = pyversions.supported_versions()
@@ -294,7 +294,7 @@
if os.path.exists(fn):
try:
config.readfp(open(fn))
-except Error:
+except:
logging.error(error reading config file `%s' % fn)
sys.exit(1)
# checks
@@ -558,27 +558,27 @@
if pversion in ('python2.3', 'python2.4', 'python2.5'):
srctop = os.path.join(self.pkgdir, 'usr/lib', pversion, 'site-packages')
else:
-srctop2 = os.path.join(self.pkgdir, 'usr/lib', pversion, 'dist-packages')
+srctop = os.path.join(self.pkgdir, 'usr/lib', pversion, 'dist-packages')
+srctop2 = os.path.join(self.pkgdir, 'usr/lib', pversion, 'site-packages')
srctop3 = os.path.join(self.pkgdir, 'usr/local/lib', pversion, 'dist-packages')
-if os.path.isdir(srctop2) and (os.path.isdir(srctop) or os.path.isdir(srctop3)):
+if os.path.isdir(srctop) and (os.path.isdir(srctop2) or os.path.isdir(srctop3)):
raise PyCentralError, 'both directories site-packages and dist-packages exist.'
-if os.path.isdir(srctop):
-print 'renaming %s to %s' % (srctop, srctop2)
-os.rename(srctop, srctop2)
+if os.path.isdir(srctop2):
+print 'renaming %s to %s' % (srctop2, srctop)
+os.rename(srctop2, srctop)
elif os.path.isdir(srctop3):
-print 'renaming %s to %s' % (srctop3, srctop2)
+print 'renaming %s to %s' % (srctop3, srctop)
try:
-os.makedirs(os.path.dirname(srctop2))
+os.makedirs(os.path.dirname(srctop))
except OSError:
pass
-os.rename(srctop3, srctop2)
+os.rename(srctop3, srctop)
while srctop3:
srctop3=os.path.dirname(srctop3)
try:
os.rmdir(srctop3)
except OSError:
break
-srctop = srctop2
for root, dirs, files in os.walk(srctop, topdown=False):
for name in files:
m = vrx.match(name)
@@ -651,8 +651,8 @@
# remove empty dirs in /usr/lib/pythonX.Y
for root, dirs, files in os.walk(self.pkgdir + '/usr/lib', topdown=False):
try:
- if re.match(/usr/lib/python\d\.\d($|/), root.replace(self.pkgdir, )):
- os.rmdir(root)
+if re.match(/usr/lib/python\d\.\d($|/), root.replace(self.pkgdir, )):
+os.rmdir(root)
except OSError:
pass
try:
@@ -980,7 +980,7 @@