Merge lp:~philip-peitsch/quickly/lpi-src-package-support into lp:quickly

Proposed by Philip Peitsch
Status: Rejected
Rejected by: Didier Roche-Tolomelli
Proposed branch: lp:~philip-peitsch/quickly/lpi-src-package-support
Merge into: lp:quickly
Diff against target: 55 lines (+13/-3)
3 files modified
bin/quickly (+2/-1)
data/templates/ubuntu-application/project_root/bin/project_name (+3/-1)
data/templates/ubuntu-application/run.py (+8/-1)
To merge this branch: bzr merge lp:~philip-peitsch/quickly/lpi-src-package-support
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Needs Information
Review via email: mp+21299@code.launchpad.net

Description of the change

This patch overrides the LPI_PACKAGE_FILE when quickly run is called, allowing LaunchpadIntegration to function using the src package information. Currently all this does is allow translations and questions to be asked. Report a Bug functionality requires additional work and will be tracked in Bug #534947

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Hey Philip, did you get some news from the launchpad API side?

Revision history for this message
Didier Roche-Tolomelli (didrocks) :
review: Needs Information
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I think this MR doesn't apply anymore, cleaning the list :)

Unmerged revisions

445. By Philip Peitsch

Adding override to quickly run command to set the LPI_PACKAGE_FILE env variable so launchpad-integration will work even if the package isn't installed

444. By Philip Peitsch

Merging trunk

443. By Philip Peitsch

Making quickly respect PYTHOPATH overrides internally

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/quickly'
2--- bin/quickly 2010-02-14 00:00:07 +0000
3+++ bin/quickly 2010-03-12 23:52:21 +0000
4@@ -29,7 +29,8 @@
5 quickly_root_directory = os.path.abspath(quickly_root_directory_name)
6 if os.path.exists(os.path.join(quickly_root_directory, 'quickly')) and quickly_root_directory not in sys.path:
7 sys.path.insert(0, quickly_root_directory)
8- os.putenv('PYTHONPATH', quickly_root_directory) # for subprocesses
9+ new_pythonpath = ":".join(filter(lambda l:l, [os.getenv('PYTHONPATH'), quickly_root_directory]))
10+ os.putenv('PYTHONPATH', new_pythonpath) # for subprocesses
11
12 from quickly import commands, configurationhandler, quicklyconfig, coreupgrade, tools, version
13
14
15=== modified file 'data/templates/ubuntu-application/project_root/bin/project_name'
16--- data/templates/ubuntu-application/project_root/bin/project_name 2010-03-09 09:36:08 +0000
17+++ data/templates/ubuntu-application/project_root/bin/project_name 2010-03-12 23:52:21 +0000
18@@ -27,7 +27,9 @@
19 if (os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'python_name'))
20 and PROJECT_ROOT_DIRECTORY not in sys.path):
21 sys.path.insert(0, PROJECT_ROOT_DIRECTORY)
22- os.putenv('PYTHONPATH', PROJECT_ROOT_DIRECTORY) # for subprocesses
23+ # any existing PYTHONPATH entries should be preserved
24+ new_pythonpath = ":".join(filter(lambda l:l, [os.getenv('PYTHONPATH'), PROJECT_ROOT_DIRECTORY]))
25+ os.putenv('PYTHONPATH', new_pythonpath) # for subprocesses
26
27 from python_name import (
28 Aboutcamel_case_nameDialog, Preferencescamel_case_nameDialog)
29
30=== modified file 'data/templates/ubuntu-application/run.py'
31--- data/templates/ubuntu-application/run.py 2010-02-14 00:00:07 +0000
32+++ data/templates/ubuntu-application/run.py 2010-03-12 23:52:21 +0000
33@@ -52,6 +52,13 @@
34 print _("Can't access to X server, so can't run gtk application")
35 sys.exit(1)
36
37+new_env = None
38+if os.path.isdir('debian'):
39+ control_file = os.path.join(os.path.abspath('debian'),'control')
40+ if os.path.isfile(control_file):
41+ new_env = dict(os.environ)
42+ new_env['LPI_PACKAGE_FILE'] = control_file
43+
44 project_bin = 'bin/' + configurationhandler.project_config['project']
45 command_line = [project_bin]
46 command_line.extend([arg for arg in sys.argv[1:] if arg != "--"])
47@@ -60,7 +67,7 @@
48 st = os.stat(project_bin)
49 mode = st[stat.ST_MODE]
50 if mode & stat.S_IEXEC:
51- subprocess.call(command_line)
52+ subprocess.call(command_line, env=new_env)
53 else:
54 print _("Can't execute %s") % project_bin
55 sys.exit(1)

Subscribers

People subscribed via source and target branches