Apache DataFusion SQL Query Engine
ARROW-12068: [Python] Stop using distutils
Antoine Pitrouaa9ec21cafd8
diff --git a/LICENSE.txt b/LICENSE.txtindex 1480c1401c..4cec07fd0c 100644--- a/LICENSE.txt+++ b/LICENSE.txt@@ -2209,3 +2209,12 @@ The files in cpp/src/arrow/vendored/fast_float/ contain code fromhttps://github.com/lemire/fast_floatwhich is made available under the Apache License 2.0.++--------------------------------------------------------------------------------++The file python/pyarrow/vendored/version.py contains code from++https://github.com/pypa/packaging/++which is made available under both the Apache license v2.0 and the+BSD 2-clause license.diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txtindex 6eb4beedb7..c2e22abd39 100644--- a/dev/release/rat_exclude_files.txt+++ b/dev/release/rat_exclude_files.txt@@ -136,6 +136,7 @@ python/MANIFEST.inpython/manylinux1/.dockerignorepython/pyarrow/includes/__init__.pxdpython/pyarrow/tests/__init__.py+python/pyarrow/vendored/*python/requirements*.txtpax_global_headerMANIFEST.indiff --git a/dev/tasks/conda-recipes/azure.clean.yml b/dev/tasks/conda-recipes/azure.clean.ymlindex 32deccac0b..55ac36528a 100644--- a/dev/tasks/conda-recipes/azure.clean.yml+++ b/dev/tasks/conda-recipes/azure.clean.yml@@ -13,7 +13,7 @@ jobs:displayName: Clone arrow- script: |- conda install -y -c conda-forge pandas anaconda-client+ conda install -y -c conda-forge pandas anaconda-client packagingdisplayName: Install requirements- script: |diff --git a/dev/tasks/conda-recipes/clean.py b/dev/tasks/conda-recipes/clean.pyindex 3e77f0e7ac..bd31c875dc 100644--- a/dev/tasks/conda-recipes/clean.py+++ b/dev/tasks/conda-recipes/clean.py@@ -1,4 +1,3 @@-from distutils.version import LooseVersionfrom subprocess import check_output, check_callfrom typing import List@@ -7,6 +6,8 @@ import osimport pandas as pdimport sys+from packaging.version import Version+VERSIONS_TO_KEEP = 5PACKAGES = [@@ -44,7 +45,7 @@ def packages_to_delete(package_name: str, platform: str) -> List[str]:env=env,)pkgs = pd.DataFrame(json.loads(pkgs_json)[package_name])- pkgs["version"] = pkgs["version"].map(LooseVersion)+ pkgs["version"] = pkgs["version"].map(Version)pkgs["py_version"] = pkgs["build"].str.slice(0, 4)to_delete = []