mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-04 12:21:57 +03:00
setup: styling: Fix method/function/class spacing
2 newlines in between classes/functions, 1 newline in between methods. Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
10
setup.py
10
setup.py
@ -40,12 +40,14 @@ def check_pkgcfg():
|
||||
|
||||
check_pkgcfg()
|
||||
|
||||
|
||||
def check_minimum_libvirt_version():
|
||||
subprocess.check_call(["pkg-config",
|
||||
"--print-errors",
|
||||
"--atleast-version=%s" % MIN_LIBVIRT,
|
||||
"libvirt"])
|
||||
|
||||
|
||||
def have_libvirt_lxc():
|
||||
proc = subprocess.run(["pkg-config",
|
||||
"--atleast-version=%s" % MIN_LIBVIRT_LXC,
|
||||
@ -54,6 +56,7 @@ def have_libvirt_lxc():
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def get_pkgconfig_data(args, mod, required=True):
|
||||
"""Run pkg-config to and return content associated with it"""
|
||||
f = os.popen("%s %s %s" % ("pkg-config", " ".join(args), mod))
|
||||
@ -84,6 +87,7 @@ def get_api_xml_files():
|
||||
|
||||
return (libvirt_api, libvirt_qemu_api, libvirt_lxc_api)
|
||||
|
||||
|
||||
def get_module_lists():
|
||||
"""
|
||||
Determine which modules we are actually building, and all their
|
||||
@ -147,6 +151,7 @@ class my_build_ext(build_ext):
|
||||
|
||||
build_ext.run(self)
|
||||
|
||||
|
||||
class my_build_py(build_py):
|
||||
|
||||
def run(self):
|
||||
@ -161,6 +166,7 @@ class my_build_py(build_py):
|
||||
|
||||
build_py.run(self)
|
||||
|
||||
|
||||
class my_sdist(sdist):
|
||||
user_options = sdist.user_options
|
||||
|
||||
@ -201,7 +207,6 @@ class my_sdist(sdist):
|
||||
f1.close()
|
||||
f2.close()
|
||||
|
||||
|
||||
def gen_changelog(self):
|
||||
f1 = os.popen("git log '--pretty=format:%H:%ct %an <%ae>%n%n%s%n%b%n'")
|
||||
f2 = open("ChangeLog", 'w')
|
||||
@ -219,7 +224,6 @@ class my_sdist(sdist):
|
||||
f1.close()
|
||||
f2.close()
|
||||
|
||||
|
||||
def run(self):
|
||||
if not os.path.exists("build"):
|
||||
os.mkdir("build")
|
||||
@ -242,6 +246,7 @@ class my_sdist(sdist):
|
||||
else:
|
||||
sdist.run(self)
|
||||
|
||||
|
||||
class my_test(Command):
|
||||
user_options = [
|
||||
('build-base=', 'b',
|
||||
@ -313,6 +318,7 @@ class my_test(Command):
|
||||
pytest = self.find_pytest_path()
|
||||
subprocess.check_call([pytest, "tests"])
|
||||
|
||||
|
||||
class my_clean(Command):
|
||||
user_options = [
|
||||
('all', None, 'unused, compatibility with distutils')
|
||||
|
Reference in New Issue
Block a user