我有一个 requirements.in 文件,它只安装指向 github zip URL 的包之一。
这就是我重现问题的方式。查看案例。我总是跑pip-reqs compile
。
requirements.in:
https://github.com/jrutila/checkout-psp-client/archive/master.zip#egg=checkout-psp-client==0.0.1
results in requirements.txt with:
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --no-index --output-file /workspace/requirements.txt /workspace/requirements.in
#
asgiref==3.3.1 # via django
https://github.com/jrutila/checkout-psp-client/archive/master.zip#egg=checkout-psp-client==0.0.1
django==3.1.7
pytz==2021.1 # via django
sqlparse==0.4.1 # via django
好的,所以checkout-psp-client
正确列出了。我在一个容器中运行它,但不确定 django 的东西来自哪里......让我们尝试添加下一个包。
requirements.in:
https://github.com/jrutila/checkout-psp-client/archive/master.zip#egg=checkout-psp-client==0.0.1
https://github.com/jrutila/django-slick-reporting/archive/master.zip#egg=django-slick-reporting==0.5.99
results in requirements.txt with:
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --no-index --output-file /workspace/requirements.txt /workspace/requirements.in
#
asgiref==3.3.1 # via django
https://github.com/jrutila/django-slick-reporting/archive/master.zip#egg=django-slick-reporting==0.5.99
django==3.1.7
pytz==2021.1 # via django
sqlparse==0.4.1 # via django
没有checkout-psp-client
了。有趣...让我们交换软件包。
requirements.in:
https://github.com/jrutila/django-slick-reporting/archive/master.zip#egg=django-slick-reporting==0.5.99
https://github.com/jrutila/checkout-psp-client/archive/master.zip#egg=checkout-psp-client==0.0.1
results in requirements.txt with:
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --no-index --output-file /workspace/requirements.txt /workspace/requirements.in
#
asgiref==3.3.1 # via django
https://github.com/jrutila/checkout-psp-client/archive/master.zip#egg=checkout-psp-client==0.0.1
django==3.1.7
pytz==2021.1 # via django
sqlparse==0.4.1 # via django
现在它缺少了django-slick-reporting
!显然顺序很重要。
我在这里想念什么?原始文件包含更多 PyPi 包和一个 github URL,它们被正确列出。添加第二个 github URL 后,它开始出现异常行为,这是我可以重现此行为的最小示例。看来我只能包含一个来自外部资源的包。没有给出任何错误,pip-reqs compile
似乎没有详细的选项?