简体   繁体   English

使用setup.py更新Python软件包

[英]Updating Python Package with setup.py

I maintain a Python Package on PyPI and I am having trouble testing changes. 我在PyPI上维护了Python程序包,但无法测试更改。 I would like to install it on my own computer and test before updating my version on PyPI. 我想在自己的计算机上安装它并进行测试,然后再在PyPI上更新我的版本。 I try to run “python setup.py install” but it doesn't reflect the changes that I have made. 我尝试运行“ python setup.py install”,但没有反映出我所做的更改。 The only way I have been able to get it to reflect changes is to upload it to PyPI and update it with pip. 我能够反映变化的唯一方法是将其上传到PyPI并使用pip更新。 Is there anyway to update using the setup.py? 无论如何,有没有使用setup.py更新的内容? Or anyway to install on my computer before uploading to PyPI? 还是在上传到PyPI之前要在我的计算机上安装? I would assume there has to be but I have not been able to find anything for it yet 我认为一定有,但是我还没有找到任何东西。

您可以将可编辑的安装与pip一起使用,以从源安装并在进行更改时更新它:

$ pip install -e .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM