Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Install tensorflow-macos on Apple silicon Macs (#2119)
* Use hatchling's environment markers system to use platform information to determine when the installing machine is an Apple silicon Mac and install tensorflow-macos instead of tensorflow in this situation. - c.f. https://hatch.pypa.io/latest/config/dependency/#environment-markers * This works because of the following: - x86-64 Linux machine: >>> import platform >>> platform.machine() 'x86_64' >>> platform.system() 'Linux' - x86-64 Apple machine: >>> import platform >>> platform.machine() 'x86_64' >>> platform.system() 'Darwin' - AArch64 machine: >>> import platform >>> platform.machine() 'aarch64' >>> platform.system() 'Linux' - Apple silicon machine: >>> import platform >>> platform.machine() 'arm64' >>> platform.system() 'Darwin'
- Loading branch information