How can a Python package, written with the usual setup.py setup of distutils (containing a scripts setting for scripts meant to be executed) be made compatible with virtualenv and pip? Is there a guide for Do's and Don'ts or issues to keep in mind when writing a package in a way so as to be compatible with virtual environments? Or is any setuptools package guaranteed to work with virtualenv? thanks.

有帮助吗?

解决方案

Unless you are doing something really unusual in your setup.py, it will work fine with virtualenv and pip. This is because setup.py is quite declarative in the first place (despite being an executable program), and virtualenv and pip were designed to work with existing packages which were written before they existed.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top