我正在尝试为我的包编写setup.py.我的包需要指定对另一个git仓库的依赖.
这是我到目前为止:
from setuptools import setup, find_packages
setup(
name='abc',
packages=find_packages(),
url='https://github.abc.com/abc/myabc',
description='This is a description for abc',
long_description=open('README.md').read(),
install_requires=[
"requests==2.7.0",
"SomePrivateLib>=0.1.0",
],
dependency_links = [
"git+git://github.abc.com/abc/SomePrivateLib.git#egg=SomePrivateLib",
],
include_package_data=True,
)
Run Code Online (Sandbox Code Playgroud)
当我跑:
pip install -e https://github.abc.com/abc/myabc.git#egg=analyse
Run Code Online (Sandbox Code Playgroud)
我明白了
找不到满足要求的版本SomePrivateLib> = 0.1.0(来自analyze)(来自版本:)未找到SomePrivateLib的匹配分布> = 0.1.0(来自analyze)
我究竟做错了什么 ?
尝试将Django项目部署到Heroku上的新应用程序(代码在过去两年中运行在其他实例上) - 并且受到了以下攻击:
Downloading/unpacking PIL==1.1.7 (from -r requirements.txt (line 7))
Could not find any downloads that satisfy the requirement PIL==1.1.7 (from -r requirements.txt (line 7))
Some insecure and unverifiable files were ignored (use --allow-unverified PIL to allow).
Cleaning up...
No distributions at all found for PIL==1.1.7 (from -r requirements.txt (line 7))
Storing debug log for failure in /app/.pip/pip.log
! Push rejected, failed to compile Python app
Run Code Online (Sandbox Code Playgroud)
我知道最近的变化,pip并希望使用安全的软件包,但是根据pip的预期,所有软件包都可以正确打包,我们需要一些解决方法.特别是缺乏 - 允许所有未经验证的标志使得这是一个试验性的错误,黑板运动而不是无痛的部署.
有没有理智的方法来克服这个障碍?(不仅仅是PIL,但这是第一个失败的软件包,还有其他几个像pyPdf一样,如果我设法解决这个问题就会失败)
任何指针赞赏!