beeware / Python-Apple-support

A meta-package for building a version of Python that can be embedded into a macOS, iOS, tvOS or watchOS project.
MIT License
1.1k stars 159 forks source link

Running make macOS PYTHON_VERSION=3.10.4 fails #146

Closed riccardodivirgilio closed 2 years ago

riccardodivirgilio commented 2 years ago

Describe the bug The makefile script fails if you set the python version to something different than 3.10.0 I'm not sure if this is considered to be a bug, please close if this is not supported.

To Reproduce Steps to reproduce the behavior:

  1. Download the makefile from https://github.com/beeware/Python-Apple-support/blob/3.10/Makefile
  2. run make macOS PYTHON_VERSION=3.10.4

Stdout

...
patching file watchOS/XCode-sample/sample/Images.xcassets/AppIcon.appiconset/Contents.json
patching file watchOS/XCode-sample/sample/Images.xcassets/LaunchImage.launchimage/Contents.json
patching file watchOS/XCode-sample/sample/en.lproj/InfoPlist.strings
patching file watchOS/XCode-sample/sample/main.m
patching file watchOS/XCode-sample/sample/sample-Info.plist
patching file watchOS/XCode-sample/sample/sample-Prefix.pch
make: *** [build/macOS/Python-3.10.4-macOS/Makefile] Error 1

Environment: MacOS 12.0.1 Mac mini m1 2020 xcode-select version 2392.

freakboy3742 commented 2 years ago

No, that won't work... but it isn't supposed to, either. The Python source code needs to be patched, so you can't arbitrarily change the version being patched.

If you check out the dev branch, you'll get a build of 3.10.4.

riccardodivirgilio commented 2 years ago

Thanks for the explanation, I was under the impression this was somehow allowed because the source code is using this var to compute different flavours of version strings.

https://github.com/beeware/Python-Apple-support/blob/3.10/Makefile#L40

But apparently that is done "only" to keep the code DRY.

Thanks.