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


Groups > comp.lang.python > #33675

Managing multiple packages

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <edriscoll@wisc.edu>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'setup.py': 0.07; 'suppose': 0.07; 'scripts': 0.09; 'python': 0.09; 'mess': 0.09; 'modules.': 0.09; '+--': 0.16; '__init__.py': 0.16; 'filename:fname piece:signature': 0.16; 'sense,': 0.16; 'silly': 0.16; 'sys.path': 0.16; 'there?': 0.16; 'module': 0.19; 'sort': 0.21; 'bit': 0.21; 'finally,': 0.22; "i've": 0.23; 'header:User- Agent:1': 0.26; '(which': 0.26; '(e.g.': 0.27; 'developing': 0.28; 'this?': 0.28; 'accidentally': 0.29; 'use?': 0.29; 'probably': 0.29; "i'm": 0.29; 'install': 0.29; 'actively': 0.30; 'point': 0.31; 'file': 0.32; 'to:addr:python-list': 0.33; 'entry': 0.33; 'but': 0.36; 'modules': 0.36; 'possible': 0.37; 'being': 0.37; '(for': 0.37; 'some': 0.38; 'to:addr:python.org': 0.39; 'easy': 0.60; 'between': 0.63; 'different': 0.63; 'sit': 0.65; 'of?': 0.84; 'run?': 0.84; 'skip:p 80': 0.84; 'tended': 0.84; 'thing,': 0.84
MIME-version 1.0
Date Tue, 20 Nov 2012 15:24:59 -0600
From Evan Driscoll <edriscoll@wisc.edu>
Subject Managing multiple packages
Sender edriscoll@wisc.edu
To python-list@python.org
Content-type multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=------------enig1992664145B40C5618F57457
X-Spam-Report AuthenticatedSender=yes, SenderIP=128.105.14.80
X-Spam-PmxInfo Server=avs-15, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.11.20.211219, SenderIP=128.105.14.80
X-Enigmail-Version 1.4
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121026 Thunderbird/10.0.10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.109.1353450317.29569.python-list@python.org> (permalink)
Lines 75
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353450317 news.xs4all.nl 6904 [2001:888:2000:d::a6]:56420
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33675

Show key headers only | View raw


[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




Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web