Skip to content
Snippets Groups Projects
Unverified Commit 7e727b8d authored by Max Adamo's avatar Max Adamo
Browse files

fix: improve code formatting and consistency in setup.py

parent 436dc042
No related branches found
No related tags found
No related merge requests found
"""
wile_coyote
"""
from ensurepip import version
import os
from glob import glob
......@@ -11,16 +12,18 @@ version = __import__("wile_coyote").__version__
DESC = """ 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", encoding='utf-8').readlines() if not x.startswith('#') and x != '\n']
x.strip()
for x in open("requirements.txt", encoding="utf-8").readlines()
if not x.startswith("#") and x != "\n"
]
rmtree('dist', ignore_errors=True)
rmtree('deb_dist', ignore_errors=True)
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), encoding='utf-8').read()
"""get file name"""
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
......@@ -32,19 +35,19 @@ setup(
install_requires=requirements,
author="Massimiliano Adamo",
author_email="massimiliano.adamo@geant.org",
license='GPLv3',
license_files=('LICENSE.md',),
scripts=glob('wile_coyote/bin/*'),
license="GPLv3",
license_files=("LICENSE.md",),
scripts=glob("wile_coyote/bin/*"),
packages=find_packages(),
zip_safe=False
zip_safe=False,
)
print('removing stale items')
for stale_files in glob('*/*.pyc') + glob('wile_coyote-*tar.gz'):
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']:
for pycache in glob("*/__pycache__") + ["build", "wile_coyote.egg-info"]:
rmtree(pycache, ignore_errors=True)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment