mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-11-21 10:01:41 +01:00
b15664929f
* Move files for better setup.py packaging * Update setup.py and configs for src layout * Run tests on setup.py build In effect, this tests that the setup.py configuration is correct. coverage combine and coverage:paths are added to keep the displayed coverage paths as src/ssh_audit/*.py instead of .tox/$envname/**/site-packages/ssh_audit/*.py * Remove unnecessary encoding declarations Python 3 defaults to UTF-8 encoding. https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations * Remove shebang from colorama type stubs Shouldn't need to be an executable. Related: git has this file tracked as chmod -x.
48 lines
1012 B
Plaintext
48 lines
1012 B
Plaintext
= PyPI =
|
|
|
|
To create package and upload to test server:
|
|
|
|
# apt install virtualenv
|
|
$ 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
|
|
$ make -f Makefile.pypi
|
|
$ make -f Makefile.pypi uploadtest
|
|
|
|
|
|
To download from test server and verify:
|
|
|
|
$ virtualenv -p /usr/bin/python3 /tmp/pypi_test
|
|
$ cd /tmp/pypi_test; source bin/activate
|
|
$ pip3 install --index-url https://test.pypi.org/simple ssh-audit
|
|
|
|
|
|
To upload to production server:
|
|
|
|
$ cd /tmp/pypi_upload; source bin/activate
|
|
$ cd ssh-audit
|
|
$ make -f Makefile.pypi uploadprod
|
|
|
|
|
|
To download from production server and verify:
|
|
|
|
$ virtualenv -p /usr/bin/python3 /tmp/pypi_prod
|
|
$ cd /tmp/pypi_prod; source bin/activate
|
|
$ pip3 install ssh-audit
|
|
|
|
----
|
|
|
|
= Snap =
|
|
|
|
To create the snap package, run a fully-updated Ubuntu Server 20.04 VM.
|
|
|
|
As root, run:
|
|
|
|
# lxd init
|
|
|
|
Leave all options default. Bump the version number in snapcraft.yaml. Then run:
|
|
|
|
# make -f Makefile.snap
|