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

bpo-45950: Fix macOS framework builds of _bootstrap_python (GH-29936) #29936

Merged
merged 2 commits into from
Dec 6, 2021

Conversation

tiran
Copy link
Member

@tiran tiran commented Dec 6, 2021

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @tiran for commit 02dc19dd98f2eaa19c2de25eb5a48dec857fa7b1 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 6, 2021
@tiran tiran marked this pull request as ready for review December 6, 2021 14:19
@tiran tiran changed the title bpo-45950: Attempt to fix macOS builds of _bootstrap_python when usin… bpo-45950: Fix macOS framework builds of _bootstrap_python (GH-29936) Dec 6, 2021
@tiran tiran merged commit 612e59b into python:main Dec 6, 2021
@tiran tiran deleted the bpo-45950-macos branch December 6, 2021 16:13
Comment on lines +1208 to +1217
# like getpath.o with additional -DPY_BOOTSTRAP_PYTHON=1
Modules/getpath_bootstrap.o: $(srcdir)/Modules/getpath.c Python/frozen_modules/getpath.h Makefile $(PYTHON_HEADERS)
$(CC) -c $(PY_CORE_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
-DPREFIX='"$(prefix)"' \
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
-DPLATLIBDIR='"$(PLATLIBDIR)"' \
-DPY_BOOTSTRAP_PYTHON=1 \
-o $@ $(srcdir)/Modules/getpath.c
Copy link
Member

@gvanrossum gvanrossum Dec 7, 2021

Choose a reason for hiding this comment

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

Wouldn't it be more elegant to have a two-line file named getpath_bootstrap.c using the default .c.o rule?

#define BOOTSTRAP_PYTHON 1
#include "getpath.c"

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that the approach is not elegant. getpath.c requires additional macros

#if (!defined(PREFIX) || !defined(EXEC_PREFIX) \
|| !defined(VERSION) || !defined(VPATH) \
|| !defined(PLATLIBDIR))
#error "PREFIX, EXEC_PREFIX, VERSION, VPATH and PLATLIBDIR macros must be defined"
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants