You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/06/02 11:29:02 UTC

[GitHub] [arrow] xhochy commented on a change in pull request #7305: ARROW-8941: [C++/Python] Add cleanup script for arrow-nightlies conda repository

xhochy commented on a change in pull request #7305:
URL: https://github.com/apache/arrow/pull/7305#discussion_r433805871



##########
File path: dev/tasks/conda-recipes/clean.py
##########
@@ -0,0 +1,66 @@
+from distutils.version import LooseVersion
+from subprocess import check_output, check_call
+from typing import List
+
+import json
+import os
+import pandas as pd
+import sys
+
+
+VERSIONS_TO_KEEP = 5
+PLATFORMS = ["linux-64", "osx-64", "win-64"]
+PACKAGES = ["pyarrow", "arrow-cpp"]
+
+
+def packages_to_delete(package_name: str, platform: str) -> List[str]:
+    env = os.environ.copy()
+    env["CONDA_SUBDIR"] = platform
+    pkgs_json = check_output(
+        [
+            "mamba",

Review comment:
       It would probably also work with `conda search` with a bit higher runtime.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org