Title: [274875] trunk/Tools
Revision
274875
Author
[email protected]
Date
2021-03-23 09:23:18 -0700 (Tue, 23 Mar 2021)

Log Message

[webkitcorepy] Print output of setup.py when install fails
https://bugs.webkit.org/show_bug.cgi?id=223589
<rdar://problem/75700606>

Reviewed by Aakash Jain.

* Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Print stdout and stderr of setup.py when install fails.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (274874 => 274875)


--- trunk/Tools/ChangeLog	2021-03-23 16:21:48 UTC (rev 274874)
+++ trunk/Tools/ChangeLog	2021-03-23 16:23:18 UTC (rev 274875)
@@ -1,3 +1,16 @@
+2021-03-23  Jonathan Bedard  <[email protected]>
+
+        [webkitcorepy] Print output of setup.py when install fails
+        https://bugs.webkit.org/show_bug.cgi?id=223589
+        <rdar://problem/75700606>
+
+        Reviewed by Aakash Jain.
+
+        * Scripts/libraries/webkitcorepy/setup.py: Bump version.
+        * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
+        * Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
+        (Package.install): Print stdout and stderr of setup.py when install fails.
+
 2021-03-22  Cameron McCormack  <[email protected]>
 
         Fix ordering of my email addresses in contributors.json

Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (274874 => 274875)


--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-03-23 16:21:48 UTC (rev 274874)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2021-03-23 16:23:18 UTC (rev 274875)
@@ -30,7 +30,7 @@
 
 setup(
     name='webkitcorepy',
-    version='0.5.5',
+    version='0.5.6',
     description='Library containing various Python support classes and functions.',
     long_description=readme(),
     classifiers=[

Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (274874 => 274875)


--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-03-23 16:21:48 UTC (rev 274874)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2021-03-23 16:23:18 UTC (rev 274875)
@@ -37,7 +37,7 @@
 from webkitcorepy.task_pool import TaskPool
 from webkitcorepy.credentials import credentials
 
-version = Version(0, 5, 5)
+version = Version(0, 5, 6)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):

Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py (274874 => 274875)


--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py	2021-03-23 16:21:48 UTC (rev 274874)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py	2021-03-23 16:23:18 UTC (rev 274875)
@@ -268,38 +268,46 @@
                 if self.slow_install:
                     AutoInstall.log('{} is known to be slow to install'.format(archive))
 
-                with open(os.devnull, 'w') as devnull:
-                    subprocess.check_call(
-                        [
-                            sys.executable,
-                            os.path.join(candidate, 'setup.py'),
-                            'install',
-                            '--home={}'.format(install_location),
-                            '--root=/',
-                            '--prefix=',
-                            '--install-lib={}'.format(install_location),
-                            '--install-scripts={}'.format(os.path.join(install_location, 'bin')),
-                            '--install-data="" 'data')),
-                            '--install-headers={}'.format(os.path.join(install_location, 'headers')),
-                        ],
-                        cwd=candidate,
-                        env=dict(
-                            HTTP_PROXY=os.environ.get('HTTP_PROXY', ''),
-                            HTTPS_PROXY=os.environ.get('HTTPS_PROXY', ''),
-                            PATH=os.environ.get('PATH', ''),
-                            PATHEXT=os.environ.get('PATHEXT', ''),
-                            PYTHONPATH=install_location,
-                            SYSTEMROOT=os.environ.get('SYSTEMROOT', ''),
-                        ) if not sys.platform.startswith('win')
-                        else dict(
-                            # Windows setuptools needs environment from vcvars
-                            os.environ,
-                            PYTHONPATH=install_location,
-                        ),
-                        stdout=devnull,
-                        stderr=devnull,
-                    )
+                log_location = os.path.join(temp_location, 'log.txt')
+                try:
+                    with open(log_location, 'w') as setup_log:
+                        subprocess.check_call(
+                            [
+                                sys.executable,
+                                os.path.join(candidate, 'setup.py'),
+                                'install',
+                                '--home={}'.format(install_location),
+                                '--root=/',
+                                '--prefix=',
+                                '--install-lib={}'.format(install_location),
+                                '--install-scripts={}'.format(os.path.join(install_location, 'bin')),
+                                '--install-data="" 'data')),
+                                '--install-headers={}'.format(os.path.join(install_location, 'headers')),
+                            ],
+                            cwd=candidate,
+                            env=dict(
+                                HTTP_PROXY=os.environ.get('HTTP_PROXY', ''),
+                                HTTPS_PROXY=os.environ.get('HTTPS_PROXY', ''),
+                                PATH=os.environ.get('PATH', ''),
+                                PATHEXT=os.environ.get('PATHEXT', ''),
+                                PYTHONPATH=install_location,
+                                SYSTEMROOT=os.environ.get('SYSTEMROOT', ''),
+                            ) if not sys.platform.startswith('win')
+                            else dict(
+                                # Windows setuptools needs environment from vcvars
+                                os.environ,
+                                PYTHONPATH=install_location,
+                            ),
+                            stdout=setup_log,
+                            stderr=setup_log,
+                        )
 
+                except subprocess.CalledProcessError:
+                    with open(log_location, 'r') as setup_log:
+                        for line in setup_log.readlines():
+                            sys.stderr.write(line)
+                    raise
+
                 # If we have a package inside another package (like zope.interface), the top-level package needs an __init__.py
                 location = os.path.join(AutoInstall.directory, self.name.split('.')[0])
                 if os.path.isdir(location) and '__init__.py' not in os.listdir(location):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to