HiveBrain v1.2.0
Get Started
← Back to all entries
patternpythonMinor

Recommendations about release convention or standard for Python scripts?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
scriptsconventionstandardreleaseaboutforpythonrecommendations

Problem

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.

Solution

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.

Context

StackExchange DevOps Q#1690, answer score: 4

Revisions (0)

No revisions yet.