How to roll my own pypi?

后端 未结 10 2053
名媛妹妹
名媛妹妹 2020-11-27 14:53

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

I have found a few projects, such as:

  • http://pypi.python
相关标签:
10条回答
  • 2020-11-27 15:11

    Update: PyPi is now powered by Warehouse, which is the replacement for Cheese Shop.

    The source to Cheese Shop can be downloaded from https://bitbucket.org/pypa/pypi/src. 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]
    
    0 讨论(0)
  • 2020-11-27 15:19

    Updated: crate.io has shut down and the domain is now something else entirely.

    One project that hasn't been mentioned is https://crate.io/, which seems very active. It claims to be a "Next Generation Python Packaging Index", but they have their repositories split nicely into pieces that seem to welcome customization and remixing to your purposes.

    0 讨论(0)
  • 2020-11-27 15:21

    There is a fork of djangopypi named djangopypi2 you can get it from https://github.com/popen2/djangopypi2/, I installed it and works for me, this option is what I had choose from a list of about 24 alternatives that I have found in a recently search, you can see the list here: http://uyeya.blogspot.com/2013/10/list-of-local-alternatives-of-pypi.html

    0 讨论(0)
  • 2020-11-27 15:22

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

    0 讨论(0)
提交回复
热议问题