python 没有托管服务器的 repo

python repo without hosting a server

我整理了一堆 python 个包,现在我想与我的团队分享。

我看到了很多关于托管 pypi 服务器的文章,但我想绕过设置机器并获得这样做的许可的麻烦。

我希望我可以通过网络写入我的同事可以访问的包。

所以我创建的一个包具有以下 setup.py 脚本:

from setuptools import setup, find_packages

setup(
    name='prodorm',
    version='0.1',
    packages = find_packages(),
    install_requires = ['ormutils @ file://N:/some/path/']
)

ormutils 位于:N:/some/path/ormutils

但是当我尝试使用上面的脚本安装时,我得到:

Couldn't find index page for 'ormutils' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading https://pypi.org/simple/ No local packages or working download links found for ormutils@ file:n:/some/path/ error: Could not find suitable distribution for Requirement.parse('ormutils@ file://n:/some/path/')

这是什么'index page',明明不是我创建的,我怎么能创建它?

您可以使用 pip 安装包,这些包托管在 GitHub 或 GitLab(或者可能是任何 git 解决方案,网络托管或自托管)。

我建议你看一下那篇博文:https://medium.freecodecamp.org/how-to-use-github-as-a-pypi-server-1c3b0d07db2