Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33675 > unrolled thread

Managing multiple packages

Started byEvan Driscoll <edriscoll@wisc.edu>
First post2012-11-20 15:24 -0600
Last post2012-11-20 15:24 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Managing multiple packages Evan Driscoll <edriscoll@wisc.edu> - 2012-11-20 15:24 -0600

#33675 — Managing multiple packages

FromEvan Driscoll <edriscoll@wisc.edu>
Date2012-11-20 15:24 -0600
SubjectManaging multiple packages
Message-ID<mailman.109.1353450317.29569.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

I have perhaps a bit of a silly question, but I'm interested in what
people do for workflow when actively developing multiple Python modules
at once (for a single project).

Suppose I have packages A-C. In addition to being modules in the Python
sense, they are logically distinct, probably sit in different
repositories, etc., so there's a directory layout like

  my_project/
  +-- moduleA/
  |   +-- setup.py
  |   +-- src/
  |   |   +-- A/
  |   |       +-- __init__.py
  |   +-- doc/
  |       +-- how_to_be_awesome.md
  +-- moduleB/
  |   +-- setup.py
  |   +-- src/
  |       +-- B/
  |           +-- __init__.py
  +-- moduleC/
      +-- setup.py
      +-- src/
          +-- C/
              +-- __init__.py

Finally, suppose that you're changing between editing all three modules.


How do you deal with this? Do you set
PYTHONPATH=my_project/moduleA/src:my_project/moduleB/src:my_project/moduleC/src,
adding a new entry to PYTHONPATH for each module you need to use?
Install all of the modules to some central location (e.g.
my_project/install) and just point PYTHONPATH to there? Put symlinks in
some central location and point them at the module directories? Mess
with sys.path at the beginning of any scripts you want to run? Some
other trick I don't know of?

I've sort of tended to do the my_project/install thing, but it's pretty
easy to forget to re-install a module after changing something, and
possible to accidentally edit the copy of the file in the install
directory (which will just be overwritten).

Evan




[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web