Skip to content

Use correct PATH to find macOS Python in Makefile #61

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

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

samueljohn
Copy link
Contributor

When configuring the iOS/watchOS/tvOS Python, the PATH is prepended
such that the (host) macOS Python x86_64 binary can be found. But the
$(PROJECT_DIR)/build/macOS/python/bin is not there yet. It is created
only later in the target
dist/Python-$(PYTHON_VER)-$1-support.b$(BUILD_NUMBER).tar.gz.

Until then, the macOS Python is only available in the
$(PROJECT_DIR)/$(PYTHON_DIR-macOS)/dist/ dir. Therefore, this is the
correct dir to be used in the PATH var. At least I do assume this to be the case.

I think (but have not checked) this could apply to the other version branches, too.

Note: I noticed this by using the 3.6 branch and I don't have a python3.6 on PATH on my system. If you indeed have some python3.6 on your PATH, then you won't notice and silently that external python3.6 will be used for building iOS/watchOS/tvOS python.

When configuring the iOS/watchOS/tvOS Python, the PATH is prepended
such that the (host) macOS Python x86_64 binary can be found. But the
`$(PROJECT_DIR)/build/macOS/python/bin` is not there yet. It is created
only later in the target
`dist/Python-$(PYTHON_VER)-$1-support.b$(BUILD_NUMBER).tar.gz`.

Until then, the macOS Python is only available in the
`$(PROJECT_DIR)/$(PYTHON_DIR-macOS)/dist/` dir. Therefore, this is the
correct dir to be used in the PATH var.
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Good catch. Not sure why this didn't manifest during any of my own builds, but I can see the problem.

@freakboy3742 freakboy3742 merged commit 17f5317 into beeware:3.6 Oct 17, 2018
@samueljohn samueljohn deleted the 3.6_correct_PATH_to_macOS_python branch October 20, 2018 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants