=== modified file 'data/templates/ubuntu-application/configure.py'
--- data/templates/ubuntu-application/configure.py 2010-10-18 18:39:04 +0000
+++ data/templates/ubuntu-application/configure.py 2010-12-23 18:15:10 +0000
@@ -20,13 +20,10 @@
import sys
import subprocess
-import internal.apportutils
-
-from internal import quicklyutils, packaging
-from internal import bzrutils
+from internal import quicklyutils
from quickly import configurationhandler, templatetools
-from quickly import launchpadaccess
-
+from quickly.ubuntu import apport, packaging
+import quickly.lp as lp
import gettext
from gettext import gettext as _
@@ -73,8 +70,8 @@
if argv[1] == "lp-project":
# connect to LP
try:
- launchpad = launchpadaccess.initialize_lpi()
- except launchpadaccess.launchpad_connection_error, e:
+ launchpad = lp.access.initialize_lpi()
+ except lp.access.launchpad_connection_error, e:
print(e)
sys.exit(1)
@@ -90,13 +87,13 @@
previous_lp_project_name = configurationhandler.project_config.get('lp_id', None)
quickly_project_name = configurationhandler.project_config.get('project', None)
try:
- project = launchpadaccess.link_project(launchpad, "Change your launchpad project:", project_name)
- internal.apportutils.update_apport(quickly_project_name, previous_lp_project_name, project.name)
- except launchpadaccess.launchpad_project_error, e:
+ project = lp.project.link_project(launchpad, "Change your launchpad project:", project_name)
+ apport.update_apport(quickly_project_name, previous_lp_project_name, project.name)
+ except lp.access.launchpad_project_error, e:
print(e)
sys.exit(1)
# get the project now and save the url into setup.py
- project_url = launchpadaccess.launchpad_url + '/' + project.name
+ project_url = lp.access.launchpad_url + '/' + project.name
quicklyutils.set_setup_value('url', project_url)
about_dialog_file_name = quicklyutils.get_about_file_name()
if about_dialog_file_name:
@@ -112,8 +109,8 @@
# connect to LP
try:
- launchpad = launchpadaccess.initialize_lpi()
- except launchpadaccess.launchpad_connection_error, e:
+ launchpad = lp.access.initialize_lpi()
+ except lp.access.launchpad_connection_error, e:
print(e)
sys.exit(1)
@@ -147,7 +144,7 @@
if len(argv) != 3:
templatetools.print_usage(options['bzr'])
sys.exit(4)
- bzrutils.set_bzrbranch(argv[2])
+ lp.bzr.set_bzrbranch(argv[2])
configurationhandler.saveConfig()
# add additional dependencies
=== removed file 'data/templates/ubuntu-application/internal/bzrutils.py'
--- data/templates/ubuntu-application/internal/bzrutils.py 2010-08-13 15:04:05 +0000
+++ data/templates/ubuntu-application/internal/bzrutils.py 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
-# Copyright 2010 Didier Roche
-#
-# This file is part of Quickly ubuntu-application template
-#
-#This program is free software: you can redistribute it and/or modify it
-#under the terms of the GNU General Public License version 3, as published
-#by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful, but
-#WITHOUT ANY WARRANTY; without even the implied warranties of
-#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-#PURPOSE. See the GNU General Public License for more details.
-
-#You should have received a copy of the GNU General Public License along
-#with this program. If not, see .
-
-from quickly import configurationhandler
-
-def set_bzrbranch(bzr_branch):
- '''set default bzr branch from where to pull and push'''
-
- if not configurationhandler.project_config:
- configurationhandler.loadConfig()
- configurationhandler.project_config['bzrbranch'] = bzr_branch
-
-def get_bzrbranch():
- '''get default bzr branch from where to pull and push'''
-
- if not configurationhandler.project_config:
- configurationhandler.loadConfig()
-
- try:
- bzr_branch = configurationhandler.project_config['bzrbranch']
- except KeyError:
- bzr_branch = None
- return bzr_branch
=== modified file 'data/templates/ubuntu-application/package.py'
--- data/templates/ubuntu-application/package.py 2010-10-15 20:26:19 +0000
+++ data/templates/ubuntu-application/package.py 2010-12-23 18:15:10 +0000
@@ -23,8 +23,9 @@
from gettext import gettext as _
gettext.textdomain('quickly')
-from internal import quicklyutils, packaging
+from internal import quicklyutils
from quickly import templatetools, configurationhandler
+from quickly.ubuntu import packaging
def usage():
=== modified file 'data/templates/ubuntu-application/release.py'
--- data/templates/ubuntu-application/release.py 2010-10-18 18:39:04 +0000
+++ data/templates/ubuntu-application/release.py 2010-12-23 18:15:10 +0000
@@ -21,15 +21,14 @@
import subprocess
import webbrowser
-from internal import quicklyutils, packaging, launchpad_helper
-from internal import bzrutils
+from internal import quicklyutils
from quickly import templatetools, configurationhandler, commands
+from quickly.ubuntu import packaging
+import quickly.lp as lp
import license
import logging
-from quickly import launchpadaccess
-
import gettext
from gettext import gettext as _
gettext.textdomain('quickly')
@@ -113,8 +112,8 @@
# connect to LP
try:
- launchpad = launchpadaccess.initialize_lpi()
-except launchpadaccess.launchpad_connection_error, e:
+ launchpad = lp.access.initialize_lpi()
+except lp.access.launchpad_connection_error, e:
print(e)
sys.exit(1)
@@ -127,11 +126,11 @@
# get the project now and save the url into setup.py
try:
- project = launchpadaccess.get_project(launchpad)
-except launchpadaccess.launchpad_project_error, e:
+ project = lp.project.get_project(launchpad)
+except lp.access.launchpad_project_error, e:
print(e)
sys.exit(1)
-project_url = launchpadaccess.launchpad_url + '/' + project.name
+project_url = lp.access.launchpad_url + '/' + project.name
quicklyutils.set_setup_value('url', project_url)
about_dialog_file_name = quicklyutils.get_about_file_name()
if about_dialog_file_name:
@@ -234,14 +233,14 @@
sys.exit(1)
-if (launchpadaccess.lp_server == "staging"):
+if (lp.access.lp_server == "staging"):
bzr_staging = "//staging/"
else:
bzr_staging = ""
custom_location_in_info = None
branch_location = []
-custom_location = bzrutils.get_bzrbranch()
+custom_location = lp.bzr.get_bzrbranch()
if custom_location:
branch_location = [custom_location]
custom_location_in_info = custom_location.replace('lp:', '')
@@ -282,14 +281,14 @@
sys.exit(return_code)
#create new release_date
-launchpad_helper.push_tarball_to_launchpad(project, release_version,
- "../%s_%s.tar.gz" % (project_name,
- release_version), changelog)
+lp.project.push_tarball_to_launchpad(project, release_version,
+ "../%s_%s.tar.gz" % (project_name,
+ release_version), changelog)
print _("%s %s released and building on Launchpad. Wait for half an hour and have look at %s.") % (project_name, release_version, ppa_url)
# as launchpad-open doesn't support staging server, put an url
-if launchpadaccess.lp_server == "staging":
- webbrowser.open(launchpadaccess.LAUNCHPAD_CODE_STAGING_URL + '/' + project.name)
+if lp.access.lp_server == "staging":
+ webbrowser.open(lp.access.LAUNCHPAD_CODE_STAGING_URL + '/' + project.name)
else:
- webbrowser.open(launchpadaccess.LAUNCHPAD_URL + '/' + project.name)
+ webbrowser.open(lp.access.LAUNCHPAD_URL + '/' + project.name)
=== modified file 'data/templates/ubuntu-application/share.py'
--- data/templates/ubuntu-application/share.py 2010-10-18 18:39:04 +0000
+++ data/templates/ubuntu-application/share.py 2010-12-23 18:15:10 +0000
@@ -28,8 +28,9 @@
gettext.textdomain('quickly')
from quickly import configurationhandler
-from internal import quicklyutils, packaging
-from quickly import launchpadaccess
+from internal import quicklyutils
+from quickly.ubuntu import packaging
+import quickly.lp as lp
launchpad = None
ppa_name = None
@@ -98,8 +99,8 @@
# connect to LP
try:
- launchpad = launchpadaccess.initialize_lpi()
-except launchpadaccess.launchpad_connection_error, e:
+ launchpad = lp.access.initialize_lpi()
+except lp.access.launchpad_connection_error, e:
print(e)
sys.exit(1)
=== modified file 'data/templates/ubuntu-application/submitubuntu.py'
--- data/templates/ubuntu-application/submitubuntu.py 2010-11-11 14:19:38 +0000
+++ data/templates/ubuntu-application/submitubuntu.py 2010-12-23 18:15:10 +0000
@@ -21,15 +21,14 @@
import subprocess
import webbrowser
-from internal import quicklyutils, packaging, launchpad_helper
-from internal import bzrutils
+from internal import quicklyutils
from quickly import templatetools, configurationhandler, commands
+from quickly.ubuntu import packaging
+import quickly.lp as lp
import license
import logging
-from quickly import launchpadaccess
-
import gettext
from gettext import gettext as _
gettext.textdomain('quickly')
@@ -114,8 +113,8 @@
# connect to LP
try:
- launchpad = launchpadaccess.initialize_lpi()
-except launchpadaccess.launchpad_connection_error, e:
+ launchpad = lp.access.initialize_lpi()
+except lp.access.launchpad_connection_error, e:
print(e)
sys.exit(1)
@@ -128,11 +127,11 @@
# get the project now and save the url into setup.py
try:
- project = launchpadaccess.get_project(launchpad)
-except launchpadaccess.launchpad_project_error, e:
+ project = lp.project.get_project(launchpad)
+except lp.access.launchpad_project_error, e:
print(e)
sys.exit(1)
-project_url = launchpadaccess.launchpad_url + '/' + project.name
+project_url = lp.access.launchpad_url + '/' + project.name
quicklyutils.set_setup_value('url', project_url)
about_dialog_file_name = quicklyutils.get_about_file_name()
if about_dialog_file_name:
@@ -235,14 +234,14 @@
sys.exit(1)
-if (launchpadaccess.lp_server == "staging"):
+if (lp.access.lp_server == "staging"):
bzr_staging = "//staging/"
else:
bzr_staging = ""
custom_location_in_info = None
branch_location = []
-custom_location = bzrutils.get_bzrbranch()
+custom_location = lp.bzr.get_bzrbranch()
if custom_location:
branch_location = [custom_location]
custom_location_in_info = custom_location.replace('lp:', '')
@@ -283,15 +282,15 @@
sys.exit(return_code)
#create new release_date
-launchpad_helper.push_tarball_to_launchpad(project, release_version,
- "../%s_%s.tar.gz" % (project_name,
- release_version), changelog)
+lp.project.push_tarball_to_launchpad(project, release_version,
+ "../%s_%s.tar.gz" % (project_name,
+ release_version), changelog)
print _("%s %s released and submitted to ubuntu. Wait for half an hour and have look at %s.") % (project_name, release_version, ppa_url)
print _("Then your application will be reviewed by the application review board.")
# as launchpad-open doesn't support staging server, put an url
-if launchpadaccess.lp_server == "staging":
- webbrowser.open(launchpadaccess.LAUNCHPAD_CODE_STAGING_URL + '/' + project.name)
+if lp.access.lp_server == "staging":
+ webbrowser.open(lp.access.LAUNCHPAD_CODE_STAGING_URL + '/' + project.name)
else:
- webbrowser.open(launchpadaccess.LAUNCHPAD_URL + '/' + project.name)
+ webbrowser.open(lp.access.LAUNCHPAD_URL + '/' + project.name)
=== modified file 'data/templates/ubuntu-application/test/apportutils.py'
--- data/templates/ubuntu-application/test/apportutils.py 2010-12-20 15:44:44 +0000
+++ data/templates/ubuntu-application/test/apportutils.py 2010-12-23 18:15:10 +0000
@@ -14,9 +14,9 @@
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),"..")))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),"..","..","..","..")))
-from internal import apportutils
+from quickly.ubuntu import apport
-class TestApportUtils(unittest.TestCase):
+class TestApport(unittest.TestCase):
def test_lpi_existing(self):
lines = """#!/usr/bin/python
import sys
@@ -56,7 +56,7 @@
response = about.run()
about.destroy()
""".splitlines()
- self.failIf(apportutils.detect_or_insert_lpi(lines, "project_name1", "helpMenu1"))
+ self.failIf(apport.detect_or_insert_lpi(lines, "project_name1", "helpMenu1"))
def test_partial_lpi_import_only(self):
lines = """#!/usr/bin/python
@@ -91,7 +91,7 @@
response = about.run()
about.destroy()
""".splitlines()
- self.failIf(apportutils.detect_or_insert_lpi(lines, "project_name1", "helpMenu1"))
+ self.failIf(apport.detect_or_insert_lpi(lines, "project_name1", "helpMenu1"))
def test_no_lpi(self):
lines = """#!/usr/bin/python
@@ -153,9 +153,9 @@
response = about.run()
about.destroy()
"""
- # print "".join(apportutils.detect_or_insert_lpi(lines, "project_name1", "helpMenu1"))
+ # print "".join(apport.detect_or_insert_lpi(lines, "project_name1", "helpMenu1"))
# print "".join(expected.splitlines(True))
- self.assertEqual("".join(expected.splitlines(True)).strip(), "".join(apportutils.detect_or_insert_lpi(lines, "project_name1", "helpMenu1")).strip())
+ self.assertEqual("".join(expected.splitlines(True)).strip(), "".join(apport.detect_or_insert_lpi(lines, "project_name1", "helpMenu1")).strip())
def test_find_about_menu(self):
xml_tree = etree.parse(StringIO.StringIO("""
@@ -207,6 +207,6 @@
"""))
- self.assertEqual("testHelpMenu", apportutils.find_about_menu(xml_tree))
+ self.assertEqual("testHelpMenu", apport.find_about_menu(xml_tree))
unittest.main()
=== modified file 'data/templates/ubuntu-application/upgrade.py'
--- data/templates/ubuntu-application/upgrade.py 2010-12-07 14:14:08 +0000
+++ data/templates/ubuntu-application/upgrade.py 2010-12-23 18:15:10 +0000
@@ -21,10 +21,9 @@
import subprocess
import sys
-import internal.apportutils
-
from internal import quicklyutils
from quickly import configurationhandler, templatetools
+from quickly.ubuntu import apport
import gettext
from gettext import gettext as _
@@ -141,10 +140,10 @@
pass
# add apport hooks if launchpad application is configured
- internal.apportutils.insert_lpi_if_required(project_name)
+ apport.insert_lpi_if_required(project_name)
lp_project_name = configurationhandler.project_config.get('lp_id', None)
if lp_project_name is not None:
- internal.apportutils.update_apport(project_name, lp_project_name, lp_project_name)
+ apport.update_apport(project_name, lp_project_name, lp_project_name)
# new dialog file needs helpers.py
if not os.path.isfile('%s/helpers.py' % python_name):
=== added directory 'quickly/lp'
=== added file 'quickly/lp/__init__.py'
--- quickly/lp/__init__.py 1970-01-01 00:00:00 +0000
+++ quickly/lp/__init__.py 2010-12-23 18:15:10 +0000
@@ -0,0 +1,18 @@
+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
+# Copyright 2010 Canonical Ltd
+#
+# This file is part of Quickly
+#
+#This program is free software: you can redistribute it and/or modify it
+#under the terms of the GNU General Public License version 3, as published
+#by the Free Software Foundation.
+#
+#This program is distributed in the hope that it will be useful, but
+#WITHOUT ANY WARRANTY; without even the implied warranties of
+#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+#PURPOSE. See the GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License along
+#with this program. If not, see .
+
+import access, bzr, project
=== renamed file 'quickly/launchpadaccess.py' => 'quickly/lp/access.py'
--- quickly/launchpadaccess.py 2010-10-13 19:07:55 +0000
+++ quickly/lp/access.py 2010-12-23 18:15:10 +0000
@@ -24,7 +24,7 @@
LAUNCHPAD_STAGING_URL = "https://staging.launchpad.net"
LAUNCHPAD_CODE_STAGING_URL = "https://code.staging.launchpad.net"
-# TODO: see how to export this error on import launchpadaccess (in init.py ?)
+# TODO: see how to export this error on import quickly.lp.access (in init.py ?)
class launchpad_connection_error(Exception):
pass
class launchpad_project_error(Exception):
@@ -40,7 +40,7 @@
sys.exit(1)
-from quickly import bzrbinding
+from quickly.lp import bzr
from quickly import configurationhandler
import gettext
@@ -118,7 +118,7 @@
# try to setup bzr
me = launchpad.me
- (return_code, suggestion) = bzrbinding.bzr_set_login(me.display_name, me.preferred_email_address.email, me.name)
+ (return_code, suggestion) = bzr.bzr_set_login(me.display_name, me.preferred_email_address.email, me.name)
if interactive:
if launchpad is None or return_code != 0:
@@ -130,84 +130,3 @@
return launchpad
-
-def link_project(launchpad, question, lp_project_name=None):
- ''' Link to launchpad project, erasing previous one if already set
-
-
- :return project object'''
-
- # if config not already loaded
- if not configurationhandler.project_config:
- configurationhandler.loadConfig()
-
- if not lp_project_name:
- choice = "0"
- while choice == "0":
-
- lp_id = raw_input("%s, leave blank to abort.\nLaunchpad project name: " % question)
- if lp_id == "":
- raise launchpad_project_error(_("No launchpad project given, aborting."))
-
- prospective_projects = launchpad.projects.search(text=lp_id)
- project_number = 1
- project_names = []
- for project in prospective_projects:
- print (_('''---------------- [%s] ----------------
- %s
---------------------------------------
-Project name: %s
-Launchpad url: %s/%s
-%s
-''') % (project_number, project.title, project.display_name, launchpad_url, project.name, project.summary))
- project_names.append(project.name)
- project_number += 1
-
- if not list(prospective_projects):
- message = _("No project found")
- else:
- message = _("Choose your project number")
- choice = raw_input("%s, leave blank to abort, 0 for another search.\nYour choice: " % message)
-
- try:
- choice = int(choice)
- if choice in range(1, project_number):
- project = launchpad.projects[project_names[choice - 1]]
- else:
- raise ValueError
- except ValueError:
- raise launchpad_project_error(_("No right number given, aborting."))
-
- # we got a project name, check that it exists
- else:
- try:
- project = launchpad.projects[lp_project_name]
- except KeyError:
- raise launchpad_project_error(_("Can't find %s project on Launchpad. You can try to find it interactively without providing a project name.") % lp_project_name)
-
- configurationhandler.project_config['lp_id'] = project.name
- configurationhandler.saveConfig()
-
- return project
-
-def get_project(launchpad):
- ''' Get quickly project through launchpad.
-
- :return project object
- '''
-
- # if config not already loaded
- if not configurationhandler.project_config:
- configurationhandler.loadConfig()
-
- # try to get project
- try:
- lp_id = configurationhandler.project_config['lp_id']
- project = launchpad.projects[lp_id]
-
- # else, bind the project to LP
- except KeyError:
- project = link_project(launchpad, "No Launchpad project set")
-
- return project
-
=== renamed file 'quickly/bzrbinding.py' => 'quickly/lp/bzr.py'
--- quickly/bzrbinding.py 2010-09-28 12:53:04 +0000
+++ quickly/lp/bzr.py 2010-12-23 18:15:10 +0000
@@ -1,5 +1,5 @@
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
-# Copyright 2009 Didier Roche
+# Copyright 2009,2010 Didier Roche
#
# This file is part of Quickly
#
@@ -17,6 +17,7 @@
import socket
import subprocess
+from quickly import configurationhandler
def bzr_set_login(display_name, preferred_email_adress, launchpad_name=None):
''' try to setup bzr whoami for commit and sshing and bzr launchpad_login if provided
@@ -52,3 +53,21 @@
return (0, "")
+def set_bzrbranch(bzr_branch):
+ '''set default bzr branch from where to pull and push'''
+
+ if not configurationhandler.project_config:
+ configurationhandler.loadConfig()
+ configurationhandler.project_config['bzrbranch'] = bzr_branch
+
+def get_bzrbranch():
+ '''get default bzr branch from where to pull and push'''
+
+ if not configurationhandler.project_config:
+ configurationhandler.loadConfig()
+
+ try:
+ bzr_branch = configurationhandler.project_config['bzrbranch']
+ except KeyError:
+ bzr_branch = None
+ return bzr_branch
=== renamed file 'data/templates/ubuntu-application/internal/launchpad_helper.py' => 'quickly/lp/project.py'
--- data/templates/ubuntu-application/internal/launchpad_helper.py 2010-08-13 15:04:05 +0000
+++ quickly/lp/project.py 2010-12-23 18:15:10 +0000
@@ -22,10 +22,92 @@
import sys
import subprocess
+from quickly import configurationhandler
+
import gettext
from gettext import gettext as _
gettext.textdomain('quickly')
+def link_project(launchpad, question, lp_project_name=None):
+ ''' Link to launchpad project, erasing previous one if already set
+
+
+ :return project object'''
+
+ # if config not already loaded
+ if not configurationhandler.project_config:
+ configurationhandler.loadConfig()
+
+ if not lp_project_name:
+ choice = "0"
+ while choice == "0":
+
+ lp_id = raw_input("%s, leave blank to abort.\nLaunchpad project name: " % question)
+ if lp_id == "":
+ raise launchpad_project_error(_("No launchpad project given, aborting."))
+
+ prospective_projects = launchpad.projects.search(text=lp_id)
+ project_number = 1
+ project_names = []
+ for project in prospective_projects:
+ print (_('''---------------- [%s] ----------------
+ %s
+--------------------------------------
+Project name: %s
+Launchpad url: %s/%s
+%s
+''') % (project_number, project.title, project.display_name, launchpad_url, project.name, project.summary))
+ project_names.append(project.name)
+ project_number += 1
+
+ if not list(prospective_projects):
+ message = _("No project found")
+ else:
+ message = _("Choose your project number")
+ choice = raw_input("%s, leave blank to abort, 0 for another search.\nYour choice: " % message)
+
+ try:
+ choice = int(choice)
+ if choice in range(1, project_number):
+ project = launchpad.projects[project_names[choice - 1]]
+ else:
+ raise ValueError
+ except ValueError:
+ raise launchpad_project_error(_("No right number given, aborting."))
+
+ # we got a project name, check that it exists
+ else:
+ try:
+ project = launchpad.projects[lp_project_name]
+ except KeyError:
+ raise launchpad_project_error(_("Can't find %s project on Launchpad. You can try to find it interactively without providing a project name.") % lp_project_name)
+
+ configurationhandler.project_config['lp_id'] = project.name
+ configurationhandler.saveConfig()
+
+ return project
+
+def get_project(launchpad):
+ ''' Get quickly project through launchpad.
+
+ :return project object
+ '''
+
+ # if config not already loaded
+ if not configurationhandler.project_config:
+ configurationhandler.loadConfig()
+
+ # try to get project
+ try:
+ lp_id = configurationhandler.project_config['lp_id']
+ project = launchpad.projects[lp_id]
+
+ # else, bind the project to LP
+ except KeyError:
+ project = link_project(launchpad, "No Launchpad project set")
+
+ return project
+
#TODO: see if 0 release in the project
def create_release(project, version):
=== added directory 'quickly/ubuntu'
=== added file 'quickly/ubuntu/__init__.py'
--- quickly/ubuntu/__init__.py 1970-01-01 00:00:00 +0000
+++ quickly/ubuntu/__init__.py 2010-12-23 18:15:10 +0000
@@ -0,0 +1,18 @@
+# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
+# Copyright 2010 Canonical Ltd
+#
+# This file is part of Quickly
+#
+#This program is free software: you can redistribute it and/or modify it
+#under the terms of the GNU General Public License version 3, as published
+#by the Free Software Foundation.
+#
+#This program is distributed in the hope that it will be useful, but
+#WITHOUT ANY WARRANTY; without even the implied warranties of
+#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+#PURPOSE. See the GNU General Public License for more details.
+#
+#You should have received a copy of the GNU General Public License along
+#with this program. If not, see .
+
+import apport, packaging
=== renamed file 'data/templates/ubuntu-application/internal/apportutils.py' => 'quickly/ubuntu/apport.py'
=== renamed file 'data/templates/ubuntu-application/internal/packaging.py' => 'quickly/ubuntu/packaging.py'
--- data/templates/ubuntu-application/internal/packaging.py 2010-11-23 14:26:08 +0000
+++ quickly/ubuntu/packaging.py 2010-12-23 18:15:10 +0000
@@ -24,7 +24,7 @@
from quickly import configurationhandler
-from quickly import launchpadaccess
+import quickly.lp as lp
from internal import quicklyutils
from quickly import templatetools
@@ -229,8 +229,8 @@
# connect to LP and get ppa to complete
try:
- launchpad = launchpadaccess.initialize_lpi(False)
- except launchpadaccess.launchpad_connection_error:
+ launchpad = lp.access.initialize_lpi(False)
+ except lp.access.launchpad_connection_error:
sys.exit(0)
available_ppas = []
if launchpad:
@@ -287,13 +287,13 @@
(ppa_user, ppa_name) = get_ppa_parameters(launchpad, configurationhandler.project_config['ppa'])
except KeyError:
ppa_user = launchpad.me
- if (launchpadaccess.lp_server == "staging"):
+ if (lp.access.lp_server == "staging"):
ppa_name = 'staging'
else: # default ppa
ppa_name = 'ppa'
else:
(ppa_user, ppa_name) = get_ppa_parameters(launchpad, ppa_name)
- ppa_url = '%s/~%s/+archive/%s' % (launchpadaccess.LAUNCHPAD_URL, ppa_user.name, ppa_name)
+ ppa_url = '%s/~%s/+archive/%s' % (lp.access.LAUNCHPAD_URL, ppa_user.name, ppa_name)
dput_ppa_name = 'ppa:%s/%s' % (ppa_user.name, ppa_name)
return (ppa_user, ppa_name, dput_ppa_name, ppa_url.encode('UTF-8'))