diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:07:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:07:52 +0000 |
commit | f0f453c916e279980df981c1e1dee0d167dc124e (patch) | |
tree | d09973c9f173820ade2dc814467d3e57df8a042d /setup.py | |
parent | Initial commit. (diff) | |
download | ssh-audit-f0f453c916e279980df981c1e1dee0d167dc124e.tar.xz ssh-audit-f0f453c916e279980df981c1e1dee0d167dc124e.zip |
Adding upstream version 3.1.0.upstream/3.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | setup.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f9d087a --- /dev/null +++ b/setup.py @@ -0,0 +1,23 @@ +import re +import sys +from setuptools import setup + +print_warning = False +m = re.search(r'^VERSION\s*=\s*\'v(\d\.\d\.\d)\'', open('src/ssh_audit/globals.py').read(), re.M) +if m is None: + # If we failed to parse the stable version, see if this is the development version. + m = re.search(r'^VERSION\s*=\s*\'v(\d\.\d\.\d-dev)\'', open('src/ssh_audit/globals.py').read(), re.M) + if m is None: + print("Error: could not parse VERSION variable from ssh_audit.py.") + sys.exit(1) + else: # Continue with the development version, but print a warning later. + print_warning = True + +version = m.group(1) +print("\n\nPackaging ssh-audit v%s...\n\n" % version) + +# see setup.cfg +setup() + +if print_warning: + print("\n\n !!! WARNING: development version detected (%s). Are you sure you want to package this version? Probably not...\n" % version) |