Title: [286633] trunk/Tools
Revision
286633
Author
[email protected]
Date
2021-12-07 17:32:10 -0800 (Tue, 07 Dec 2021)

Log Message

[webkitcorepy] Fail to install python module when a working directory is not on C drive on Windows
https://bugs.webkit.org/show_bug.cgi?id=233936

Reviewed by Jonathan Bedard.

On Windows, autoinstall.py installs python modules to C drive even if
your working directory is on other drive (e.g. D drive). To install
python modules correctly on Windows, a drive letter where your working
directory exists needs to be given to "--root" option of "setup.py"
in autoinstall.py.

* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Added root_location to detect a right drive letter to isntall modules on Windows.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (286632 => 286633)


--- trunk/Tools/ChangeLog	2021-12-08 00:55:11 UTC (rev 286632)
+++ trunk/Tools/ChangeLog	2021-12-08 01:32:10 UTC (rev 286633)
@@ -1,3 +1,19 @@
+2021-12-07  Yousuke Kimoto  <[email protected]>
+
+        [webkitcorepy] Fail to install python module when a working directory is not on C drive on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=233936
+
+        Reviewed by Jonathan Bedard.
+
+        On Windows, autoinstall.py installs python modules to C drive even if
+        your working directory is on other drive (e.g. D drive). To install
+        python modules correctly on Windows, a drive letter where your working
+        directory exists needs to be given to "--root" option of "setup.py"
+        in autoinstall.py.
+
+        * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
+        (Package.install): Added root_location to detect a right drive letter to isntall modules on Windows.
+
 2021-12-07  Devin Rousso  <[email protected]>
 
         Add helper methods to `WebCore::FontShadow` for serializing to CSS and converting to `NSShadow`

Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py (286632 => 286633)


--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py	2021-12-08 00:55:11 UTC (rev 286632)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py	2021-12-08 01:32:10 UTC (rev 286633)
@@ -305,6 +305,8 @@
                 if self.slow_install:
                     AutoInstall.log('{} is known to be slow to install'.format(archive))
 
+                root_location = "/" if not sys.platform.startswith('win') else "{}/".format(os.path.splitdrive(os.path.abspath(install_location))[0])
+
                 log_location = os.path.join(temp_location, 'log.txt')
                 try:
                     with open(log_location, 'w') as setup_log:
@@ -314,7 +316,7 @@
                                 os.path.join(candidate, 'setup.py'),
                                 'install',
                                 '--home={}'.format(install_location),
-                                '--root=/',
+                                '--root={}'.format(root_location),
                                 '--prefix=',
                                 '--install-lib={}'.format(install_location),
                                 '--install-scripts={}'.format(os.path.join(install_location, 'bin')),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to