setuptools

Accessing python egg's own metadata

I've produced a python egg using setuptools and would like to access it's metadata at runtime. I currently got working this: import pkg_resources dist = pkg_resources.get_distribution("my_project") print(dist.version) but this would probably work incorrectly if I had multiple versions of the same egg installed. And if I have both inst...

How can I add post-install scripts to easy_install / setuptools / distutils?

I would like to be able to add a hook to my setup.py that will be run post-install (either when easy_install'ing or when doing python setup.py install). In my project, PySmell, I have some support files for Vim and Emacs. When a user installs PySmell the usual way, these files get copied in the actual egg, and the user has to fish them ...

Python packages and egg-info directories

Can someone explain how egg-info directories are tied to their respective modules? For example, I have the following: /usr/local/lib/python2.5/site-packages/quodlibet/ /usr/local/lib/python2.5/site-packages/quodlibet-2.0.egg-info/ I'm assuming the egg-info directory is to make the corresponding module visible to setuptools (easy_insta...

How to setup setuptools for python 2.6 on Windows?

Is there any way to install setuptools for python 2.6 in Windows without having an .exe installer? There isn't one built at the moment, and the maintainer of setuptools has stated that it's probable be a while before he'll get to it. Does anyone know of a way to install it anyway? ...

Questions about Setuptools and alternatives

I've seen a good bit of setuptools bashing on the internets lately. Most recently, I read James Bennett's On packaging post on why no one should be using setuptools. From my time in #python on Freenode, I know that there are a few souls there who absolutely detest it. I would count myself among them, but I do actually use it. I've used ...

python setup.py develop not updating easy_install.pth

According to setuptools documentation, setup.py develop is supposed to create the egg-link file and update easy_install.pth when installing into site-packages folder. However, in my case it's only creating the egg-link file. How does setuptools decide if it needs to update easy_install.pth? Some more info: It works when I have setupto...

How to get the "python setup.py" submits informations on freshmeat?

With this you can easily submit the information about your software on pypi: python setup.py register But there is not a similar command for submitting information to freshmeat. How could I write a distutils.Command that let me do the following. python setup.py freshmeat-submit ...

How can I deploy a django appserver as an egg, running behind fastcgi?

I want to run a django appserver behind apache/fastcgi. That's no problem, django does that out of the box. I want this appserver to be deployable via setuptools. That is, I will make it as an egg and install it with easy_install. And that part I can also handle, even though setuptools is not a standard complement to a django appserv...

Combined Python & Ruby extension module

I have a C extension module for Python and I want to make it available to Rubyists. The source has a number of C modules, with only one being Python-dependent. The rest depend only on each other and the standard library. I can build it with python setup.py build in the usual way. I've been experimenting with adding Ruby support using n...

Python Daemon Packaging Best Practices

I have a tool which I have written in python and generally should be run as a daemon. What are the best practices for packaging this tool for distribution, particularly how should settings files and the daemon executable/script be handled? Relatedly are there any common tools for setting up the daemon for running on boot as appropriate...

How can I manually register distributions with pkg_resources?

I'm trying to get a package installed on Google App Engine. The package relies rather extensively on pkg_resources, but there's no way to run setup.py on App Engine. There's no platform-specific code in the source, however, so it's no problem to just zip up the source and include those in the system path. And I've gotten a version of ...

Excluding a top-level directory from a setuptools package

I'm trying to put a Python project into a tarball using setuptools. The problem is that setuptools doesn't appear to like the way that the source tree was originally setup (not by me, I must add). Everything that I actually want to distribute is in the top-level directory, rather than in a subdirectory like the setuptools docs talk abo...

Unable to install python-setuptools from source

The question is related to the post. I need to install python-setuptools to install python modules. I have extracted the installation package. I get the following error when configuring [~/wepapps/pythonModules/setuptools-0.6c9]# ./configure --prefix=/home/masi/.local -bash: ./configure: No such file or directory I did not find the ...

What's the correct way to add extra find-links to easy_install when called as a function?

I need to call easy_install as a function to install some Python eggs from a bunch of servers. Precisely what I install and where I get it from is determined at run-time: For example which servers I use depends on the geographic location of the computer. Since I cannot guarantee that any single server will always be available, it has be...

Why does setuptools sometimes delete and then re-install the exact same egg?

I'm trying to install an egg on a computer where an identical egg already exists. Why does it remove the egg and then re-install it? I'm calling easy_install from a script with the options: ['-v', '-m', '-f', 'R:/OPTIONS/Stephen/python_eggs', 'mypkg==1.0_r2009_03_12'] While running the easy_install command this was observed: Searchin...

How can I make a Python extension module packaged as an egg loadable without installing it?

Hi all I'm in the middle of reworking our build scripts to be based upon the wonderful Waf tool (I did use SCons for ages but its just way too slow). Anyway, I've hit the following situation and I cannot find a resolution to it: I have a product that depends on a number of previously built egg files. I'm trying to package the produ...

How do I load entry-points for a defined set of eggs with Python setuptools?

I would like to use the entry point functionality in setuptools. There are a number of occasions where I would like to tightly control the list of eggs that are run, and thence the extensions that contribute to a set of entry points: egg integration testing, where I want to run multiple test suites on different combinations of eggs. s...

Multiple projects from one setup.py?

My current setup.py (using setuptools) installs two things, one is tvdb_api (an API wrapper), the other is tvnamer (a command line script) I wish to make the two available separately, so a user can do.. easy_install tvdb_api ..to only get the API wrapper, or.. easy_install tvnamer ..to install tvnamer (and tvdb_api, as a requireme...

Explain Python entry points?

I've read the documentation on egg entry points in Pylons and on the Peak pages, and I still don't really understand. Could someone explain them to me, or point me at an article or book that does? ...

setuptools on python3.0

Hi, I was trying to install "setuptool" package for python3.0. But unfortunately while I try to install it says module names "dist" is missing. pls help me to resolve this issue. ...