Skip to content

Commit

Permalink
Revert "Update to delocate 0.11"
Browse files Browse the repository at this point in the history
This reverts commit 367dcb0.
  • Loading branch information
jvolkman committed Jun 12, 2024
1 parent d42bcf0 commit 00d1b66
Show file tree
Hide file tree
Showing 19 changed files with 139 additions and 514 deletions.
2 changes: 1 addition & 1 deletion src/repairwheel/_vendor/delocate/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2024, Matthew Brett and the Delocate contributors.
Copyright (c) 2014-2023, Matthew Brett and the Delocate contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion src/repairwheel/_vendor/delocate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Delocate package."""
# Init for delocate package

import warnings

Expand Down
4 changes: 2 additions & 2 deletions src/repairwheel/_vendor/delocate/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = version = '0.11.0'
__version_tuple__ = version_tuple = (0, 11, 0)
__version__ = version = '0.10.7'
__version_tuple__ = version_tuple = (0, 10, 7)
1 change: 0 additions & 1 deletion src/repairwheel/_vendor/delocate/cmd/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
"""Delocate commands package."""
6 changes: 3 additions & 3 deletions src/repairwheel/_vendor/delocate/cmd/common.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Code shared among multiple commands.
""" Code shared among multiple commands.
All functions in this module are private.
"""

from __future__ import annotations

import glob
Expand Down Expand Up @@ -95,10 +94,11 @@ class DelocateArgs(TypedDict):

def delocate_values(args: Namespace) -> DelocateArgs:
"""Return the common kwargs for delocate_path and delocate_wheel."""

exclude_files: List[str] = args.exclude

def copy_filter_exclude(name: str) -> bool:
"""Return False if name is excluded, uses normal rules otherwise."""
"""Returns False if name is excluded, uses normal rules otherwise."""
for exclude_str in exclude_files:
if exclude_str in name:
logger.info(
Expand Down
5 changes: 2 additions & 3 deletions src/repairwheel/_vendor/delocate/cmd/delocate_addplat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
"""Add platform tags to wheel filename(s) and WHEEL file in wheel.
""" Add platform tags to wheel filename(s) and WHEEL file in wheel
Example:
Expand All @@ -13,7 +13,6 @@
delocate-addplat -x 10_9 -x 10_10 *.whl
"""

# vim: ft=python
from __future__ import absolute_import, division, print_function

Expand Down Expand Up @@ -92,7 +91,7 @@
)


def main() -> None: # noqa: D103
def main() -> None:
args = parser.parse_args()
verbosity_config(args)
wheels = list(glob_paths(args.wheels))
Expand Down
7 changes: 3 additions & 4 deletions src/repairwheel/_vendor/delocate/cmd/delocate_fuse.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env python3
"""Fuse two (probably delocated) wheels.
""" Fuse two (probably delocated) wheels
Overwrites the first wheel in-place by default.
Overwrites the first wheel in-place by default
"""

# vim: ft=python
from __future__ import absolute_import, division, print_function

Expand All @@ -28,7 +27,7 @@
)


def main() -> None: # noqa: D103
def main() -> None:
args = parser.parse_args()
verbosity_config(args)
wheel1, wheel2 = [abspath(expanduser(wheel)) for wheel in args.wheels]
Expand Down
6 changes: 3 additions & 3 deletions src/repairwheel/_vendor/delocate/cmd/delocate_listdeps.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""List library dependencies for libraries in path or wheel."""

""" List library dependencies for libraries in path or wheel
"""
# vim: ft=python
from __future__ import absolute_import, division, print_function

Expand Down Expand Up @@ -37,7 +37,7 @@
)


def main() -> None: # noqa: D103
def main() -> None:
args = parser.parse_args()
verbosity_config(args)
paths = list(glob_paths(args.paths))
Expand Down
7 changes: 3 additions & 4 deletions src/repairwheel/_vendor/delocate/cmd/delocate_patch.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env python3
"""Apply patch to tree stored in wheel.
""" Apply patch to tree stored in wheel
Overwrites the wheel in-place by default.
Overwrites the wheel in-place by default
"""

# vim: ft=python
from __future__ import absolute_import, division, print_function

Expand Down Expand Up @@ -31,7 +30,7 @@
)


def main() -> None: # noqa: D103
def main() -> None:
args = parser.parse_args()
verbosity_config(args)
if args.wheel_dir:
Expand Down
6 changes: 3 additions & 3 deletions src/repairwheel/_vendor/delocate/cmd/delocate_path.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""Copy, relink library dependencies for libraries in path."""

""" Copy, relink library dependencies for libraries in path
"""
# vim: ft=python
from __future__ import absolute_import, division, print_function

Expand Down Expand Up @@ -36,7 +36,7 @@
)


def main() -> None: # noqa: D103
def main() -> None:
args = parser.parse_args()
verbosity_config(args)
paths = list(glob_paths(args.paths))
Expand Down
25 changes: 3 additions & 22 deletions src/repairwheel/_vendor/delocate/cmd/delocate_wheel.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env python3
"""Copy, relink library dependencies for wheel.
""" Copy, relink library dependencies for wheel
Overwrites the wheel in-place by default.
Overwrites the wheel in-place by default
"""

# vim: ft=python
from __future__ import annotations

Expand All @@ -13,8 +12,6 @@
from os.path import join as pjoin
from typing import List, Optional, Text

from packaging.version import Version

from repairwheel._vendor.delocate import delocate_wheel
from repairwheel._vendor.delocate.cmd.common import (
common_parser,
Expand Down Expand Up @@ -64,15 +61,9 @@
" (from 'intel', 'i386', 'x86_64', 'i386,x86_64', 'universal2',"
" 'x86_64,arm64')",
)
parser.add_argument(
"--require-target-macos-version",
type=Version,
help="Verify if platform tag in wheel name is proper",
default=None,
)


def main() -> None: # noqa: D103
def main() -> None:
args = parser.parse_args()
verbosity_config(args)
wheels = list(glob_paths(args.wheels))
Expand All @@ -91,15 +82,6 @@ def main() -> None: # noqa: D103
else:
require_archs = args.require_archs

require_target_macos_version = args.require_target_macos_version
if (
require_target_macos_version is None
and "MACOSX_DEPLOYMENT_TARGET" in os.environ
):
require_target_macos_version = Version(
os.environ["MACOSX_DEPLOYMENT_TARGET"]
)

for wheel in wheels:
if multi or args.verbose:
print("Fixing: " + wheel)
Expand All @@ -112,7 +94,6 @@ def main() -> None: # noqa: D103
out_wheel,
lib_sdir=args.lib_sdir,
require_archs=require_archs,
require_target_macos_version=require_target_macos_version,
**delocate_values(args),
)
if args.verbose and len(copied):
Expand Down
Loading

0 comments on commit 00d1b66

Please sign in to comment.