I am making Tornado application(new to Python and Tornado so maybe question is stupid), and I am using additional Python packages like lepl, sqlalchemy and so on. Is possible to write in Python script setup.py which is going to check if all those packages already installed – otherwise install them ? Or I need to do this in bash ?
I am making Tornado application(new to Python and Tornado so maybe question is stupid),
Share
Use
setuptools, and only specify these requirements:Then use a proper installing tool such as
pip,easy_install(comes withsetuptools) orbuildoutto manage installation of those dependencies.By separating dependency management and installation, you have much better control over what gets installed when.
I can recommend you read the Python Packaging User Guide to learn more about packaging of python code and dependency management.