Add setup.py and make cli easily installable via entry_points

This commit is contained in:
Kristóf Tóth 2022-02-15 22:38:02 +01:00
parent bde2b0067e
commit 8597e44d3b
4 changed files with 29 additions and 3 deletions

View File

@ -1 +1,2 @@
from .identicon import Identicon

View File

@ -6,8 +6,8 @@ from io import BytesIO
import click
from blake3 import blake3
from identicon import Identicon
from stream import get_deterministic_stream, ClosableStream
from . import Identicon
from .stream import get_deterministic_stream, ClosableStream
DIGEST_SIZE = 20
@ -16,7 +16,7 @@ BUF_SIZE = 65536 # Linux default pipe capacity is 64KiB (64 * 2^10)
@click.command(
help=(
'Print OpenSSH style randomart identicon for arbitrary data.\n\n'
'Generate OpenSSH style randomart identicon for arbitrary data.\n\n'
'If TEXT or --file is not supplied, data is read from STDIN.'
)
)

25
setup.py Normal file
View File

@ -0,0 +1,25 @@
from setuptools import setup
setup(
name='identicon',
version='1.0.0',
author='Kristóf Tóth',
author_email='mrtoth@strongds.hu',
description='CLI tool and library to generate OpenSSH style randomart identicons for arbitrary data.',
url='https://git.strongds.hu/mrtoth/identicon',
packages=['identicon'],
entry_points={
'console_scripts': ['identicon=identicon.cli:main'],
},
install_requires=[
'blake3',
'click',
],
extras_require={
'dev': [
'pytest',
'pylint',
'rope',
],
},
)