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 wile_coyote
""" """
from ensurepip import version from ensurepip import version
import os import os
from glob import glob from glob import glob
...@@ -11,16 +12,18 @@ version = __import__("wile_coyote").__version__ ...@@ -11,16 +12,18 @@ version = __import__("wile_coyote").__version__
DESC = """ this tool is used in conjunction with certbot to leverage DESC = """ this tool is used in conjunction with certbot to leverage
the lifecycle of the certificates on the key store""" the lifecycle of the certificates on the key store"""
requirements = [ requirements = [
x.strip() for x in x.strip()
open("requirements.txt", encoding='utf-8').readlines() if not x.startswith('#') and x != '\n'] for x in open("requirements.txt", encoding="utf-8").readlines()
if not x.startswith("#") and x != "\n"
]
rmtree('dist', ignore_errors=True) rmtree("dist", ignore_errors=True)
rmtree('deb_dist', ignore_errors=True) rmtree("deb_dist", ignore_errors=True)
def read(fname): def read(fname):
""" get file name """ """get file name"""
return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read() return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup( setup(
...@@ -32,19 +35,19 @@ setup( ...@@ -32,19 +35,19 @@ setup(
install_requires=requirements, install_requires=requirements,
author="Massimiliano Adamo", author="Massimiliano Adamo",
author_email="massimiliano.adamo@geant.org", author_email="massimiliano.adamo@geant.org",
license='GPLv3', license="GPLv3",
license_files=('LICENSE.md',), license_files=("LICENSE.md",),
scripts=glob('wile_coyote/bin/*'), scripts=glob("wile_coyote/bin/*"),
packages=find_packages(), packages=find_packages(),
zip_safe=False zip_safe=False,
) )
print('removing stale items') print("removing stale items")
for stale_files in glob('*/*.pyc') + glob('wile_coyote-*tar.gz'): for stale_files in glob("*/*.pyc") + glob("wile_coyote-*tar.gz"):
try: try:
os.remove(stale_files) os.remove(stale_files)
except PermissionError: except PermissionError:
pass 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) rmtree(pycache, ignore_errors=True)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment