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


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

Re: module import questions and question about pytest and module imports

Started byJean-Michel Pichavant <jeanmichel@sequans.com>
First post2014-12-08 16:56 +0100
Last post2014-12-08 16:56 +0100
Articles 1 — 1 participant

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


Contents

  Re: module import questions and question about pytest and module imports Jean-Michel Pichavant <jeanmichel@sequans.com> - 2014-12-08 16:56 +0100

#82124 — Re: module import questions and question about pytest and module imports

FromJean-Michel Pichavant <jeanmichel@sequans.com>
Date2014-12-08 16:56 +0100
SubjectRe: module import questions and question about pytest and module imports
Message-ID<mailman.16724.1418054214.18130.python-list@python.org>
----- Original Message -----
> From: "sam pendleton" <samp4040@gmail.com>
> Having to put the garage package on the sys.path seems a little off,
> why wouldn't relative imports work?
> 
> Do most people somehow put their packages in sys.path when bundling
> their python packages up to be shared with setuptools or other python
> package managers? If so, how?

If it feels more natural to you, you can also update the env variable PYTHONPATH and add the path to your dev package.
That way you don't need to add python code.

But if you plan to distribute your package with setuptools, the solution would probably be to install your package before testing it (and probably use virtualenv).

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

[toc] | [standalone]


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


csiph-web