bpo-29585: Fix sysconfig.get_config_var("PYTHONFRAMEWORK") (GH-2483) · python/cpython@6b42eb1

5 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -694,6 +694,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */

694694

#define HAVE_INET_PTON 1

695695
696696

/* framework name */

697-

#define PYTHONFRAMEWORK ""

697+

#define _PYTHONFRAMEWORK ""

698698
699699

#endif /* !Py_CONFIG_H */

Original file line numberDiff line numberDiff line change

@@ -1965,7 +1965,7 @@ _PySys_BeginInit(void)

19651965

SET_SYS_FROM_STRING("_git",

19661966

Py_BuildValue("(szz)", "CPython", _Py_gitidentifier(),

19671967

_Py_gitversion()));

1968-

SET_SYS_FROM_STRING("_framework", PyUnicode_FromString(PYTHONFRAMEWORK));

1968+

SET_SYS_FROM_STRING("_framework", PyUnicode_FromString(_PYTHONFRAMEWORK));

19691969

SET_SYS_FROM_STRING("api_version",

19701970

PyLong_FromLong(PYTHON_API_VERSION));

19711971

SET_SYS_FROM_STRING("copyright",

Original file line numberDiff line numberDiff line change

@@ -3245,7 +3245,7 @@ fi

32453245
32463246
32473247

cat >>confdefs.h <<_ACEOF

3248-

#define PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"

3248+

#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"

32493249

_ACEOF

32503250
32513251
Original file line numberDiff line numberDiff line change

@@ -355,7 +355,7 @@ AC_SUBST(FRAMEWORKPYTHONW)

355355

AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)

356356

AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX)

357357
358-

AC_DEFINE_UNQUOTED(PYTHONFRAMEWORK, "${PYTHONFRAMEWORK}", [framework name])

358+

AC_DEFINE_UNQUOTED(_PYTHONFRAMEWORK, "${PYTHONFRAMEWORK}", [framework name])

359359
360360

##AC_ARG_WITH(dyld,

361361

## AS_HELP_STRING([--with-dyld],

Original file line numberDiff line numberDiff line change

@@ -1247,9 +1247,6 @@

12471247

/* Define as the preferred size in bits of long digits */

12481248

#undef PYLONG_BITS_IN_DIGIT

12491249
1250-

/* framework name */

1251-

#undef PYTHONFRAMEWORK

1252-
12531250

/* Define if you want to coerce the C locale to a UTF-8 based locale */

12541251

#undef PY_COERCE_C_LOCALE

12551252

@@ -1464,6 +1461,9 @@

14641461

/* Define if you have POSIX threads, and your system does not define that. */

14651462

#undef _POSIX_THREADS

14661463
1464+

/* framework name */

1465+

#undef _PYTHONFRAMEWORK

1466+
14671467

/* Define to force use of thread-safe errno, h_errno, and other functions */

14681468

#undef _REENTRANT

14691469