[pygobject] setup.py: Fix the distcheck command on Windows



commit de2ff6e883015741527638ab5cece47a97ef2856
Author: Christoph Reiter <creiter src gnome org>
Date:   Sat Dec 9 15:59:26 2017 +0100

    setup.py: Fix the distcheck command on Windows
    
    The distutils install command complains if the passed root/record paths
    aren't absolute on Windows.
    Also make use of os.path.join() while at it.

 setup.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/setup.py b/setup.py
index ce75dd5..c8b9ca6 100644
--- a/setup.py
+++ b/setup.py
@@ -180,7 +180,8 @@ class distcheck(du_sdist):
         # make sure the tarball builds
         assert self.get_archive_files()
 
-        distcheck_dir = os.path.join(self.dist_dir, "distcheck")
+        distcheck_dir = os.path.abspath(
+            os.path.join(self.dist_dir, "distcheck"))
         if os.path.exists(distcheck_dir):
             dir_util.remove_tree(distcheck_dir)
         self.mkpath(distcheck_dir)
@@ -198,7 +199,11 @@ class distcheck(du_sdist):
         try:
             self.spawn([sys.executable, "setup.py", "build"])
             self.spawn([sys.executable, "setup.py", "install",
-                        "--root", "../prefix", "--record", "../log.txt"])
+                        "--root",
+                        os.path.join(distcheck_dir, "prefix"),
+                        "--record",
+                        os.path.join(distcheck_dir, "log.txt"),
+                        ])
         finally:
             os.chdir(old_pwd)
 


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