forked from ansemjo/randomart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
44 lines (37 loc) · 1.22 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
# Copyright (c) 2019 Anton Semjonov
# Licensed under the MIT License
# metadata
meta = {
"name": "randomart",
"author": "Anton Semjonov",
"author_email": "[email protected]",
"url": "https://github.com/ansemjo/randomart",
"license": "MIT",
"description": "Generate ASCII randomart by hashing input with BLAKE2b and using an adapted drunken bishop alogirthm.",
"keywords": "randomart drunken bishop openssh blake2b blake2 hash comparison",
}
# package requirements
SCRIPTS = ["randomart.py"]
PYTHON = ">3.5"
REQUIREMENTS = ["numpy"]
# imports
from os import environ
from pathlib import Path as path
from subprocess import check_output as cmd
from setuptools import setup, find_packages
# read current version
environ["REVISION_SEPERATOR"] = "-post"
meta["version"] = cmd(["/bin/sh", "version.sh", "version"]).strip().decode()
# embed package metadata
with (path("random_art") / "__metadata__.py").open("w") as v:
v.write("metadata = %s" % str(meta))
setup(
**meta,
long_description=path("./README.md").read_text(),
long_description_content_type="text/markdown",
scripts=SCRIPTS,
packages=find_packages(),
python_requires=PYTHON,
install_requires=REQUIREMENTS,
)