pip:是否需要避免--allow-external的解决方法? [英] pip: Any workaround to avoid --allow-external?

查看:370
本文介绍了pip:是否需要避免--allow-external的解决方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

pip安装程序的最新版本尚未安装不会将其软件包文件上传到PyPI的软件包,除非用户明确提供相关答案).

Recent versions of pip installer hasn’t installed packages that do not upload their package files to PyPI unless the user explicitly provide --allow-external option (related answer).

我想分发依赖于 dirspec 之类的库的软件包.当前,我必须通过以下命令告诉我的软件包的用户来安装我的软件包:

I want to distribute my package that depend on such library like dirspec. Currently I have to tell users of my package to install my package by the following command:

$ pip install --allow-external dirspec MyPackage

在图书馆包装方面,这变得更加成问题.如果我的软件包是一个库,我还必须告诉依赖于我的软件包的软件包的作者,以通过以下命令告诉他们的用户安装其软件包:

It becomes more problematic when it comes to library packaging. If my package is a library I also have to tell authors of packages that depend on my package to tell their users to install their package by the following command:

$ pip install --allow-external dirspec TheirPackage

是否有任何解决方法来避免这种情况?

Is there any workaround to avoid this situtation?

推荐答案

正确的做法是将要求包含在您的tarball或包含他们的项目和您的巨型tarball中.然后pip会很高兴从本地文件安装.

The right thing to do is include the requirements in your tarball or in a mega-tarball containing their projects and yours. Then pip will happily install from the local files.

这篇关于pip:是否需要避免--allow-external的解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆