[arvados] updated: 2.7.0-6212-g38153b3e5c

git repository hosting git at public.arvados.org
Tue Mar 19 03:09:01 UTC 2024


Summary of changes:
 build/run-tests.sh                          |  9 +++++----
 sdk/cwl/arvados_version.py                  | 28 ++++++++++++----------------
 sdk/python/arvados_version.py               | 28 ++++++++++++----------------
 services/dockercleaner/arvados_version.py   | 28 ++++++++++++----------------
 services/fuse/arvados_version.py            | 28 ++++++++++++----------------
 tools/crunchstat-summary/arvados_version.py | 28 ++++++++++++----------------
 tools/user-activity/arvados_version.py      | 28 ++++++++++++----------------
 7 files changed, 77 insertions(+), 100 deletions(-)

       via  38153b3e5cee3e41e8cf7e1a0d26bd5e8ab63c2d (commit)
       via  fdf9544967bb898822ac1e1625793397a0507b86 (commit)
       via  b4d0743c20ab624296319190bfac93b390e767cc (commit)
      from  afdc2e02935d537315609a86e0c5d96ce57b8b49 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 38153b3e5cee3e41e8cf7e1a0d26bd5e8ab63c2d
Author: Brett Smith <brett.smith at curii.com>
Date:   Mon Mar 18 23:07:11 2024 -0400

    21601: Remove PySDK from `install deps`
    
    It's already installed by `install env`. 🤷
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/build/run-tests.sh b/build/run-tests.sh
index 1dbaa72c1b..6e0a51eb45 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -1059,7 +1059,6 @@ install_deps() {
     do_install env
     do_install cmd/arvados-server go
     do_install sdk/cli
-    do_install sdk/python pip "${VENV3DIR}/bin/"
     do_install tools/crunchstat-summary pip "${VENV3DIR}/bin/"
     do_install sdk/ruby-google-api-client
     do_install sdk/ruby

commit fdf9544967bb898822ac1e1625793397a0507b86
Author: Brett Smith <brett.smith at curii.com>
Date:   Mon Mar 18 23:04:59 2024 -0400

    21601: Install wheel in run-tests.sh VENV3DIR
    
    We do this basically everywhere else in our build infrastructure, so
    doing it here helps avoid discrepancies between those environments.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/build/run-tests.sh b/build/run-tests.sh
index fa0abbc07c..1dbaa72c1b 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -636,13 +636,15 @@ install_env() {
     setup_virtualenv "$VENV3DIR"
     . "$VENV3DIR/bin/activate"
 
+    # wheel modernizes the venv (as of early 2024) and makes it more closely
+    # match our package build environment.
     # PyYAML is a test requirement used by run_test_server.py and needed for
     # other, non-Python tests.
     # pdoc is needed to build PySDK documentation.
     # We run `setup.py build` first to generate _version.py.
-    env -C "$WORKSPACE/sdk/python" python3 setup.py build \
-        && python3 -m pip install "$WORKSPACE/sdk/python" \
-        && python3 -m pip install PyYAML pdoc \
+    pip install PyYAML pdoc wheel \
+        && env -C "$WORKSPACE/sdk/python" python3 setup.py build \
+        && pip install "$WORKSPACE/sdk/python" \
         || fatal "installing Python SDK and related dependencies failed"
 }
 

commit b4d0743c20ab624296319190bfac93b390e767cc
Author: Brett Smith <brett.smith at curii.com>
Date:   Mon Mar 18 22:53:18 2024 -0400

    21601: Remove packaging dependency from arvados_version
    
    Older versions of setuptools don't bring it along, and trying to declare
    the dependency is difficult since it's indirectly a dependency of
    setup.py itself. Fall back to a regular expression instead for ease of
    deployment.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/cwl/arvados_version.py b/sdk/cwl/arvados_version.py
index 5928c526fc..c0933398e0 100644
--- a/sdk/cwl/arvados_version.py
+++ b/sdk/cwl/arvados_version.py
@@ -12,12 +12,11 @@
 #    it reads _version.py and generates dependencies from it.
 
 import os
+import re
 import runpy
 import subprocess
 import sys
 
-import packaging.version
-
 from pathlib import Path
 
 # These maps explain the relationships between different Python modules in
@@ -129,24 +128,21 @@ def iter_dependencies(version=None):
     if version is None:
         version = get_version()
     if ENV_VERSION or (REPO_PATH is None):
-        parsed_ver = packaging.version.parse(version)
-        if parsed_ver.is_devrelease:
-            # A packaged development release should be installed with other
-            # development packages built from the same source, but those
-            # dependencies may have earlier "dev" versions (read: less recent
-            # Git commit timestamps). This compatible version dependency
-            # expresses that as closely as possible. Allowing versions
-            # compatible with .dev0 allows any development release.
-            ver_dep = f'~={parsed_ver.base_version}.dev0'
-        else:
-            ver_dep = f'=={version}'
-        dep_fmt = f'{{}}{ver_dep}'.format
+        # A packaged development release should be installed with other
+        # development packages built from the same source, but those
+        # dependencies may have earlier "dev" versions (read: less recent
+        # Git commit timestamps). This compatible version dependency
+        # expresses that as closely as possible. Allowing versions
+        # compatible with .dev0 allows any development release.
+        # Regular expression borrowed partially from
+        # <https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers-regex>
+        dep_ver, match_count = re.subn(r'\.dev(0|[1-9][0-9]*)$', '.dev0', version, 1)
+        dep_op = '~=' if match_count else '=='
+        dep_fmt = f'{{}}{dep_op}{dep_ver}'.format
     else:
         def dep_fmt(pkg):
             pkg_path = REPO_PATH / PACKAGE_SRCPATH_MAP[pkg]
             return f'{pkg} @ {pkg_path.as_uri()}'
-    # A dependency of arvados_version.py itself.
-    yield 'packaging>=21.0'
     for dep_pkg in PACKAGE_DEPENDENCY_MAP.get(PACKAGE_NAME, ()):
         yield dep_fmt(dep_pkg)
 
diff --git a/sdk/python/arvados_version.py b/sdk/python/arvados_version.py
index 5928c526fc..c0933398e0 100644
--- a/sdk/python/arvados_version.py
+++ b/sdk/python/arvados_version.py
@@ -12,12 +12,11 @@
 #    it reads _version.py and generates dependencies from it.
 
 import os
+import re
 import runpy
 import subprocess
 import sys
 
-import packaging.version
-
 from pathlib import Path
 
 # These maps explain the relationships between different Python modules in
@@ -129,24 +128,21 @@ def iter_dependencies(version=None):
     if version is None:
         version = get_version()
     if ENV_VERSION or (REPO_PATH is None):
-        parsed_ver = packaging.version.parse(version)
-        if parsed_ver.is_devrelease:
-            # A packaged development release should be installed with other
-            # development packages built from the same source, but those
-            # dependencies may have earlier "dev" versions (read: less recent
-            # Git commit timestamps). This compatible version dependency
-            # expresses that as closely as possible. Allowing versions
-            # compatible with .dev0 allows any development release.
-            ver_dep = f'~={parsed_ver.base_version}.dev0'
-        else:
-            ver_dep = f'=={version}'
-        dep_fmt = f'{{}}{ver_dep}'.format
+        # A packaged development release should be installed with other
+        # development packages built from the same source, but those
+        # dependencies may have earlier "dev" versions (read: less recent
+        # Git commit timestamps). This compatible version dependency
+        # expresses that as closely as possible. Allowing versions
+        # compatible with .dev0 allows any development release.
+        # Regular expression borrowed partially from
+        # <https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers-regex>
+        dep_ver, match_count = re.subn(r'\.dev(0|[1-9][0-9]*)$', '.dev0', version, 1)
+        dep_op = '~=' if match_count else '=='
+        dep_fmt = f'{{}}{dep_op}{dep_ver}'.format
     else:
         def dep_fmt(pkg):
             pkg_path = REPO_PATH / PACKAGE_SRCPATH_MAP[pkg]
             return f'{pkg} @ {pkg_path.as_uri()}'
-    # A dependency of arvados_version.py itself.
-    yield 'packaging>=21.0'
     for dep_pkg in PACKAGE_DEPENDENCY_MAP.get(PACKAGE_NAME, ()):
         yield dep_fmt(dep_pkg)
 
diff --git a/services/dockercleaner/arvados_version.py b/services/dockercleaner/arvados_version.py
index 5928c526fc..c0933398e0 100644
--- a/services/dockercleaner/arvados_version.py
+++ b/services/dockercleaner/arvados_version.py
@@ -12,12 +12,11 @@
 #    it reads _version.py and generates dependencies from it.
 
 import os
+import re
 import runpy
 import subprocess
 import sys
 
-import packaging.version
-
 from pathlib import Path
 
 # These maps explain the relationships between different Python modules in
@@ -129,24 +128,21 @@ def iter_dependencies(version=None):
     if version is None:
         version = get_version()
     if ENV_VERSION or (REPO_PATH is None):
-        parsed_ver = packaging.version.parse(version)
-        if parsed_ver.is_devrelease:
-            # A packaged development release should be installed with other
-            # development packages built from the same source, but those
-            # dependencies may have earlier "dev" versions (read: less recent
-            # Git commit timestamps). This compatible version dependency
-            # expresses that as closely as possible. Allowing versions
-            # compatible with .dev0 allows any development release.
-            ver_dep = f'~={parsed_ver.base_version}.dev0'
-        else:
-            ver_dep = f'=={version}'
-        dep_fmt = f'{{}}{ver_dep}'.format
+        # A packaged development release should be installed with other
+        # development packages built from the same source, but those
+        # dependencies may have earlier "dev" versions (read: less recent
+        # Git commit timestamps). This compatible version dependency
+        # expresses that as closely as possible. Allowing versions
+        # compatible with .dev0 allows any development release.
+        # Regular expression borrowed partially from
+        # <https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers-regex>
+        dep_ver, match_count = re.subn(r'\.dev(0|[1-9][0-9]*)$', '.dev0', version, 1)
+        dep_op = '~=' if match_count else '=='
+        dep_fmt = f'{{}}{dep_op}{dep_ver}'.format
     else:
         def dep_fmt(pkg):
             pkg_path = REPO_PATH / PACKAGE_SRCPATH_MAP[pkg]
             return f'{pkg} @ {pkg_path.as_uri()}'
-    # A dependency of arvados_version.py itself.
-    yield 'packaging>=21.0'
     for dep_pkg in PACKAGE_DEPENDENCY_MAP.get(PACKAGE_NAME, ()):
         yield dep_fmt(dep_pkg)
 
diff --git a/services/fuse/arvados_version.py b/services/fuse/arvados_version.py
index 5928c526fc..c0933398e0 100644
--- a/services/fuse/arvados_version.py
+++ b/services/fuse/arvados_version.py
@@ -12,12 +12,11 @@
 #    it reads _version.py and generates dependencies from it.
 
 import os
+import re
 import runpy
 import subprocess
 import sys
 
-import packaging.version
-
 from pathlib import Path
 
 # These maps explain the relationships between different Python modules in
@@ -129,24 +128,21 @@ def iter_dependencies(version=None):
     if version is None:
         version = get_version()
     if ENV_VERSION or (REPO_PATH is None):
-        parsed_ver = packaging.version.parse(version)
-        if parsed_ver.is_devrelease:
-            # A packaged development release should be installed with other
-            # development packages built from the same source, but those
-            # dependencies may have earlier "dev" versions (read: less recent
-            # Git commit timestamps). This compatible version dependency
-            # expresses that as closely as possible. Allowing versions
-            # compatible with .dev0 allows any development release.
-            ver_dep = f'~={parsed_ver.base_version}.dev0'
-        else:
-            ver_dep = f'=={version}'
-        dep_fmt = f'{{}}{ver_dep}'.format
+        # A packaged development release should be installed with other
+        # development packages built from the same source, but those
+        # dependencies may have earlier "dev" versions (read: less recent
+        # Git commit timestamps). This compatible version dependency
+        # expresses that as closely as possible. Allowing versions
+        # compatible with .dev0 allows any development release.
+        # Regular expression borrowed partially from
+        # <https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers-regex>
+        dep_ver, match_count = re.subn(r'\.dev(0|[1-9][0-9]*)$', '.dev0', version, 1)
+        dep_op = '~=' if match_count else '=='
+        dep_fmt = f'{{}}{dep_op}{dep_ver}'.format
     else:
         def dep_fmt(pkg):
             pkg_path = REPO_PATH / PACKAGE_SRCPATH_MAP[pkg]
             return f'{pkg} @ {pkg_path.as_uri()}'
-    # A dependency of arvados_version.py itself.
-    yield 'packaging>=21.0'
     for dep_pkg in PACKAGE_DEPENDENCY_MAP.get(PACKAGE_NAME, ()):
         yield dep_fmt(dep_pkg)
 
diff --git a/tools/crunchstat-summary/arvados_version.py b/tools/crunchstat-summary/arvados_version.py
index 5928c526fc..c0933398e0 100644
--- a/tools/crunchstat-summary/arvados_version.py
+++ b/tools/crunchstat-summary/arvados_version.py
@@ -12,12 +12,11 @@
 #    it reads _version.py and generates dependencies from it.
 
 import os
+import re
 import runpy
 import subprocess
 import sys
 
-import packaging.version
-
 from pathlib import Path
 
 # These maps explain the relationships between different Python modules in
@@ -129,24 +128,21 @@ def iter_dependencies(version=None):
     if version is None:
         version = get_version()
     if ENV_VERSION or (REPO_PATH is None):
-        parsed_ver = packaging.version.parse(version)
-        if parsed_ver.is_devrelease:
-            # A packaged development release should be installed with other
-            # development packages built from the same source, but those
-            # dependencies may have earlier "dev" versions (read: less recent
-            # Git commit timestamps). This compatible version dependency
-            # expresses that as closely as possible. Allowing versions
-            # compatible with .dev0 allows any development release.
-            ver_dep = f'~={parsed_ver.base_version}.dev0'
-        else:
-            ver_dep = f'=={version}'
-        dep_fmt = f'{{}}{ver_dep}'.format
+        # A packaged development release should be installed with other
+        # development packages built from the same source, but those
+        # dependencies may have earlier "dev" versions (read: less recent
+        # Git commit timestamps). This compatible version dependency
+        # expresses that as closely as possible. Allowing versions
+        # compatible with .dev0 allows any development release.
+        # Regular expression borrowed partially from
+        # <https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers-regex>
+        dep_ver, match_count = re.subn(r'\.dev(0|[1-9][0-9]*)$', '.dev0', version, 1)
+        dep_op = '~=' if match_count else '=='
+        dep_fmt = f'{{}}{dep_op}{dep_ver}'.format
     else:
         def dep_fmt(pkg):
             pkg_path = REPO_PATH / PACKAGE_SRCPATH_MAP[pkg]
             return f'{pkg} @ {pkg_path.as_uri()}'
-    # A dependency of arvados_version.py itself.
-    yield 'packaging>=21.0'
     for dep_pkg in PACKAGE_DEPENDENCY_MAP.get(PACKAGE_NAME, ()):
         yield dep_fmt(dep_pkg)
 
diff --git a/tools/user-activity/arvados_version.py b/tools/user-activity/arvados_version.py
index 5928c526fc..c0933398e0 100644
--- a/tools/user-activity/arvados_version.py
+++ b/tools/user-activity/arvados_version.py
@@ -12,12 +12,11 @@
 #    it reads _version.py and generates dependencies from it.
 
 import os
+import re
 import runpy
 import subprocess
 import sys
 
-import packaging.version
-
 from pathlib import Path
 
 # These maps explain the relationships between different Python modules in
@@ -129,24 +128,21 @@ def iter_dependencies(version=None):
     if version is None:
         version = get_version()
     if ENV_VERSION or (REPO_PATH is None):
-        parsed_ver = packaging.version.parse(version)
-        if parsed_ver.is_devrelease:
-            # A packaged development release should be installed with other
-            # development packages built from the same source, but those
-            # dependencies may have earlier "dev" versions (read: less recent
-            # Git commit timestamps). This compatible version dependency
-            # expresses that as closely as possible. Allowing versions
-            # compatible with .dev0 allows any development release.
-            ver_dep = f'~={parsed_ver.base_version}.dev0'
-        else:
-            ver_dep = f'=={version}'
-        dep_fmt = f'{{}}{ver_dep}'.format
+        # A packaged development release should be installed with other
+        # development packages built from the same source, but those
+        # dependencies may have earlier "dev" versions (read: less recent
+        # Git commit timestamps). This compatible version dependency
+        # expresses that as closely as possible. Allowing versions
+        # compatible with .dev0 allows any development release.
+        # Regular expression borrowed partially from
+        # <https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers-regex>
+        dep_ver, match_count = re.subn(r'\.dev(0|[1-9][0-9]*)$', '.dev0', version, 1)
+        dep_op = '~=' if match_count else '=='
+        dep_fmt = f'{{}}{dep_op}{dep_ver}'.format
     else:
         def dep_fmt(pkg):
             pkg_path = REPO_PATH / PACKAGE_SRCPATH_MAP[pkg]
             return f'{pkg} @ {pkg_path.as_uri()}'
-    # A dependency of arvados_version.py itself.
-    yield 'packaging>=21.0'
     for dep_pkg in PACKAGE_DEPENDENCY_MAP.get(PACKAGE_NAME, ()):
         yield dep_fmt(dep_pkg)
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list