run from source could be nicer - set path, don't pollute namespace

Bug #599565 reported by Robert Collins
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Wikkid Wiki
Confirmed
Medium
Unassigned

Bug Description

currently AFAICT you're meant to run from source by doing:
ln -s $(pwd)/plugin ~/.bazaar/plugins/wikkid
PYTHONPATH=$(PYTHONPATH):$(pwd)

however this makes 'plugin' turn up as a top level importable called plugin, which while not really ugly is a bit unexpected. Secondly, the PYTHONPATH export is a bit ugly.

Perhaps it would be nicer to when importing wikkid if you get a not-found, try importing it from abspath(__file__)/../wikkid/

Revision history for this message
Tim Penhey (thumper) wrote :

Actually I run from source by not using the bzr plugin.

I go ./bin/wikkid-serve <branch>

But I'm interested in what you are saying here.

Changed in wikkid:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Vincent Ladeuil (vila) wrote :

I do :
  ln -s ~/src/wikkid/current/wikkid ~/lib/python/wikkid
  ln -s ~/src/wikkid/current/plugin ~/.bazaar/plugins/wikkid

instead, but I of course I have ~/lib/python already in my PYTHONPATH.

I also noticed the code duplication between bin/wikkid-serve and plugin/commands..py cmd_wikkid...

Using wikkid-serve in my case will also require:
  ln -s ~/src/wikkid/current/bin/wikkid-serve ~bin/wikkid-serve
(since I have ~/bin in PATH already)

Again, this is mostly a concern if one want to run it from sources.

Revision history for this message
Vincent Ladeuil (vila) wrote :

See also bug #586861, not a dupe but same area.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.