From 4f490a6c5b40b431b61a70e7773c988c542a5364 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Thu, 29 Jun 2017 14:44:37 +0900 Subject: [PATCH 1/2] Fix non-framework build on macOS `PYTHONFRAMEWORK` is defined in `Makefile` and it shoulnd't be used in `pyconfig.h`. `sysconfig.py --generate-posix-vars` reads config vars from Makefile and `pyconfig.h`. Conflicting variables should be avoided. Especially, string config variables in Makefile are unquoted, but in `pyconfig.h` are keep quoted. So it should be private (starts with underscore). --- PC/pyconfig.h | 2 +- Python/sysmodule.c | 2 +- configure.ac | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PC/pyconfig.h b/PC/pyconfig.h index a2d024d6db000e..bab9d5aef9de6d 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -694,6 +694,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ #define HAVE_INET_PTON 1 /* framework name */ -#define PYTHONFRAMEWORK "" +#define _PYTHONFRAMEWORK "" #endif /* !Py_CONFIG_H */ diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 84673e3fed9737..ab435c83104ddc 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1965,7 +1965,7 @@ _PySys_BeginInit(void) SET_SYS_FROM_STRING("_git", Py_BuildValue("(szz)", "CPython", _Py_gitidentifier(), _Py_gitversion())); - SET_SYS_FROM_STRING("_framework", PyUnicode_FromString(PYTHONFRAMEWORK)); + SET_SYS_FROM_STRING("_framework", PyUnicode_FromString(_PYTHONFRAMEWORK)); SET_SYS_FROM_STRING("api_version", PyLong_FromLong(PYTHON_API_VERSION)); SET_SYS_FROM_STRING("copyright", diff --git a/configure.ac b/configure.ac index 815769f534bedd..8253102fc1debc 100644 --- a/configure.ac +++ b/configure.ac @@ -355,7 +355,7 @@ AC_SUBST(FRAMEWORKPYTHONW) AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX) AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX) -AC_DEFINE_UNQUOTED(PYTHONFRAMEWORK, "${PYTHONFRAMEWORK}", [framework name]) +AC_DEFINE_UNQUOTED(_PYTHONFRAMEWORK, "${PYTHONFRAMEWORK}", [framework name]) ##AC_ARG_WITH(dyld, ## AS_HELP_STRING([--with-dyld], From 1f24571ad8f3edf7bbbc90e7dc2ebfb02487b953 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Thu, 29 Jun 2017 14:51:07 +0900 Subject: [PATCH 2/2] autoreconf --- configure | 2 +- pyconfig.h.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index ff8152d7d19312..3a28cad9678a35 100755 --- a/configure +++ b/configure @@ -3245,7 +3245,7 @@ fi cat >>confdefs.h <<_ACEOF -#define PYTHONFRAMEWORK "${PYTHONFRAMEWORK}" +#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}" _ACEOF diff --git a/pyconfig.h.in b/pyconfig.h.in index f7c50eadcafc12..b4d1f1b50384e4 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1247,9 +1247,6 @@ /* Define as the preferred size in bits of long digits */ #undef PYLONG_BITS_IN_DIGIT -/* framework name */ -#undef PYTHONFRAMEWORK - /* Define if you want to coerce the C locale to a UTF-8 based locale */ #undef PY_COERCE_C_LOCALE @@ -1464,6 +1461,9 @@ /* Define if you have POSIX threads, and your system does not define that. */ #undef _POSIX_THREADS +/* framework name */ +#undef _PYTHONFRAMEWORK + /* Define to force use of thread-safe errno, h_errno, and other functions */ #undef _REENTRANT pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy