From 59aac908c1ab3a72b910bb7afaa0a038eb5d432c Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Sat, 17 Jan 2009 11:23:08 +0000 Subject: [PATCH] * Moved common.py to ubuntutools/ subdirectory to avoid possible conflicts in Python packaging and fixed all imports as necessary. --- buildd | 3 +-- debian/changelog | 2 ++ grab-attachments | 2 +- hugdaylist | 2 +- manage-credentials | 6 +++--- massfile | 2 +- pull-lp-source | 3 +-- requestsync | 2 +- setup.py | 1 - common.py => ubuntutools/common.py | 0 10 files changed, 11 insertions(+), 12 deletions(-) rename common.py => ubuntutools/common.py (100%) diff --git a/buildd b/buildd index 22607a6..e2ef86b 100755 --- a/buildd +++ b/buildd @@ -31,8 +31,7 @@ from optparse import OptionParser from urllib import urlencode # ubuntu-dev-tools modules. -sys.path.append("/usr/share/ubuntu-dev-tools/") -import common +from ubuntutools import common # Usage. usage = "%prog \n\n" diff --git a/debian/changelog b/debian/changelog index 8978bd7..16873c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ ubuntu-dev-tools (0.56) UNRELEASED; urgency=low * common.py: Improved no credentials found error message to show which consumer token is needed. * requestsync: Catch credentials error to hide traceback. + * Moved common.py to ubuntutools/ subdirectory to avoid possible conflicts + in Python packaging and fixed all imports as necessary. -- Jonathan Davies Thu, 15 Jan 2009 12:35:12 +0000 diff --git a/grab-attachments b/grab-attachments index 1fcffb7..ab4dd96 100755 --- a/grab-attachments +++ b/grab-attachments @@ -20,7 +20,7 @@ import os import sys -from common import get_launchpad +from ubuntutools.common import get_launchpad USAGE = "grab-attachments " diff --git a/hugdaylist b/hugdaylist index 740dfb5..55a44a8 100755 --- a/hugdaylist +++ b/hugdaylist @@ -35,7 +35,7 @@ import string import sys from optparse import OptionParser -from common import get_launchpad, translate_web_api, translate_api_web +from ubuntutools.common import get_launchpad, translate_web_api, translate_api_web def check_args(): howmany = -1 diff --git a/manage-credentials b/manage-credentials index 2908aed..75f2c86 100755 --- a/manage-credentials +++ b/manage-credentials @@ -22,9 +22,9 @@ import os import sys from optparse import OptionParser, make_option -from common import Credentials, Launchpad, translate_service -from common import LEVEL, translate_api_web, approve_application -from common import mkdir +from ubuntutools.common import Credentials, Launchpad, translate_service +from ubuntutools.common import LEVEL, translate_api_web, approve_application +from ubuntutools.common import mkdir class CmdOptions(OptionParser): diff --git a/massfile b/massfile index 6d204f8..1e34af7 100755 --- a/massfile +++ b/massfile @@ -27,7 +27,7 @@ import email import subprocess import glob -from common import get_launchpad, translate_api_web, translate_web_api +from ubuntutools.common import get_launchpad, translate_api_web, translate_web_api def read_config(): instructions_file = open("instructions") diff --git a/pull-lp-source b/pull-lp-source index e9fc787..2aa2cab 100755 --- a/pull-lp-source +++ b/pull-lp-source @@ -33,8 +33,7 @@ import urllib2 from optparse import OptionParser # Ubuntu-dev-tools modules. -sys.path.append("/usr/share/ubuntu-dev-tools") -import common +from ubuntutools import common class BackportFromLP: diff --git a/requestsync b/requestsync index fff62d8..1a48f91 100755 --- a/requestsync +++ b/requestsync @@ -35,7 +35,7 @@ from debian_bundle.changelog import Version from optparse import OptionParser from time import sleep -import common +from ubuntutools import common launchpad_cookiefile = common.prepareLaunchpadCookie() diff --git a/setup.py b/setup.py index 68ab9ef..ecb65a3 100755 --- a/setup.py +++ b/setup.py @@ -41,5 +41,4 @@ setup(name='ubuntu-dev-tools', 'manage-credentials', ], packages=['ubuntutools'], - py_modules = ['common'], ) diff --git a/common.py b/ubuntutools/common.py similarity index 100% rename from common.py rename to ubuntutools/common.py