On 02/07/2013 17:08, PJ Eby wrote:
If you are targeting at least Python 2.5, see:
http://docs.python.org/2/library/pkgutil.html#pkgutil.walk_packages
We're targeting Python 2.7.
Trouble is that pkgutil.walk_packages needs a path to search from.
Distribution.location is always your site-packa
Hi there,
We have been struggling to find a nice way to list all the modules (or
packages) that are part of a particular Distribution (or egg). Nice
should also mean that it works when the egg is installed. We have a need
to do some introspection on the code shipped as an egg.
Any ideas?
Re
New submission from Iwan Vosloo :
When running setup.py install --single-version-externally-managed in order to
package an egg in, eg, a .deb, the scripts generated from entrypoints contain a
line:
#!/path/to/python
This path is taken from sys.executable.
However, this command is often run
Hi there,
We are running:
python setup.py install --single-version-externally-managed
in order to package an egg in a .deb.
However, we run this inside a virtualenv environment, which means that
all scripts generated by setuptools start with:
#!/path/to/python/in/virtualenv
I see that sys.ex
On Mon, 2009-05-11 at 13:53 +0200, Iwan Vosloo wrote:
> During each invocation, python imports different, new instances of the
> same module.
...
> Is this a bug? (We are on version 0.6c8 of setuptools, python 2.5)
Sorry, on second thought we realised this is obviously indended
behavio
# Fails
Is this a bug? (We are on version 0.6c8 of setuptools, python 2.5)
There is an easy solution:
Save sys.modules like before:
old_modules = sys.modules.copy()
But restore it like this:
sys.modules = old_modules
That seems to fix our problem (not sure of other effects t
On Mon, 14 Jan 2008 09:45:29 -0500 Phillip J. Eby wrote:
> >[1] In fact, this is an intermediary result - I want to
> compute all the
> >entry points of a tree of dependencies in such a way that the
> entry
> >points of eggs deeper in the tree will always b
Hi there,
I need to get a list of eggs in 'dependency' order: a list with eggs
(Distribution objects?) which is sorted so that earlier entries will
never depend on entries later in the list. [1]
I spotted the _dep_map attribute on Distribution objects and it seems to
have something like that alre
Iwan Vosloo <[EMAIL PROTECTED]> writes:
> I suppose there is a correlation between what Philip calls an
> environment in this sense, and a machine in the debian/apt world. An
> environment is just a more abstract way of looking at it allowing more
> flexibility.
Sorrry, that w
Hi Maris,
I'm not suggesting using apt - just thinking about the difference in
models. I suppose the pure python equivalent of apt and its
repositories would be to have your own private PyPi (the respository),
and using easy_install to install things from there onto individual
machines. This do
Hi Maris,
Ok, I see...
You can thus assume in your environment that the network will always
be there.
I was wondering whether you've ever looked at something like Debian's
apt. (Mentioned here just to learn from it, not to advocate its use.)
Apt is a wonderful tool for keeping repositories and
Ian Bicking <[EMAIL PROTECTED]> writes:
> Another option is a completely new python interpreter bound to the
> environment. Basically the virtual-python.py option
> (http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python).
>
> In this model using env/bin/python indica
Hi,
I have a package which discovers plugins via
pkg_resources.iter_entry_points.
Is the order entry points are iterated through defined in any way?
Such as first eggs to be loaded first, or some such? There seems to
be some kind of ordering, but I don't know if this is intended...
My scenari
"Phillip J. Eby" <[EMAIL PROTECTED]> writes:
> At 12:26 PM 2/22/2006 +0200, Iwan Vosloo wrote:
> >What is the easiest way (in testing code) to make a new entry point in
> >some group in a test setup, and nuke it again in the test tearDown?
>
> Well, there is
Hi there,
I'm trying to write tests for an egg which expects certain entry
points to be supplied for an entry point group it is interested in.
What is the easiest way (in testing code) to make a new entry point in
some group in a test setup, and nuke it again in the test tearDown?
Tx
-i
___
15 matches
Mail list logo