How do you distribute Python scripts?
I have a server that runs Python scripts from a specific directory path. By the way, this path is an extract from the SVN scripts version. However, I get the feeling that this is the wrong way to provide and update scripts for the server.
Do you suggest other approaches? (compiling, copying, packaging, ant, etc.) Eventually the web server will execute several Python script with parameters. How can I complete the upgrade process?
Also, I am having a hard time deciding what is the best way to handle updated versions that only work for new projects on the server. So if I update the Python scripts, but only the newly created WebJobs will know how to handle it. "Delivery" to one of the many version-tracked directories and the server picks the right one ?!
EDIT: I'm a webserver - it's basically a frontend that does some data analysis. This analysis represents actual scenarios that take some parameters and mix data. I don't really change the web interface. I only need to update scripts of data stored in the web server. Indeed, in some enhanced version, the webserver must also select the correct version of my data scripts. However, at the moment I have no idea what would be the easiest way.
source to share
The canonical way to distribute Python code / functionality is to use a PyPi-enabled package manager.
List of available PyPi implementations at python.org:
Instructions for setting up and using EggBasket: http://chrisarndt.de/projects/eggbasket/#installation
ChiShop installation instructions: http://justcramer.com/2011/04/04/setting-up-your-own-pypi-server/
Note that for this you need to distribute your code as Eggs; you can find out how to do it here: http://peak.telecommunity.com/DevCenter/setuptools
Great blog post about using eggs and different parts in a package: http://mxm-mad-science.blogspot.com/2008/02/python-eggs-simple-introduction.html
source to share