mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-16 13:35:39 +01:00
Updated PyPI notes.
This commit is contained in:
parent
f80e3f22ce
commit
8e3f3c6044
@ -7,7 +7,7 @@ $ virtualenv -p /usr/bin/python3 /tmp/pypi_upload
|
||||
$ cd /tmp/pypi_upload; source bin/activate
|
||||
$ pip3 install twine
|
||||
$ cp -R path/to/ssh-audit .
|
||||
$ cd ssh-audit/pypi
|
||||
$ cd ssh-audit/packages
|
||||
$ make -f Makefile.pypi
|
||||
$ make -f Makefile.pypi uploadtest
|
||||
|
||||
|
@ -2,10 +2,21 @@
|
||||
|
||||
|
||||
import re
|
||||
import sys
|
||||
from setuptools import setup
|
||||
|
||||
print_warning = False
|
||||
m = re.search(r'^VERSION\s*=\s*\'v(\d\.\d\.\d)\'', open('sshaudit/sshaudit.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('sshaudit/sshaudit.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 = re.search(r'^VERSION\s*=\s*\'v(\d\.\d\.\d)\'', open('sshaudit/sshaudit.py').read(), re.M).group(1)
|
||||
version = m.group(1)
|
||||
print("\n\nPackaging ssh-audit v%s...\n\n" % version)
|
||||
|
||||
with open("sshaudit/README.md", "rb") as f:
|
||||
@ -42,3 +53,6 @@ setup(
|
||||
"Topic :: Security",
|
||||
"Topic :: Security :: Cryptography"
|
||||
])
|
||||
|
||||
if print_warning:
|
||||
print("\n\n !!! WARNING: development version detected (%s). Are you sure you want to package this version? Probably not...\n" % version)
|
||||
|
Loading…
Reference in New Issue
Block a user