Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Exclude relocating packages in homebrew #210

Merged
merged 8 commits into from
Sep 29, 2022
Merged

Conversation

eddyxu
Copy link
Contributor

@eddyxu eddyxu commented Sep 28, 2022

Closes #198 and #196

@eddyxu eddyxu self-assigned this Sep 28, 2022
@eddyxu eddyxu added python macOS Issues on macOS labels Sep 28, 2022
parser.add_argument("wheel", nargs="+")

args = parser.parse_args()
print(args)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove print?

out_dir = args.wheel_dir
out_wheel = wheel
if out_dir:
if not os.path.exists(out_dir):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need this check if exist_ok=True?

args = parser.parse_args()
print(args)
for wheel in args.wheel:
out_dir = args.wheel_dir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if out_dir is None? Should this be required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@eddyxu eddyxu force-pushed the lei/mac_exclude_lib branch from 8970b09 to 39371fc Compare September 29, 2022 03:59
@eddyxu
Copy link
Contributor Author

eddyxu commented Sep 29, 2022

Verified it works after uninstall arrow, protobuf from homebrew.

$ brew uninstall apache-arrow protobuf grpc
Uninstalling /opt/homebrew/Cellar/apache-arrow/9.0.0_3... (600 files, 139.5MB)
Uninstalling /opt/homebrew/Cellar/protobuf/21.6... (279 files, 19.2MB)
Uninstalling /opt/homebrew/Cellar/grpc/1.49.0... (326 files, 15.3MB)
(venv)  ~/work/lance (lei/mac_exclude_lib?) $ python
Python 3.10.6 (main, Aug 30 2022, 04:58:14) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lance
>>> ds = lance.dataset("s3://eto-public/datasets/oxford_pet/oxford_pet.lance")
>>> ds.schema
filename: string
class: dictionary<values=string, indices=int8, ordered=0>
species: dictionary<values=string, indices=int8, ordered=0>
breed: int16
split: dictionary<values=string, indices=int8, ordered=0>
folder: string
source: struct<database: string, annotation: string, image: string>
  child 0, database: string
  child 1, annotation: string
  child 2, image: string
size: struct<width: int32, height: int32, depth: uint8>
  child 0, width: int32
  child 1, height: int32
  child 2, depth: uint8
segmented: bool
object: list<item: struct<name: dictionary<values=string, indices=uint8, ordered=0>, pose: dictionary<values=string, indices=uint8, ordered=0>, truncated: bool, occluded: bool, bndbox: struct<xmin: int32, ymin: int32, xmax: int32, ymax: int32>, difficult: bool>>
  child 0, item: struct<name: dictionary<values=string, indices=uint8, ordered=0>, pose: dictionary<values=string, indices=uint8, ordered=0>, truncated: bool, occluded: bool, bndbox: struct<xmin: int32, ymin: int32, xmax: int32, ymax: int32>, difficult: bool>
      child 0, name: dictionary<values=string, indices=uint8, ordered=0>
      child 1, pose: dictionary<values=string, indices=uint8, ordered=0>
      child 2, truncated: bool
      child 3, occluded: bool
      child 4, bndbox: struct<xmin: int32, ymin: int32, xmax: int32, ymax: int32>
          child 0, xmin: int32
          child 1, ymin: int32
          child 2, xmax: int32
          child 3, ymax: int32
      child 5, difficult: bool
image: extension<image[binary]<ImageBinaryType>>
>>>

After this PR, the size of wheel

$ ls -lh wheelhouse
total 2024
-rw-r--r--  1 lei  staff   1.0M Sep 28 20:59 pylance-0.1.1.dev0-cp310-cp310-macosx_11_0_arm64.whl

Copy link
Contributor

@changhiskhan changhiskhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w00t

@eddyxu eddyxu merged commit 60db693 into main Sep 29, 2022
@eddyxu eddyxu deleted the lei/mac_exclude_lib branch September 29, 2022 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS Issues on macOS python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup mac wheel
2 participants