Reputation: 5303
Say you're on a team that's maintaining a lot of internal python libraries(eggs), and for whatever reason uploading them to pypi is not an option. How could you host the libraries(eggs) so that easy_install can still work for the members of your team?
Basically it would be cool if this worked....
(someproj)uberdev@hackmo:~$ easy_install myproprietary.lib-dev
user: uberdev
password:...
fetching......
Searching for myproprietary.lib-dev
Reading http://dev.mycompany.corp/myproprietary.lib-dev
Reading http://dev.mycompany.corp
Reading http://dev.mycompany.corp/dist
Best match: myproprietary.lib-dev
Downloading http://dev.mycompany.corp/dist/myproprietary.lib-dev
I suppose there's some sort of servers out there that can be installed but I'd appreciate some guidance from the experts on this matter.
Thanks
Upvotes: 17
Views: 4743
Reputation: 161
I use ClueReleaseManager
ClueReleaseManager is an implementation of the PyPi server backend as provided by http://pypi.python.org. It uses SQLAlchemy (on top of sqlite by default) to store all project metadata and the filesystem for storing project files.
Upvotes: 2
Reputation: 100786
Deploy all your eggs to a directory all devs. can reach (for instance on a webserver).
To install eggs from that directory, type:
$ easy_install -H None -f http://server/vdir TheEggToInstall
or.
$ easy_install -H None -f /path/to/directory TheEggToInstall
-H None
means do not allow egg download from any host (except the one named in -f
).
The directory can be reachable over http or can be a directory you mount (NFS, Windows shares etc.). Perhaps even FTP works?
The easy_install documentation has information on this.
Upvotes: 8
Reputation: 172249
First of all: If the packages are generic packages should be available publicly, not uploading the packages to PyPI is generally a bad idea, as easy_installing a package that depends on your package means your egg server needs to be up and running, as well as PyPI. For every server involved you get more single-point of failures.
But if it's private packages that should not even be listed on PyPI, or packages only useful as a part of a large system, like Plone, it's another matter. Then you want easy___install and buildout etc's to look for eggs on your server. Doing that is quite straighforward. You just put the eggs directory on a webserver and point to that directory with the -f parameter to easy_install.
Here is an example of such a repository: http://dist.plone.org/release/3.3.1/
Upvotes: 1
Reputation: 391852
If your team is distributed -- and on speaking terms -- then a simple subversion repository of source is better than some other kind of server.
Simply create projects and have everyone checkout trunk. When things change, tell them to update.
If your team is co-located -- and on speaking terms -- then a shared drive with the "official" libraries also works well. Simply mount it and include it on your PYTHONPATH
.
If you want localized copies, provide the official source in subversion (or a shared drive) with a good setup.py
file. They simply CD to the directory and run python setup.py install
and everything else happens for them. It's a fraction simpler than easy_install
because setup.py
is already part of the Python distribution.
Eggs are for people who are not on speaking terms.
Your team members usually are on speaking terms and don't need the added complexity of eggs. The basic setup.py
should be sufficient.
Upvotes: 3