[PATCH 4/6] setup: Collect top-level code together

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Move most of the top-level code together, with the classes and functions
above, for easier reading.

The srcdir is left where it is for now.

Signed-off-by: Simon Glass <sjg@xxxxxxxxxxxx>
---

 setup.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/setup.py b/setup.py
index eb0963c..be3cf90 100755
--- a/setup.py
+++ b/setup.py
@@ -47,6 +47,15 @@ def get_top_builddir():
         return sys.argv.pop(index)
     return srcdir
 
+
+class BuildPy(_build_py):
+    """Small class to run the build_ext command"""
+    def run(self):
+        self.run_command("build_ext")
+        return super().run()
+
+
+version, long_description = scan_for_info(srcdir)
 top_builddir = get_top_builddir()
 
 libfdt_module = Extension(
@@ -60,14 +69,6 @@ libfdt_module = Extension(
 )
 
 
-class BuildPy(_build_py):
-    """Small class to run the build_ext command"""
-    def run(self):
-        self.run_command("build_ext")
-        return super().run()
-
-version, long_description = scan_for_info(srcdir)
-
 setup(
     name='libfdt',
     version=version,
-- 
2.34.1





[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux