setup.py 1.37 KiB
"""
wile_coyote
"""
from ensurepip import version
import os
from glob import glob
from shutil import rmtree
from setuptools import setup, find_packages
version = __import__("version").__version__
description = """ this tool is used in conjunction with certbot to leverage
the lifecycle of the certificates on the key store"""
requirements = [
x.strip() for x in
open('requirements.txt').readlines() if not x.startswith('#') and x != '\n']
rmtree('dist', ignore_errors=True)
rmtree('deb_dist', ignore_errors=True)
def read(fname):
""" get file name """
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="wile_coyote",
version=version,
description="A tool to manage certificates on Vault, Redis, Consul",
long_description=description,
url="https://gitlab.geant.org/devops/wile_coyote",
install_requires=requirements,
author="Massimiliano Adamo",
author_email="massimiliano.adamo@geant.org",
license='GPLv3',
license_files=('LICENSE.md',),
scripts=glob('bin/*'),
packages=find_packages(),
zip_safe=False
)
print('removing stale items')
for stale_files in glob('*/*.pyc') + glob('wile_coyote-*tar.gz'):
try:
os.remove(stale_files)
except PermissionError:
pass
for pycache in glob('*/__pycache__') + ['build', 'wile_coyote.egg-info']:
rmtree(pycache, ignore_errors=True)