我如何推出自己的 PyPI? 例如,对于“鸡蛋”; 分配

发布于 2024-07-30 10:26:00 字数 918 浏览 10 评论 0 原文

我想运行我自己的内部 PyPI 服务器,以便在我的组织内分发egg

我发现了一些项目,例如:

  • EggBasket
  • < a href="http://plone.org/products/plonesoftwarecenter" rel="nofollow noreferrer">http://plone.org/products/plonesoftwarecenter

据我了解, pypi.python.org 使用软件叫做奶酪店。

我的问题:

  1. 为什么我不能使用 Cheese Shop 本身? (我找不到它并且不确定它是否存在)
  2. 其他人如何解决这个问题? 我们使用blushSVN来分发“鸡蛋”)

(目前 看起来很规范:The Python WikiPython 实现。 不过,我对反馈很感兴趣。

我如何推出自己的 PyPI?

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 Cheese Shop itself? (I can't find it and am not sure it exists)
  2. How do other people solve this problem? (Currently we use blush SVN to distribute 'eggs')

This seems canonical: The Python Wiki, Python Implementations. Still, I'm interested in feedback.

How can I roll my own PyPI?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

荭秂 2024-08-06 10:26:01

这个(旧的)列表中还缺少另一个:

djangopypi

它是基于 Django 的,这可能有点矫枉过正,但我喜欢 Django,如果它不能满足您的需求,它可以非常简单地根据您的需要进行修改。

Another missing from this (oldish) list:

djangopypi

It is Django based, which might be a slight overkill, but I love Django and it makes it extremely simple to modify it to your need should it not be satisfying.

暮年慕年 2024-08-06 10:26:01

crate 源代码可用,但至少可以说,文档不存在:

Crate.Web

这是一个提供 Python 包索引的 Django 应用程序。 它使用了
创建存储库
,这样您就可以在没有 Django 的情况下推出自己的版本。

我特别在考虑静态的。 我一直认为应该有一种非常简单的方法来直接探索一些[预先配置的]存储库并直接从我的 GitHub 或 Bitbucket 公共和私有存储库,仅运行一个简单的 (gunicorn) 进程。

And the crate source code is available, though documentation is, least that can be said, nonexistent:

Crate.Web

It's a Django application providing a Python Package Index. It uses a couple of other packages from the
Crate repositories
, so you might be able to roll out your own version without Django.

I'm specifically thinking about a static one. I always thought there should be a very easy way to go explore directly some [preconfigured] repositories and shop cheese directly from my GitHub or Bitbucket public and private repositories, with just a simple (gunicorn) process running.

一束光,穿透我孤独的魂 2024-08-06 10:26:00

对于轻量级解决方案,请使用 pypiserver

For a lightweight solution, use pypiserver.

何止钟意 2024-08-06 10:26:00

更新:PyPi 现在由 Warehouse 提供支持,它是 Cheese Shop 的替代品。

Cheese Shop 的源码可以从 https://bitbucket.org/pypa/pypi/src 下载。 您链接到的页面上还有一个使用 Apache 作为“哑”Python 包存储库的示例:

# 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]

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]
浪漫之都 2024-08-06 10:26:00

仓库

Warehouse 将是您 2017 年最好的选择。来自该项目的自述文件:

Warehouse 是下一代 Python 包存储库,旨在取代
当前支持 PyPI

的遗留代码库

...

您可以使用 docker 和 docker-compose 在本地运行 Warehouse。 看
入门
在文档中了解如何设置的说明。

它由 Python 打包权威 (PyPA) 维护,他们与 Python 核心开发团队的成员合作,并且有一个在 https://pypi.org/ 上运行的实时版本,它镜像了所有内容在旧版 PyPI (https://pypi.python.org/) 中。

Warehouse

Warehouse would be your best bet in 2017. From the project's README:

Warehouse is a next generation Python Package Repository designed to replace
the legacy code base that currently powers PyPI

...

You can run Warehouse locally using docker and docker-compose. See
Getting started
in the documentation for instructions on how to set it up.

It is maintained by The Python Packaging Authority (PyPA) who work in cooperation with members of the Python core development team, and there is a live version running at https://pypi.org/ which mirrors everything in the legacy PyPI (https://pypi.python.org/).

紫竹語嫣☆ 2024-08-06 10:26:00

devpi

我们正在企业环境中使用它,并且非常满意。 它支持复制、私有索引和索引继承。

devpi

We are using it in a corporate environment and are pretty satisfied. It supports replication, private indexes and index inheritance.

暮凉 2024-08-06 10:26:00

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

画骨成沙 2024-08-06 10:26:00

更新:crate.io 已关闭,该域现在完全是另一回事了。

一个没有被提及的项目是 https://crate.io/,它看起来非常活跃。 它声称是“下一代 Python 打包索引”,但他们的存储库很好地分成了几部分,似乎欢迎根据您的目的进行定制和重新混合。

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.

川水往事 2024-08-06 10:26:00

如果您想要比部署整个 PyPI 服务器更轻的解决方案,您可以尝试使用 basketweaver 生成的服务器索引

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文