diff --git a/bindings/python/MANIFEST.in b/bindings/python/MANIFEST.in deleted file mode 100644 index 97829464..00000000 --- a/bindings/python/MANIFEST.in +++ /dev/null @@ -1,30 +0,0 @@ -include README.md -include CHANGELOG.md -include CONTRIBUTING.md -include LICENSE -include *.sh -include pyproject.toml -include tox.ini - -exclude THIRD-PARTY-NOTICES -exclude addtags.py -exclude benchmark.py -exclude repair_wheel.py -exclude RELEASE.md -exclude asv.conf.json - -graft pymongoarrow - -recursive-include test * -recursive-exclude docs * -recursive-exclude benchmarks * - -global-exclude *.cpp -global-exclude *.dylib -global-exclude *.so.* -global-exclude *.so -global-exclude *.dll -global-exclude *.pyd -global-exclude *.pyc -global-exclude .git* -global-exclude .DS_Store diff --git a/bindings/python/THIRD-PARTY-NOTICES b/bindings/python/THIRD-PARTY-NOTICES index 0c4b95f4..636b3def 100644 --- a/bindings/python/THIRD-PARTY-NOTICES +++ b/bindings/python/THIRD-PARTY-NOTICES @@ -10,31 +10,3 @@ The attached notices are provided for information only. For any licenses that require disclosure of source, sources are available at https://github.com/mongodb-labs/mongo-arrow/. - - -1) License Notice for addtags.py --------------------------------- - -The addtags.py file was adapted from auditwheel (https://github.com/pypa/auditwheel). - -The MIT License - -Copyright (c) 2016 Robert T. McGibbon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/bindings/python/addtags.py b/bindings/python/addtags.py deleted file mode 100644 index e93cbecf..00000000 --- a/bindings/python/addtags.py +++ /dev/null @@ -1,59 +0,0 @@ -# Dependencies: -# - auditwheel>=6,<7 -# Requires AUDITWHEEL_PLAT to be set (e.g. manylinux2014_x86_64) -# Usage: -# $ python addtags.py WHEEL_PATH WHEEL_DIR -import os -from os.path import abspath, basename, exists, isfile -from os.path import join as pjoin -from sys import argv - -from auditwheel.policy import WheelPolicies, get_replace_platforms -from auditwheel.wheel_abi import analyze_wheel_abi -from auditwheel.wheeltools import InWheelCtx, add_platforms - - -def repair_wheel(wheel_path, abi, wheel_dir): - wheel_fname = basename(wheel_path) - with InWheelCtx(wheel_path) as ctx: - ctx.out_wheel = pjoin(wheel_dir, wheel_fname) - ctx.out_wheel = add_platforms(ctx, [abi], get_replace_platforms(abi)) - return ctx.out_wheel - - -def main(wheel_path, abi, wheel_dir): - if not isfile(wheel_path): - msg = f"cannot access wheel file {wheel_path}" - raise FileNotFoundError(msg) - - if not exists(wheel_dir): - os.makedirs(wheel_dir) - - policies = WheelPolicies() - reqd_tag = policies.get_priority_by_name(abi) - out_wheel = repair_wheel(wheel_path, abi, wheel_dir) - - if out_wheel is not None: - analyzed_tag = analyze_wheel_abi(policies, out_wheel, frozenset()).overall_tag - if reqd_tag < policies.get_priority_by_name(analyzed_tag): - print( - "Wheel is eligible for a higher priority tag. " - f"You requested {abi} but I have found this wheel is " - f"eligible for {analyzed_tag}." - ) - out_wheel = repair_wheel(wheel_path, analyzed_tag, wheel_dir) - - print(f"Fixed-up wheel written to {out_wheel}") - - -if __name__ == "__main__": - WHEEL_PATH, WHEEL_DIR = argv[1], argv[2] - TARGET_PLATFORM = os.environ["AUDITWHEEL_PLAT"] - print(f"wheel path: {WHEEL_PATH}") - print(f"target platform: {TARGET_PLATFORM}") - print(f"wheel dir: {WHEEL_DIR}") - main( - wheel_path=abspath(WHEEL_PATH), - abi=TARGET_PLATFORM, - wheel_dir=abspath(WHEEL_DIR), - ) diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml index 121e8509..6e83ee1c 100644 --- a/bindings/python/pyproject.toml +++ b/bindings/python/pyproject.toml @@ -88,7 +88,7 @@ manylinux-x86_64-image = "manylinux_2_28" manylinux-aarch64-image = "manylinux_2_28" repair-wheel-command = [ "pip install \"auditwheel>=6,<7\"", - "python addtags.py {wheel} {dest_dir}" + "auditwheel repair -w {dest_dir} --exclude libarrow* {wheel}" ] [tool.cibuildwheel.macos] @@ -142,7 +142,6 @@ exclude = [ ] [tool.ruff.lint.per-file-ignores] -"addtags.py" = ["T201", "PTH"] "setup.py" = ["PTH", "EM", "B", "S", "E501"] "docs/source/conf.py" = ["E501", "S", "PTH"] "benchmarks.py" = ["T201", "E501", "C4"]