I have a lot of python scripts which I release to a python virtual environment on a remote machine. The virtual environment is rarely updated. The scripts are pulled from a git repository and a makefile is used to deploy them into the virtual environment directory.

My question: is there a more normal way to deploy the scripts?

I would like a process that at least remembers which files were deployed for cleanup upon the next release. I've read a bit on pip packaging, but I'm not sure if it fits our setup. The scripts need to be in a common location where they can be called by other applications. The OS is SUSE Linux.

  • 1
    Could you add the distribution, e.g. ubuntu, centos as a tag?
    – 030
    Commented Aug 10, 2017 at 6:20
  • 1
    The distro is SUSE Linux
    – Dawn555
    Commented Aug 10, 2017 at 6:50

2 Answers 2


One could consider to package the scripts. Depending on the distribution, e.g. ubuntu, windows, centos one could create a ppa, nuget or rpm respectively. Once a newer version is installed, the package manager will remove the previous version automatically.

As yum or zypper could be used to install packages on OpenSuse one could consider to create an rpm by using either spec files or using fpm.


Sparrow makes scripts deployment and distribution simple and super flexible. It is kinda language agnostic system, meaning you can write scripts on many languages, Python is included. There is a nice introduction on script distribution with Sparrow.

The only hurdle with your case you will have to adjust existed scripts so that they could be packaged, it's pretty straightforward process though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.