Title: [265771] trunk/Tools
Revision
265771
Author
[email protected]
Date
2020-08-17 13:53:20 -0700 (Mon, 17 Aug 2020)

Log Message

[resultsdbpy]: Depend on webkitcorepy
https://bugs.webkit.org/show_bug.cgi?id=215573
<rdar://problem/67250272>

Reviewed by Dewei Zhu.

* Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py:
(_maybe_add_webkitcorepy_path): Attempt to add. webkitcorepy to the. Python path.
* Scripts/libraries/resultsdbpy/setup.py: Add webkitcorepy, remove webkitcorepy's dependencies.
* Scripts/libraries/webkitcorepy/setup.py: Add six as a dependency.
* Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Include. package name, bump version.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (265770 => 265771)


--- trunk/Tools/ChangeLog	2020-08-17 20:34:08 UTC (rev 265770)
+++ trunk/Tools/ChangeLog	2020-08-17 20:53:20 UTC (rev 265771)
@@ -1,5 +1,19 @@
 2020-08-17  Jonathan Bedard  <[email protected]>
 
+        [resultsdbpy]: Depend on webkitcorepy
+        https://bugs.webkit.org/show_bug.cgi?id=215573
+        <rdar://problem/67250272>
+
+        Reviewed by Dewei Zhu.
+
+        * Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py:
+        (_maybe_add_webkitcorepy_path): Attempt to add. webkitcorepy to the. Python path.
+        * Scripts/libraries/resultsdbpy/setup.py: Add webkitcorepy, remove webkitcorepy's dependencies.
+        * Scripts/libraries/webkitcorepy/setup.py: Add six as a dependency.
+        * Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Include. package name, bump version.
+
+2020-08-17  Jonathan Bedard  <[email protected]>
+
         [webkitcorepy] Add OutputCapture to webkitcorepy
         https://bugs.webkit.org/show_bug.cgi?id=215380
         <rdar://problem/66846384>

Modified: trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py (265770 => 265771)


--- trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2020-08-17 20:34:08 UTC (rev 265770)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/resultsdbpy/__init__.py	2020-08-17 20:53:20 UTC (rev 265771)
@@ -20,4 +20,29 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import os
+import sys
+
+
+def _maybe_add_webkitcorepy_path():
+    # Hopefully we're beside webkitcorepy, otherwise webkitcorepy will need to be installed.
+    libraries_path = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
+    webkitcorepy_path = os.path.join(libraries_path, 'webkitcorepy')
+    if os.path.isdir(webkitcorepy_path) and os.path.isdir(os.path.join(webkitcorepy_path, 'webkitcorepy')) and webkitcorepy_path not in sys.path:
+        sys.path.insert(0, webkitcorepy_path)
+
+
+_maybe_add_webkitcorepy_path()
+
+try:
+    from webkitcorepy.version import Version
+except ImportError:
+    raise ImportError(
+        "'webkitcorepy' could not be found on your Python path.\n" +
+        "You are not running from a WebKit checkout.\n" +
+        "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
+    )
+
+version = Version(1, 0, 0)
+
 name = 'resultsdbpy'

Modified: trunk/Tools/Scripts/libraries/resultsdbpy/setup.py (265770 => 265771)


--- trunk/Tools/Scripts/libraries/resultsdbpy/setup.py	2020-08-17 20:34:08 UTC (rev 265770)
+++ trunk/Tools/Scripts/libraries/resultsdbpy/setup.py	2020-08-17 20:53:20 UTC (rev 265771)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019 Apple Inc. All rights reserved.
+# Copyright (C) 2019-2020 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -20,6 +20,7 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+from resultsdbpy import version
 from setuptools import setup
 
 
@@ -30,7 +31,7 @@
 
 setup(
     name='resultsdbpy',
-    version='0.9.0',
+    version=str(version),
     description='Library for visualizing, processing and storing test results.',
     long_description=readme(),
     classifiers=[
@@ -57,12 +58,10 @@
         'Flask-Cors',
         'gunicorn',
         'lupa',
-        'mock',
         'redis',
         'xmltodict',
-        'requests',
         'selenium',
-        'six',
+        'webkitcorepy',
     ],
     include_package_data=True,
     zip_safe=False,

Modified: trunk/Tools/Scripts/libraries/webkitcorepy/setup.py (265770 => 265771)


--- trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2020-08-17 20:34:08 UTC (rev 265770)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/setup.py	2020-08-17 20:53:20 UTC (rev 265771)
@@ -52,6 +52,7 @@
     install_requires=[
         'mock',
         'requests',
+        'six',
     ],
     include_package_data=True,
     zip_safe=False,

Modified: trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py (265770 => 265771)


--- trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2020-08-17 20:34:08 UTC (rev 265770)
+++ trunk/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py	2020-08-17 20:53:20 UTC (rev 265771)
@@ -33,7 +33,7 @@
 from webkitcorepy.string_utils import BytesIO, StringIO, UnicodeIO, unicode
 from webkitcorepy.output_capture import LoggerCapture, OutputCapture, OutputDuplicate
 
-version = Version(0, 2, 5)
+version = Version(0, 2, 6)
 
 from webkitcorepy.autoinstall import Package, AutoInstall
 if sys.version_info > (3, 0):
@@ -54,3 +54,5 @@
 AutoInstall.register(Package('socks', Version(1, 7, 1), pypi_name='PySocks'))
 AutoInstall.register(Package('six', Version(1, 15, 0)))
 AutoInstall.register(Package('urllib3', Version(1, 25, 10)))
+
+name = 'webkitcorepy'
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to