[elbe-devel] [PATCH 08/19] setup.py: make flake8 compatible
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Tue Mar 19 08:47:37 CET 2024
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
setup.py | 45 ++++++++++++++++++++++-----------------------
1 file changed, 22 insertions(+), 23 deletions(-)
diff --git a/setup.py b/setup.py
index 5c24db852799..25c43d4e5e19 100644
--- a/setup.py
+++ b/setup.py
@@ -4,18 +4,17 @@
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2013-2014, 2017-2018 Linutronix GmbH
-import subprocess
import os
-import glob
+import subprocess
+
+from elbepack.version import elbe_version
from setuptools import setup
from setuptools.command.install import install
-from elbepack.version import elbe_version
-
def abspath(path):
- """A method to determine absolute path
+ """ method to determine absolute path
for a relative path inside project's directory."""
return os.path.abspath(
@@ -28,15 +27,15 @@ class my_install(install):
def run(self):
install.run(self)
if self.root:
- envvars = dict({"prefix": self.prefix,
- "DESTDIR": self.root},
+ envvars = dict({'prefix': self.prefix,
+ 'DESTDIR': self.root},
**dict(os.environ))
else:
- envvars = dict({"prefix": self.prefix}, **dict(os.environ))
+ envvars = dict({'prefix': self.prefix}, **dict(os.environ))
- docs_dir = abspath("./docs/")
+ docs_dir = abspath('./docs/')
- output = subprocess.Popen("make install",
+ output = subprocess.Popen('make install',
shell=True,
stdout=subprocess.PIPE,
cwd=docs_dir,
@@ -55,18 +54,18 @@ setup(name='elbe',
'elbepack.daemons',
'elbepack.daemons.soap',
],
- package_data={'elbepack': ["makofiles/*.mako",
- "init/*.mako",
- "init/*.xml",
- "default-preseed.xml",
- "xsdtoasciidoc.mako"],
- 'schema': ["dbsfed.xsd", "xml.xsd"]},
+ package_data={'elbepack': ['makofiles/*.mako',
+ 'init/*.mako',
+ 'init/*.xml',
+ 'default-preseed.xml',
+ 'xsdtoasciidoc.mako'],
+ 'schema': ['dbsfed.xsd', 'xml.xsd']},
scripts=['elbe'],
- cmdclass={"install": my_install},
- install_requires=["lxml",
- "Mako",
- "passlib",
- "pycdlib",
- "python-debian",
- "suds-community"]
+ cmdclass={'install': my_install},
+ install_requires=['lxml',
+ 'Mako',
+ 'passlib',
+ 'pycdlib',
+ 'python-debian',
+ 'suds-community']
)
--
2.44.0
More information about the elbe-devel
mailing list