ronaldoussoren / pyobjc

The Python <-> Objective-C Bridge with bindings for macOS frameworks
https://pyobjc.readthedocs.io
563 stars 47 forks source link

Install doesn't work when running from outside repo dir #579

Closed thewh1teagle closed 11 months ago

thewh1teagle commented 11 months ago

When running python3 pyobjc/install.py it gives error which it doesn't find files in development folder Only if running it from pyobjc folder it finds On MacOS 13.5

ronaldoussoren commented 11 months ago

Note that the best way to install PyObjC is through pip, that is pip install pyobjc.

thewh1teagle commented 11 months ago

Of course I tried first with pip, it didn't worked. Also the install.py took long time and eventually failed.

ronaldoussoren commented 11 months ago

What failure do you get when installing, both using install.py and using pip?

What python version do you use and how was it installed? Do you use an Intel CPU or Apple Silicon (M1, ...)?

thewh1teagle commented 11 months ago

@ronaldoussoren It was on apple silicon M1 with OSX 13.5. Unfortunately I don't have option to check it again it was on a MacOS server I had to rent to test some MacOS application I made.

ronaldoussoren commented 11 months ago

I cannot easily test 13.5 on M1, but did test on 13.6 on Intel.

pip install pyobjc worked for me when using fresh virtual environments (python3.x -m venv ...) when using either python3.10 (installed from python.org) or /usr/bin/python3 (from Xcode 13.4).

I haven't tested building from source yet, that might be broken for the current release because of #572 (which is already fixed in the repository). My current plan is to do more build tests when preparing for the next release.

thewh1teagle commented 11 months ago

It's shame that developers needs to struggle with Apple hardware

ronaldoussoren commented 11 months ago

It's shame that developers needs to struggle with Apple hardware

It's not that bad, I just haven't set up my M1 laptop for running VMs.

Testing M1 support on the latest stable release of macOS is generally fine, AFAIK the bindings for the Virtualisation framework are the only ones I cannot in an Intel VM. The CPU-specific bits of PyObjC are not dependent on specific versions of macOS.