tags:

views:

444

answers:

2

I would like to run my own internal pypi server, for egg distribution within my organization.

I have found a few projects, such as:

As I understand it, pypi.python.org uses software called Cheese Shop.

My questions:

  1. Why can't I use cheeseshop itself? (I can't find it, not sure it exists)
  2. How do other people solve this problem? (Currently we use blush svn to distribute eggs)

*edit: This seems canonical http://wiki.python.org/moin/PyPiImplementations. Still, I'm interested in feedback.

+3  A: 

The source to Cheese Shop can be downloaded from https://svn.python.org/packages/trunk/pypi/. There is also an example, from the page you linked to, of using Apache as a "dumb" Python package repository:

# Mount pypi repositories into URI space
Alias /pypi   /var/pypi

# /pypi/dev: Redirect for unknown packages (fallback to pypi)
RewriteCond   /var/pypi/dev/$1 !-d
RewriteCond   /var/pypi/dev/$1 !-f
RewriteRule   ^/pypi/dev/([^/]+)/?$ http://pypi.python.org/pypi/$1/ [R,L]

RewriteCond   /var/pypi/dev/$1/$2 !-f
RewriteRule   ^/pypi/dev/([^/]+)/([^/]+)$ http://pypi.python.org/pypi/$1/$2 [R,L]

# /pypi/stable: Redirect for unknown packages (fallback to pypi)
RewriteCond   /var/pypi/stable/$1 !-d
RewriteCond   /var/pypi/stable/$1 !-f
RewriteRule   ^/pypi/stable/([^/]+)/?$ http://pypi.python.org/pypi/$1/ [R,L]

RewriteCond   /var/pypi/stable/$1/$2 !-f
RewriteRule   ^/pypi/stable/([^/]+)/([^/]+)$ http://pypi.python.org/pypi/$1/$2 [R,L]
John Millikin
After investigating all of the available options, I am not satisfied with any of them. However, the apache solution is the simplest, and is what I ended up using, even if it is far from ideal.
drue
+1  A: 

If you would like a lighter solution then deploying an entire pypi server, you could try using a server index generated by basketweaver.

tarasm