Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you host your own egg repository?

Tags:

python

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

like image 680
Tom Willis Avatar asked Oct 05 '09 11:10

Tom Willis


People also ask

How do I install a Python egg file?

In order to be able to install eggs you simply need to install easy_install which is easily done by downloading ez_install.py (you can download it here) and calling it (you need to have rights to install components in your python installation of course). and it will download and install the most recent version.

What is a Python Repository?

Python repositories are where software development teams that develop with Python share their code artifacts (libraries, packages, etc.). The Python Package Index or PyPi, is the public repository where open source and other publicly available artifacts can be uploaded and downloaded.

What is egg in Python package?

A “Python egg” is a logical structure embodying the release of a specific version of a Python project, comprising its code, resources, and metadata. There are multiple formats that can be used to physically encode a Python egg, and others can be developed.


1 Answers

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.

like image 122
codeape Avatar answered Sep 30 '22 06:09

codeape