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

Allow equivalent distutils and sysconfig locations #9839

Closed
wants to merge 2 commits into from

Conversation

uranusjr
Copy link
Member

Depends on #9838 (filed separately so I can get a number for the news fragment).

@uranusjr uranusjr force-pushed the sysconfig-allow-samefile branch from d995c6f to c4649ae Compare April 24, 2021 22:55
@uranusjr uranusjr added the state: blocked Can not be done until something else is done label Apr 24, 2021
@uranusjr uranusjr force-pushed the sysconfig-allow-samefile branch from c4649ae to 7ac41ad Compare April 24, 2021 23:00
For compatibility with distutils. This is only done when pip is not
inside a virtual environment due to a quirk in pip's previous
implementation to the header path.
@uranusjr uranusjr force-pushed the sysconfig-allow-samefile branch from 7ac41ad to d9be2a0 Compare April 24, 2021 23:09
@rotu
Copy link

rotu commented Apr 24, 2021

I'm on MacOS Big Sur using python as installed by Homebrew.

After the changes in #9839, the system-level issues look like sysconfig doing the right thing and distutils doing the wrong thing.

On my system:

  • this directory doesn't exist, even as a symlink: /usr/local/include/python3.9
  • these are different directories /usr/local/bin vs /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/bin and /usr/local vs /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /usr/local/include/python3.9/UNKNOWN
sysconfig: /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9/UNKNOWN
WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /usr/local/bin
sysconfig: /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/bin
WARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /usr/local
sysconfig: /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9
WARNING: Additional context:
user = False
home = None
root = None
prefix = None

There is a similar discrepency for --user paths, but it looks like distutils is the one things are being installed under. The distutils path exists but the sysconfig path does not.

pip install --upgrade setuptools --user
Requirement already satisfied: setuptools in ./Library/Python/3.9/lib/python/site-packages (56.0.0)
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Users/dan/Library/Python/3.9/lib/python/site-packages
sysconfig: /Users/dan/Library/Python/3.9/lib/python3.9/site-packages
WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Users/dan/Library/Python/3.9/lib/python/site-packages
sysconfig: /Users/dan/Library/Python/3.9/lib/python3.9/site-packages
WARNING: Additional context:
user = True
home = None
root = None
prefix = None

@uranusjr
Copy link
Member Author

Could you post the content of this file at the following location? (If I’m understanding Homebrew’s build script correctly; try to dig around for a distutils.cfg if there’s not a file at this exact location)

/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/distutils.cfg

I think Homebrew is using it to configure distutils.cfg, but sysconfig does not support this mechanism. This mechanism is thought to be obscure and no longer in use, so we might need to tell Homebrew to stop doing it…

@rotu
Copy link

rotu commented Apr 25, 2021

cat /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/distutils.cfg

[install]
prefix=/usr/local
[build_ext]
include_dirs=/usr/local/include:/usr/local/opt/[email protected]/include:/usr/local/opt/sqlite/include
library_dirs=/usr/local/lib:/usr/local/opt/[email protected]/lib:/usr/local/opt/sqlite/lib

~~Here's the Homebrew install script, which might give some insight?
https://github.com/Homebrew/homebrew-core/blob/ee1dd2383b8107c41ba51d9359987e8e8efa7aab/Formula/[email protected]

I'm guessing what you're looking for is in sitecustomize https://github.com/Homebrew/homebrew-core/blob/ee1dd2383b8107c41ba51d9359987e8e8efa7aab/Formula/python%403.9.rb#L382 I see what you mean now

@uranusjr
Copy link
Member Author

uranusjr commented Apr 25, 2021

I think it’s this part that’s breaking things:

[install]
prefix=/usr/local

From the build script, Homebrew builds Python with prefix /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9 (there are some technical details regarding framework builds but that’s the basic idea), but then replaces the distutils prefix to /usr/local. Basically that’s the entire difference, if you replace the prefixes from sysconfig values they are then identical to distutils ones.

The distutils configuration is something the packaging community has been trying to deprecate and remove for a while (the documentation I’m linking to is ancient!) because the mechanism is extremely easy to break by the user. Instead, Python distributors are adviced to patch sysconfig and distutils.command.install to provide an alternative “default install scheme”. We’ve worked with Linux distributions for a long time for them to transition, but it seems like Homebrew is left out of the loop.

For reference, this is Debian’s install layout patch (Python 3.7 used as an example, a similar patch is available for every version): https://sources.debian.org/patches/python3.7/3.7.3-2+deb10u3/distutils-install-layout.diff/

I’m not sure how best to report this to Homebrew, so any assistance would be awesome.


Regarding what pip can do, I think I will add an additional check to detect whether the different path value comes from a distutils config, and emit a different message instead (along the lines of hey you have a distutils config, that’s deperecated and we’ll drop it soon; if you didn’t set it yourself, tell whoever provides your Python installation to stop doing this).

@rotu
Copy link

rotu commented Apr 25, 2021

I don't quite understand the whole situation, or what's considered "correct", and I'm glad it makes sense to you!

Here's the public forum for Homebrew, which I think is the best place to bring this up. https://github.com/Homebrew/discussions/discussions

There also seem to be some good discussions with concrete user confusions after making changes to Python. The first 3 I found:

@rotu
Copy link

rotu commented Apr 25, 2021

Homebrew is not the whole story. I get the below using the system Python3 on MacOS.

  • /Library/Python/3.8/site-packages and /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages are completely different directories
  • /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3 and usr/bin/python3 are two different python executables but both give the below messages:
python3 -m pip install --upgrade setuptools
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Library/Python/3.8/site-packages
sysconfig: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Library/Python/3.8/site-packages
sysconfig: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Library/Python/3.8/include/UNKNOWN
sysconfig: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8
WARNING: Value for scheme.scripts does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /usr/local/bin
sysconfig: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin
WARNING: Value for scheme.data does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Library/Python/3.8
sysconfig: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8
WARNING: Additional context:
user = False
home = None
root = None
prefix = None
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: setuptools in ./Library/Python/3.8/lib/python/site-packages (56.0.0)
WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Users/dan/Library/Python/3.8/lib/python/site-packages
sysconfig: /Users/dan/Library/Python/3.8/lib/python3.8/site-packages
WARNING: Value for scheme.purelib does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Users/dan/Library/Python/3.8/lib/python/site-packages
sysconfig: /Users/dan/Library/Python/3.8/lib/python3.8/site-packages
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/9617>
distutils: /Users/dan/Library/Python/3.8/include/python3.8/UNKNOWN
sysconfig: /Users/dan/Library/Python/3.8/include/python3.8
WARNING: Additional context:
user = True
home = None
root = None
prefix = None

@pradyunsg
Copy link
Member

I’m not sure how best to report this to Homebrew, so any assistance would be awesome.

File an issue on https://github.com/Homebrew/homebrew-core/issues, with the title starting with "Python3: ".

@uranusjr
Copy link
Member Author

uranusjr commented Apr 25, 2021

Re: System Python 3 on Mac

This issue is known; sysconfig is consistently giving different paths on all platforms except Windows when user=True. I am not yet sure if this is intended and will need to ask CPython devs for an answer. We’ll have to leave that one for now.

@uranusjr
Copy link
Member Author

uranusjr commented Apr 25, 2021

@rotu Can you run the following against your system python3 for me?

from distutils.dist import Distribution
Distribution().find_config_files()  # This should return a list.

Also

$ python3 -m sysconfig

@pradyunsg
Copy link
Member

On MacOS Big Sur:

$ /usr/bin/python3 -c "from distutils.dist import Distribution; print(Distribution().find_config_files())"         
[]
/usr/bin/python3 -m sysconfig
$ /usr/bin/python3 -m sysconfig
Platform: "macosx-10.14.6-x86_64"
Python version: "3.8"
Current installation scheme: "osx_framework_library"

Paths: 
	data = "/Library/Python/3.8"
	include = "/Library/Python/3.8/include"
	platinclude = "/Library/Python/3.8/include"
	platlib = "/Library/Python/3.8/site-packages"
	platstdlib = "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8"
	purelib = "/Library/Python/3.8/site-packages"
	scripts = "/usr/local/bin"
	stdlib = "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8"

Variables: 
	ABIFLAGS = ""
	AC_APPLE_UNIVERSAL_BUILD = "0"
	AIX_GENUINE_CPLUSPLUS = "0"
	ALT_SOABI = "0"
	ANDROID_API_LEVEL = "0"
	AR = "ar"
	ARFLAGS = "rcs"
	BASECFLAGS = "-Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic"
	BASECPPFLAGS = "-IObjects -IInclude -IPython"
	BASEMODLIBS = ""
	BINDIR = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/bin"
	BINLIBDEST = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8"
	BLDLIBRARY = ""
	BLDSHARED = "clang -bundle -undefined dynamic_lookup -Wl,-headerpad,0x1000 -arch arm64 -arch x86_64"
	BRIDGEOS_DEPLOYMENT_TARGET = ""
	BUILDEXE = ".exe"
	BUILDPYTHON = "python.exe"
	BUILD_GNU_TYPE = "x86_64-apple-darwin"
	BYTESTR_DEPS = "\"
	CC = "clang"
	CCSHARED = ""
	CFLAGS = "-Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64"
	CFLAGSFORSHARED = "-fvisibility=hidden -DPy_BUILD_SHARED"
	CFLAGS_ALIASING = "-fno-strict-aliasing"
	CFLAGS_NODIST = ""
	CONFIGFILES = "configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in"
	CONFIGURE_CFLAGS = "-iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64"
	CONFIGURE_CFLAGS_NODIST = "-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration"
	CONFIGURE_CPPFLAGS = "-iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64"
	CONFIGURE_LDFLAGS = "-Wl,-headerpad,0x1000 -arch arm64 -arch x86_64"
	CONFIGURE_LDFLAGS_NODIST = ""
	CONFIG_ARGS = "'-C' '--host=x86_64-apple-darwin' '--build=x86_64-apple-darwin' '--enable-framework=/Applications/Xcode.app/Contents/Developer/Library/Frameworks' '--with-framework-name=Python3' '--with-openssl=/AppleInternal/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk/usr/local/libressl-2.8' '--with-openssl-ldflags=-L/AppleInternal/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk/usr/local/libressl-2.8/lib -F/AppleInternal/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk/System/Library/PrivateFrameworks' '--with-openssl-libs=-framework TrustEvaluationAgent' '--with-bundleid-prefix=com.apple' '--enable-ipv6' '--prefix=/Applications/Xcode.app/Contents/Developer/usr' '--with-pymalloc' 'PYTHON_FOR_BUILD=PYTHONPATH=/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Lib DYLD_FRAMEWORK_PATH=/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects/host /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects/host/python.exe' 'TRAIN_STYLE=DT' 'CC=xcrun -sdk macosx clang' 'CXX=xcrun -sdk macosx clang++' 'CPP=xcrun -sdk macosx clang -E' 'CFLAGS=-iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64' 'CPPFLAGS=-iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64' 'LIBS=-lSystem' 'LDFLAGS=-Wl,-headerpad,0x1000 -arch arm64 -arch x86_64' 'OBJROOT=/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects' 'SDKROOT=/AppleInternal/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk' 'build_alias=x86_64-apple-darwin' 'host_alias=x86_64-apple-darwin'"
	CONFINCLUDEDIR = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include"
	CONFINCLUDEPY = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers"
	COREPYTHONPATH = ""
	COVERAGE_INFO = "/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects/host/coverage.info"
	COVERAGE_REPORT = "/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects/host/lcov-report"
	COVERAGE_REPORT_OPTIONS = "--no-branch-coverage --title "CPython lcov report""
	CPPFLAGS = "-IObjects -IInclude -IPython -I. -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64"
	CURDIR = ""
	CXX = "clang++"
	DESTDIRS = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8 /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8 /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/lib-dynload"
	DESTLIB = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8"
	DESTPATH = ""
	DESTSHARED = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/lib-dynload"
	DFLAGS = ""
	DIRMODE = "755"
	DIST = "README.rst ChangeLog configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in Include Lib Misc Ext-dummy"
	DISTDIRS = "Include Lib Misc Ext-dummy"
	DISTFILES = "README.rst ChangeLog configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in"
	DLINCLDIR = "."
	DLLLIBRARY = ""
	DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 = "0"
	DOUBLE_IS_BIG_ENDIAN_IEEE754 = "0"
	DOUBLE_IS_LITTLE_ENDIAN_IEEE754 = "1"
	DTRACE = ""
	DTRACE_DEPS = "\"
	DTRACE_HEADERS = ""
	DTRACE_OBJS = ""
	DYNLOADFILE = "dynload_shlib.o"
	ENABLE_IPV6 = "1"
	ENSUREPIP = "upgrade"
	EXE = ""
	EXEMODE = "755"
	EXTRATESTOPTS = ""
	EXTRA_CFLAGS = ""
	EXT_SUFFIX = ".cpython-38-darwin.so"
	FILEMODE = "644"
	FLOAT_WORDS_BIGENDIAN = "0"
	FLOCK_NEEDS_LIBBSD = "0"
	GETPGRP_HAVE_ARG = "0"
	GETTIMEOFDAY_NO_TZ = "0"
	GITBRANCH = ""
	GITTAG = ""
	GITVERSION = ""
	GNULD = "no"
	HAVE_ACCEPT4 = "0"
	HAVE_ACOSH = "1"
	HAVE_ADDRINFO = "1"
	HAVE_ALARM = "1"
	HAVE_ALIGNED_REQUIRED = "0"
	HAVE_ALLOCA_H = "1"
	HAVE_ALTZONE = "0"
	HAVE_ASINH = "1"
	HAVE_ASM_TYPES_H = "0"
	HAVE_ATANH = "1"
	HAVE_BIND_TEXTDOMAIN_CODESET = "0"
	HAVE_BLUETOOTH_BLUETOOTH_H = "0"
	HAVE_BLUETOOTH_H = "0"
	HAVE_BROKEN_MBSTOWCS = "0"
	HAVE_BROKEN_NICE = "0"
	HAVE_BROKEN_PIPE_BUF = "0"
	HAVE_BROKEN_POLL = "0"
	HAVE_BROKEN_POSIX_SEMAPHORES = "0"
	HAVE_BROKEN_PTHREAD_SIGMASK = "0"
	HAVE_BROKEN_SEM_GETVALUE = "1"
	HAVE_BROKEN_UNSETENV = "0"
	HAVE_BUILTIN_ATOMIC = "1"
	HAVE_CHFLAGS = "1"
	HAVE_CHOWN = "1"
	HAVE_CHROOT = "1"
	HAVE_CLOCK = "1"
	HAVE_CLOCK_GETRES = "1"
	HAVE_CLOCK_GETTIME = "1"
	HAVE_CLOCK_SETTIME = "1"
	HAVE_COMPUTED_GOTOS = "1"
	HAVE_CONFSTR = "1"
	HAVE_CONIO_H = "0"
	HAVE_COPYSIGN = "1"
	HAVE_COPY_FILE_RANGE = "0"
	HAVE_CRYPT_H = "0"
	HAVE_CRYPT_R = "0"
	HAVE_CTERMID = "1"
	HAVE_CTERMID_R = "1"
	HAVE_CURSES_FILTER = "1"
	HAVE_CURSES_H = "1"
	HAVE_CURSES_HAS_KEY = "1"
	HAVE_CURSES_IMMEDOK = "1"
	HAVE_CURSES_IS_PAD = "0"
	HAVE_CURSES_IS_TERM_RESIZED = "1"
	HAVE_CURSES_RESIZETERM = "1"
	HAVE_CURSES_RESIZE_TERM = "1"
	HAVE_CURSES_SYNCOK = "1"
	HAVE_CURSES_TYPEAHEAD = "1"
	HAVE_CURSES_USE_ENV = "1"
	HAVE_CURSES_WCHGAT = "1"
	HAVE_DECL_ISFINITE = "1"
	HAVE_DECL_ISINF = "1"
	HAVE_DECL_ISNAN = "1"
	HAVE_DECL_RTLD_DEEPBIND = "0"
	HAVE_DECL_RTLD_GLOBAL = "1"
	HAVE_DECL_RTLD_LAZY = "1"
	HAVE_DECL_RTLD_LOCAL = "1"
	HAVE_DECL_RTLD_MEMBER = "0"
	HAVE_DECL_RTLD_NODELETE = "1"
	HAVE_DECL_RTLD_NOLOAD = "1"
	HAVE_DECL_RTLD_NOW = "1"
	HAVE_DECL_TZNAME = "0"
	HAVE_DEVICE_MACROS = "1"
	HAVE_DEV_PTC = "0"
	HAVE_DEV_PTMX = "1"
	HAVE_DIRECT_H = "0"
	HAVE_DIRENT_D_TYPE = "1"
	HAVE_DIRENT_H = "1"
	HAVE_DIRFD = "1"
	HAVE_DLFCN_H = "1"
	HAVE_DLOPEN = "1"
	HAVE_DUP2 = "1"
	HAVE_DUP3 = "0"
	HAVE_DYNAMIC_LOADING = "1"
	HAVE_ENDIAN_H = "0"
	HAVE_EPOLL = "0"
	HAVE_EPOLL_CREATE1 = "0"
	HAVE_ERF = "1"
	HAVE_ERFC = "1"
	HAVE_ERRNO_H = "1"
	HAVE_EXECV = "1"
	HAVE_EXPLICIT_BZERO = "0"
	HAVE_EXPLICIT_MEMSET = "0"
	HAVE_EXPM1 = "1"
	HAVE_FACCESSAT = "1"
	HAVE_FCHDIR = "1"
	HAVE_FCHMOD = "1"
	HAVE_FCHMODAT = "1"
	HAVE_FCHOWN = "1"
	HAVE_FCHOWNAT = "1"
	HAVE_FCNTL_H = "1"
	HAVE_FDATASYNC = "0"
	HAVE_FDOPENDIR = "1"
	HAVE_FDWALK = "0"
	HAVE_FEXECVE = "0"
	HAVE_FINITE = "0"
	HAVE_FLOCK = "1"
	HAVE_FORK = "1"
	HAVE_FORKPTY = "1"
	HAVE_FPATHCONF = "1"
	HAVE_FSEEK64 = "0"
	HAVE_FSEEKO = "1"
	HAVE_FSTATAT = "1"
	HAVE_FSTATVFS = "1"
	HAVE_FSYNC = "1"
	HAVE_FTELL64 = "0"
	HAVE_FTELLO = "1"
	HAVE_FTIME = "1"
	HAVE_FTRUNCATE = "1"
	HAVE_FUTIMENS = "1"
	HAVE_FUTIMES = "1"
	HAVE_FUTIMESAT = "0"
	HAVE_GAI_STRERROR = "1"
	HAVE_GAMMA = "0"
	HAVE_GCC_ASM_FOR_MC68881 = "0"
	HAVE_GCC_ASM_FOR_X64 = "0"
	HAVE_GCC_ASM_FOR_X87 = "0"
	HAVE_GCC_UINT128_T = "1"
	HAVE_GETADDRINFO = "1"
	HAVE_GETC_UNLOCKED = "1"
	HAVE_GETENTROPY = "0"
	HAVE_GETGRGID_R = "1"
	HAVE_GETGRNAM_R = "1"
	HAVE_GETGROUPLIST = "1"
	HAVE_GETGROUPS = "1"
	HAVE_GETHOSTBYNAME = "1"
	HAVE_GETHOSTBYNAME_R = "0"
	HAVE_GETHOSTBYNAME_R_3_ARG = "0"
	HAVE_GETHOSTBYNAME_R_5_ARG = "0"
	HAVE_GETHOSTBYNAME_R_6_ARG = "0"
	HAVE_GETITIMER = "1"
	HAVE_GETLOADAVG = "1"
	HAVE_GETLOGIN = "1"
	HAVE_GETNAMEINFO = "1"
	HAVE_GETPAGESIZE = "1"
	HAVE_GETPEERNAME = "1"
	HAVE_GETPGID = "1"
	HAVE_GETPGRP = "1"
	HAVE_GETPID = "1"
	HAVE_GETPRIORITY = "1"
	HAVE_GETPWENT = "1"
	HAVE_GETPWNAM_R = "1"
	HAVE_GETPWUID_R = "1"
	HAVE_GETRANDOM = "0"
	HAVE_GETRANDOM_SYSCALL = "0"
	HAVE_GETRESGID = "0"
	HAVE_GETRESUID = "0"
	HAVE_GETSID = "1"
	HAVE_GETSPENT = "0"
	HAVE_GETSPNAM = "0"
	HAVE_GETTIMEOFDAY = "1"
	HAVE_GETWD = "1"
	HAVE_GLIBC_MEMMOVE_BUG = "0"
	HAVE_GRP_H = "1"
	HAVE_HSTRERROR = "1"
	HAVE_HTOLE64 = "0"
	HAVE_HYPOT = "1"
	HAVE_IEEEFP_H = "0"
	HAVE_IF_NAMEINDEX = "1"
	HAVE_INET_ATON = "1"
	HAVE_INET_PTON = "1"
	HAVE_INITGROUPS = "1"
	HAVE_INTTYPES_H = "1"
	HAVE_IO_H = "0"
	HAVE_IPA_PURE_CONST_BUG = "0"
	HAVE_KILL = "1"
	HAVE_KILLPG = "1"
	HAVE_KQUEUE = "1"
	HAVE_LANGINFO_H = "1"
	HAVE_LARGEFILE_SUPPORT = "0"
	HAVE_LCHFLAGS = "1"
	HAVE_LCHMOD = "1"
	HAVE_LCHOWN = "1"
	HAVE_LGAMMA = "1"
	HAVE_LIBDL = "1"
	HAVE_LIBDLD = "0"
	HAVE_LIBIEEE = "0"
	HAVE_LIBINTL_H = "0"
	HAVE_LIBREADLINE = "1"
	HAVE_LIBRESOLV = "0"
	HAVE_LIBSENDFILE = "0"
	HAVE_LIBUTIL_H = "1"
	HAVE_LINK = "1"
	HAVE_LINKAT = "1"
	HAVE_LINUX_CAN_BCM_H = "0"
	HAVE_LINUX_CAN_H = "0"
	HAVE_LINUX_CAN_RAW_FD_FRAMES = "0"
	HAVE_LINUX_CAN_RAW_H = "0"
	HAVE_LINUX_MEMFD_H = "0"
	HAVE_LINUX_NETLINK_H = "0"
	HAVE_LINUX_QRTR_H = "0"
	HAVE_LINUX_RANDOM_H = "0"
	HAVE_LINUX_TIPC_H = "0"
	HAVE_LINUX_VM_SOCKETS_H = "0"
	HAVE_LOCKF = "1"
	HAVE_LOG1P = "1"
	HAVE_LOG2 = "1"
	HAVE_LONG_DOUBLE = "1"
	HAVE_LSTAT = "1"
	HAVE_LUTIMES = "1"
	HAVE_MADVISE = "1"
	HAVE_MAKEDEV = "1"
	HAVE_MBRTOWC = "1"
	HAVE_MEMFD_CREATE = "0"
	HAVE_MEMORY_H = "1"
	HAVE_MEMRCHR = "0"
	HAVE_MKDIRAT = "1"
	HAVE_MKFIFO = "1"
	HAVE_MKFIFOAT = "0"
	HAVE_MKNOD = "1"
	HAVE_MKNODAT = "0"
	HAVE_MKTIME = "1"
	HAVE_MMAP = "1"
	HAVE_MREMAP = "0"
	HAVE_NCURSES_H = "1"
	HAVE_NDIR_H = "0"
	HAVE_NETPACKET_PACKET_H = "0"
	HAVE_NET_IF_H = "1"
	HAVE_NICE = "1"
	HAVE_OPENAT = "1"
	HAVE_OPENPTY = "1"
	HAVE_PATHCONF = "1"
	HAVE_PAUSE = "1"
	HAVE_PIPE2 = "0"
	HAVE_PLOCK = "0"
	HAVE_POLL = "1"
	HAVE_POLL_H = "1"
	HAVE_POSIX_FADVISE = "0"
	HAVE_POSIX_FALLOCATE = "0"
	HAVE_POSIX_SPAWN = "1"
	HAVE_POSIX_SPAWNP = "1"
	HAVE_PREAD = "1"
	HAVE_PREADV = "1"
	HAVE_PREADV2 = "0"
	HAVE_PRLIMIT = "0"
	HAVE_PROCESS_H = "0"
	HAVE_PROTOTYPES = "1"
	HAVE_PTHREAD_CONDATTR_SETCLOCK = "0"
	HAVE_PTHREAD_DESTRUCTOR = "0"
	HAVE_PTHREAD_GETCPUCLOCKID = "0"
	HAVE_PTHREAD_H = "1"
	HAVE_PTHREAD_INIT = "0"
	HAVE_PTHREAD_KILL = "1"
	HAVE_PTHREAD_SIGMASK = "1"
	HAVE_PTY_H = "0"
	HAVE_PUTENV = "1"
	HAVE_PWRITE = "1"
	HAVE_PWRITEV = "1"
	HAVE_PWRITEV2 = "0"
	HAVE_READLINK = "1"
	HAVE_READLINKAT = "1"
	HAVE_READV = "1"
	HAVE_REALPATH = "1"
	HAVE_RENAMEAT = "1"
	HAVE_RL_APPEND_HISTORY = "0"
	HAVE_RL_CATCH_SIGNAL = "0"
	HAVE_RL_COMPLETION_APPEND_CHARACTER = "1"
	HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK = "1"
	HAVE_RL_COMPLETION_MATCHES = "1"
	HAVE_RL_COMPLETION_SUPPRESS_APPEND = "0"
	HAVE_RL_PRE_INPUT_HOOK = "1"
	HAVE_RL_RESIZE_TERMINAL = "0"
	HAVE_ROUND = "1"
	HAVE_RTPSPAWN = "0"
	HAVE_SCHED_GET_PRIORITY_MAX = "1"
	HAVE_SCHED_H = "1"
	HAVE_SCHED_RR_GET_INTERVAL = "0"
	HAVE_SCHED_SETAFFINITY = "0"
	HAVE_SCHED_SETPARAM = "0"
	HAVE_SCHED_SETSCHEDULER = "0"
	HAVE_SEM_GETVALUE = "1"
	HAVE_SEM_OPEN = "1"
	HAVE_SEM_TIMEDWAIT = "0"
	HAVE_SEM_UNLINK = "1"
	HAVE_SENDFILE = "1"
	HAVE_SETEGID = "1"
	HAVE_SETEUID = "1"
	HAVE_SETGID = "1"
	HAVE_SETGROUPS = "1"
	HAVE_SETHOSTNAME = "1"
	HAVE_SETITIMER = "1"
	HAVE_SETLOCALE = "1"
	HAVE_SETPGID = "1"
	HAVE_SETPGRP = "1"
	HAVE_SETPRIORITY = "1"
	HAVE_SETREGID = "1"
	HAVE_SETRESGID = "0"
	HAVE_SETRESUID = "0"
	HAVE_SETREUID = "1"
	HAVE_SETSID = "1"
	HAVE_SETUID = "1"
	HAVE_SETVBUF = "1"
	HAVE_SF_HDTR = "1"
	HAVE_SHADOW_H = "0"
	HAVE_SHM_OPEN = "1"
	HAVE_SHM_UNLINK = "1"
	HAVE_SIGACTION = "1"
	HAVE_SIGALTSTACK = "1"
	HAVE_SIGFILLSET = "1"
	HAVE_SIGINFO_T_SI_BAND = "1"
	HAVE_SIGINTERRUPT = "1"
	HAVE_SIGNAL_H = "1"
	HAVE_SIGPENDING = "1"
	HAVE_SIGRELSE = "1"
	HAVE_SIGTIMEDWAIT = "0"
	HAVE_SIGWAIT = "1"
	HAVE_SIGWAITINFO = "0"
	HAVE_SNPRINTF = "1"
	HAVE_SOCKADDR_ALG = "0"
	HAVE_SOCKADDR_SA_LEN = "1"
	HAVE_SOCKADDR_STORAGE = "1"
	HAVE_SOCKETPAIR = "1"
	HAVE_SPAWN_H = "1"
	HAVE_SSIZE_T = "1"
	HAVE_STATVFS = "1"
	HAVE_STAT_TV_NSEC = "0"
	HAVE_STAT_TV_NSEC2 = "1"
	HAVE_STDARG_PROTOTYPES = "1"
	HAVE_STDINT_H = "1"
	HAVE_STDLIB_H = "1"
	HAVE_STD_ATOMIC = "1"
	HAVE_STRDUP = "1"
	HAVE_STRFTIME = "1"
	HAVE_STRINGS_H = "1"
	HAVE_STRING_H = "1"
	HAVE_STRLCPY = "1"
	HAVE_STROPTS_H = "0"
	HAVE_STRSIGNAL = "1"
	HAVE_STRUCT_PASSWD_PW_GECOS = "1"
	HAVE_STRUCT_PASSWD_PW_PASSWD = "1"
	HAVE_STRUCT_STAT_ST_BIRTHTIME = "1"
	HAVE_STRUCT_STAT_ST_BLKSIZE = "1"
	HAVE_STRUCT_STAT_ST_BLOCKS = "1"
	HAVE_STRUCT_STAT_ST_FLAGS = "1"
	HAVE_STRUCT_STAT_ST_GEN = "1"
	HAVE_STRUCT_STAT_ST_RDEV = "1"
	HAVE_STRUCT_TM_TM_ZONE = "1"
	HAVE_SYMLINK = "1"
	HAVE_SYMLINKAT = "1"
	HAVE_SYNC = "1"
	HAVE_SYSCONF = "1"
	HAVE_SYSEXITS_H = "1"
	HAVE_SYS_AUDIOIO_H = "0"
	HAVE_SYS_BSDTTY_H = "0"
	HAVE_SYS_DEVPOLL_H = "0"
	HAVE_SYS_DIR_H = "0"
	HAVE_SYS_ENDIAN_H = "0"
	HAVE_SYS_EPOLL_H = "0"
	HAVE_SYS_EVENT_H = "1"
	HAVE_SYS_FILE_H = "1"
	HAVE_SYS_IOCTL_H = "1"
	HAVE_SYS_KERN_CONTROL_H = "1"
	HAVE_SYS_LOADAVG_H = "0"
	HAVE_SYS_LOCK_H = "1"
	HAVE_SYS_MEMFD_H = "0"
	HAVE_SYS_MKDEV_H = "0"
	HAVE_SYS_MMAN_H = "1"
	HAVE_SYS_MODEM_H = "0"
	HAVE_SYS_NDIR_H = "0"
	HAVE_SYS_PARAM_H = "1"
	HAVE_SYS_POLL_H = "1"
	HAVE_SYS_RANDOM_H = "1"
	HAVE_SYS_RESOURCE_H = "1"
	HAVE_SYS_SELECT_H = "1"
	HAVE_SYS_SENDFILE_H = "0"
	HAVE_SYS_SOCKET_H = "1"
	HAVE_SYS_STATVFS_H = "1"
	HAVE_SYS_STAT_H = "1"
	HAVE_SYS_SYSCALL_H = "1"
	HAVE_SYS_SYSMACROS_H = "0"
	HAVE_SYS_SYS_DOMAIN_H = "1"
	HAVE_SYS_TERMIO_H = "0"
	HAVE_SYS_TIMES_H = "1"
	HAVE_SYS_TIME_H = "1"
	HAVE_SYS_TYPES_H = "1"
	HAVE_SYS_UIO_H = "1"
	HAVE_SYS_UN_H = "1"
	HAVE_SYS_UTSNAME_H = "1"
	HAVE_SYS_WAIT_H = "1"
	HAVE_SYS_XATTR_H = "1"
	HAVE_TCGETPGRP = "1"
	HAVE_TCSETPGRP = "1"
	HAVE_TEMPNAM = "1"
	HAVE_TERMIOS_H = "1"
	HAVE_TERM_H = "1"
	HAVE_TGAMMA = "1"
	HAVE_TIMEGM = "1"
	HAVE_TIMES = "1"
	HAVE_TMPFILE = "1"
	HAVE_TMPNAM = "1"
	HAVE_TMPNAM_R = "0"
	HAVE_TM_ZONE = "1"
	HAVE_TRUNCATE = "1"
	HAVE_TZNAME = "0"
	HAVE_UCS4_TCL = "0"
	HAVE_UNAME = "1"
	HAVE_UNISTD_H = "1"
	HAVE_UNLINKAT = "1"
	HAVE_UNSETENV = "1"
	HAVE_USABLE_WCHAR_T = "1"
	HAVE_UTIL_H = "1"
	HAVE_UTIMENSAT = "1"
	HAVE_UTIMES = "1"
	HAVE_UTIME_H = "1"
	HAVE_UUID_CREATE = "0"
	HAVE_UUID_ENC_BE = "0"
	HAVE_UUID_GENERATE_TIME_SAFE = "0"
	HAVE_UUID_H = "0"
	HAVE_UUID_UUID_H = "1"
	HAVE_WAIT3 = "1"
	HAVE_WAIT4 = "1"
	HAVE_WAITID = "1"
	HAVE_WAITPID = "1"
	HAVE_WCHAR_H = "1"
	HAVE_WCSCOLL = "1"
	HAVE_WCSFTIME = "1"
	HAVE_WCSXFRM = "1"
	HAVE_WMEMCMP = "1"
	HAVE_WORKING_TZSET = "1"
	HAVE_WRITEV = "1"
	HAVE_X509_VERIFY_PARAM_SET1_HOST = "1"
	HAVE_ZLIB_COPY = "1"
	HAVE__GETPTY = "0"
	HOST_GNU_TYPE = "x86_64-apple-darwin"
	INCLDIRSTOMAKE = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers/internal /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers"
	INCLUDEDIR = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include"
	INCLUDEPY = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers"
	INSTALL = "/usr/bin/install -c"
	INSTALL_DATA = "/usr/bin/install -c -m 644"
	INSTALL_PROGRAM = "/usr/bin/install -c"
	INSTALL_SCRIPT = "/usr/bin/install -c"
	INSTALL_SHARED = "/usr/bin/install -c -m 755"
	INSTSONAME = "Python3.framework/Versions/3.8/Python3"
	IO_H = "Modules/_io/_iomodule.h"
	IO_OBJS = "\"
	IPHONEOS_DEPLOYMENT_TARGET = ""
	LDCXXSHARED = "clang++ -bundle -undefined dynamic_lookup"
	LDFLAGS = "-Wl,-headerpad,0x1000 -arch arm64 -arch x86_64"
	LDFLAGS_NODIST = ""
	LDLIBRARY = "Python3.framework/Versions/3.8/Python3"
	LDLIBRARYDIR = ""
	LDSHARED = "clang -bundle -undefined dynamic_lookup -Wl,-headerpad,0x1000 -arch arm64 -arch x86_64"
	LDVERSION = "3.8"
	LIBC = ""
	LIBDEST = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8"
	LIBDIR = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib"
	LIBFFI_INCLUDEDIR = ""
	LIBM = ""
	LIBOBJDIR = "Python/"
	LIBOBJS = ""
	LIBPC = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/pkgconfig"
	LIBPL = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/config-3.8-darwin"
	LIBPYTHON = ""
	LIBRARY = "libpython3.8.a"
	LIBRARY_OBJS = "\"
	LIBRARY_OBJS_OMIT_FROZEN = "\"
	LIBS = "-ldl -lSystem  -framework CoreFoundation"
	LIBSUBDIRS = "tkinter tkinter/test tkinter/test/test_tkinter \"
	LIBTESTDEST = "/AppleInternal/Tests/Python/3.8/"
	LIBZIPDEST = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python$(subst .,,3.8).zip"
	LINKCC = "clang"
	LINKFORSHARED = "-Wl,-stack_size,1000000  -framework CoreFoundation Python3.framework/Versions/3.8/Python3"
	LIPO_32BIT_FLAGS = ""
	LLVM_PROF_ERR = "no"
	LLVM_PROF_FILE = "LLVM_PROFILE_FILE="code-%p.profclangr""
	LLVM_PROF_MERGER = "/usr/bin/xcrun llvm-profdata merge -output=code.profclangd *.profclangr"
	LN = "ln"
	LOCALMODLIBS = ""
	MACHDEP = "darwin"
	MACHDEP_OBJS = ""
	MACHDESTLIB = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8"
	MACOSX_DEPLOYMENT_TARGET = "10.14.6"
	MAINCC = "clang"
	MAJOR_IN_MKDEV = "0"
	MAJOR_IN_SYSMACROS = "0"
	MAKESETUP = "/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Modules/makesetup"
	MANDIR = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/share/man"
	MKDIR_P = "/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/install-sh -c -d"
	MODBUILT_NAMES = "posix  errno  pwd  _sre  _codecs  _weakref  _functools  _operator  _collections  _abc  itertools  atexit  _signal  _stat  time  _thread  _locale  _io  faulthandler  _tracemalloc  _symtable  xxsubtype"
	MODDISABLED_NAMES = ""
	MODLIBS = ""
	MODOBJS = "Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/_operator.o  Modules/_collectionsmodule.o  Modules/_abc.o  Modules/itertoolsmodule.o  Modules/atexitmodule.o  Modules/signalmodule.o  Modules/_stat.o  Modules/timemodule.o  Modules/_threadmodule.o  Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/faulthandler.o  Modules/_tracemalloc.o Modules/hashtable.o  Modules/symtablemodule.o  Modules/xxsubtype.o"
	MODULE_OBJS = "\"
	MULTIARCH = "darwin"
	MULTIARCH_CPPFLAGS = "-DMULTIARCH=\"darwin\""
	MVWDELCH_IS_EXPRESSION = "1"
	NO_AS_NEEDED = ""
	OBJECT_OBJS = "\"
	OPENSSL_INCLUDES = "-I/AppleInternal/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk/usr/local/libressl-2.8/include"
	OPENSSL_LDFLAGS = "-L/AppleInternal/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk/usr/local/libressl-2.8/lib -F/AppleInternal/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk/System/Library/PrivateFrameworks"
	OPENSSL_LIBS = "-lssl -lcrypto -framework TrustEvaluationAgent"
	OPT = "-DNDEBUG -g -fwrapv -O3 -Wall"
	OTHER_LIBTOOL_OPT = ""
	PACKAGE_BUGREPORT = "0"
	PACKAGE_NAME = "0"
	PACKAGE_STRING = "0"
	PACKAGE_TARNAME = "0"
	PACKAGE_URL = "0"
	PACKAGE_VERSION = "0"
	PARSER_HEADERS = "\"
	PARSER_OBJS = "\ Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o"
	PGO_PROF_GEN_FLAG = "-fprofile-instr-generate"
	PGO_PROF_USE_FLAG = "-fprofile-instr-use=code.profclangd"
	POBJS = "\"
	POSIX_SEMAPHORES_NOT_ENABLED = "0"
	PROFILE_TASK = "-m test --pgo"
	PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT = "0"
	PTHREAD_SYSTEM_SCHED_SUPPORTED = "1"
	PURIFY = ""
	PY3LIBRARY = ""
	PYLONG_BITS_IN_DIGIT = "0"
	PYTHON = "python"
	PYTHONFRAMEWORK = "Python3"
	PYTHONFRAMEWORKDIR = "Python3.framework"
	PYTHONFRAMEWORKINSTALLDIR = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework"
	PYTHONFRAMEWORKPREFIX = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks"
	PYTHONPATH = ""
	PYTHON_FOR_BUILD = "./python.exe -E"
	PYTHON_FOR_REGEN = "python3"
	PYTHON_HEADERS = "\"
	PYTHON_OBJS = "\"
	PY_BUILTIN_MODULE_CFLAGS = "-g -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include/internal -IObjects -IInclude -IPython -I. -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -fvisibility=hidden -DPy_BUILD_SHARED -DPy_BUILD_CORE_BUILTIN"
	PY_CFLAGS = "-Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64"
	PY_CFLAGS_NODIST = "-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include/internal"
	PY_COERCE_C_LOCALE = "1"
	PY_CORE_CFLAGS = "-g -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include/internal -IObjects -IInclude -IPython -I. -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -fvisibility=hidden -DPy_BUILD_SHARED -DPy_BUILD_CORE"
	PY_CORE_LDFLAGS = "-Wl,-headerpad,0x1000 -arch arm64 -arch x86_64"
	PY_CPPFLAGS = "-IObjects -IInclude -IPython -I. -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64"
	PY_FORMAT_SIZE_T = ""z""
	PY_LDFLAGS = "-Wl,-headerpad,0x1000 -arch arm64 -arch x86_64"
	PY_LDFLAGS_NODIST = ""
	PY_SSL_DEFAULT_CIPHERS = "1"
	PY_SSL_DEFAULT_CIPHER_STRING = "0"
	PY_STDMODULE_CFLAGS = "-Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include/internal -IObjects -IInclude -IPython -I. -I/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Include -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -fvisibility=hidden -DPy_BUILD_SHARED"
	Py_DEBUG = "0"
	Py_ENABLE_SHARED = "0"
	Py_HASH_ALGORITHM = "0"
	Py_TRACE_REFS = "0"
	QUICKTESTOPTS = "-x test_subprocess test_io test_lib2to3 \"
	READELF = ":"
	RESSRCDIR = "Mac/Resources/framework"
	RETSIGTYPE = "void"
	RUNSHARED = "DYLD_FRAMEWORK_PATH=/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects/host:/AppleInternal/XBS/Bundles/XBS.bundle/Contents/Frameworks DYLD_LIBRARY_PATH=/libressl/ssl/.libs:/libressl/crypto/.libs"
	SCRIPTDIR = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib"
	SDKROOT = "/AppleInternal/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk"
	SETPGRP_HAVE_ARG = "0"
	SGI_ABI = "@SGI_ABI@"
	SHELL = "/bin/sh"
	SHLIBS = "-ldl -lSystem  -framework CoreFoundation"
	SHLIB_SUFFIX = ".so"
	SHM_NEEDS_LIBRT = "0"
	SIGNED_RIGHT_SHIFT_ZERO_FILLS = "1"
	SITEPATH = ""
	SIZEOF_DOUBLE = "8"
	SIZEOF_FLOAT = "4"
	SIZEOF_FPOS_T = "8"
	SIZEOF_INT = "4"
	SIZEOF_LONG = "8"
	SIZEOF_LONG_DOUBLE = "16"
	SIZEOF_LONG_LONG = "8"
	SIZEOF_OFF_T = "8"
	SIZEOF_PID_T = "4"
	SIZEOF_PTHREAD_KEY_T = "8"
	SIZEOF_PTHREAD_T = "8"
	SIZEOF_SHORT = "2"
	SIZEOF_SIZE_T = "8"
	SIZEOF_TIME_T = "8"
	SIZEOF_UINTPTR_T = "8"
	SIZEOF_VOID_P = "8"
	SIZEOF_WCHAR_T = "4"
	SIZEOF__BOOL = "1"
	SO = ".cpython-38-darwin.so"
	SOABI = "cpython-38-darwin"
	SRCDIRS = "Parser Objects Python Modules Modules/_io Programs"
	SRC_GDB_HOOKS = "/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Tools/gdb/libpython.py"
	STDC_HEADERS = "1"
	STRICT_SYSV_CURSES = "/* Don't use ncurses extensions */"
	STRIPFLAG = "-s"
	SUBDIRS = ""
	SUBDIRSTOO = "Include Lib Misc"
	SYSLIBS = ""
	SYS_SELECT_WITH_SYS_TIME = "1"
	TARGET_OS_EMBEDDED = "0"
	TCLTK_INCLUDES = ""
	TCLTK_LIBS = ""
	TESTOPTS = ""
	TESTPATH = ""
	TESTPYTHON = "DYLD_FRAMEWORK_PATH=/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects/host:/AppleInternal/XBS/Bundles/XBS.bundle/Contents/Frameworks DYLD_LIBRARY_PATH=/libressl/ssl/.libs:/libressl/crypto/.libs ./python.exe"
	TESTPYTHONOPTS = ""
	TESTRUNNER = "DYLD_FRAMEWORK_PATH=/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects/host:/AppleInternal/XBS/Bundles/XBS.bundle/Contents/Frameworks DYLD_LIBRARY_PATH=/libressl/ssl/.libs:/libressl/crypto/.libs ./python.exe /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Tools/scripts/run_tests.py"
	TESTTIMEOUT = "1200"
	TIMEMODULE_LIB = "0"
	TIME_WITH_SYS_TIME = "1"
	TM_IN_SYS_TIME = "0"
	TRAIN_STYLE_DT = "1"
	TVOS_DEPLOYMENT_TARGET = ""
	UNICODE_DEPS = "\"
	UNIVERSALSDK = ""
	UPDATE_FILE = "python3 /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python/Tools/scripts/update_file.py"
	USE_COMPUTED_GOTOS = "0"
	VERSION = "3.8"
	VPATH = "/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python"
	WATCHOS_DEPLOYMENT_TARGET = ""
	WINDOW_HAS_FLAGS = "1"
	WITH_DOC_STRINGS = "1"
	WITH_DTRACE = "0"
	WITH_DYLD = "1"
	WITH_LIBINTL = "0"
	WITH_NEXT_FRAMEWORK = "1"
	WITH_PYMALLOC = "1"
	WITH_VALGRIND = "0"
	X87_DOUBLE_ROUNDING = "0"
	XMLLIBSUBDIRS = "xml xml/dom xml/etree xml/parsers xml/sax"
	ZIPSTDLIB = "no"
	abiflags = ""
	abs_builddir = "/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Binaries/python3/install/TempContent/Objects/host"
	abs_srcdir = "/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-73.40.6/Python"
	base = "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8"
	datarootdir = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/share"
	exec_prefix = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8"
	installed_base = "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8"
	installed_platbase = "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8"
	platbase = "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8"
	prefix = "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8"
	projectbase = "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin"
	py_version = "3.8.2"
	py_version_nodot = "38"
	py_version_short = "3.8"
	srcdir = "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/config-3.8-darwin"
	userbase = "/Users/pradyunsg/Library/Python/3.8"

@uranusjr
Copy link
Member Author

uranusjr commented Apr 25, 2021

Current installation scheme: "osx_framework_library"

Ah, so macOS is doing the same thing as Debian, inventing its own scheme. This explains things. We’ll need yet another special case in the prefix scheme selection logic.

Could you verify import sysconfig; print(sysconfig.get_paths('posix_prefix')) outputs the “incorrect” /Library/Developer/CommandLineTools?

It’d be awesome to print(sysconfig.get_scheme_names()) as well to make sure if there’s any other custom schemes we need to cover.

@uranusjr uranusjr removed the state: blocked Can not be done until something else is done label Apr 25, 2021
@rotu
Copy link

rotu commented Apr 26, 2021

I get basically the same as #9839 (comment)

I noticed that the developer paths are mentioned by the system python. So removing them and trying to launch python3 shows this window:
Screen Shot 2021-04-25 at 20 52 59

So the system python is actually just a stub.

import sysconfig; pprint(sysconfig.get_paths('posix_prefix'))

{'data': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8',
 'include': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8',
 'platinclude': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8',
 'platlib': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages',
 'platstdlib': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8',
 'purelib': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages',
 'scripts': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin',
 'stdlib': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8'}

pprint(sysconfig.get_scheme_names())

('nt',
 'nt_user',
 'osx_framework_library',
 'osx_framework_user',
 'posix_home',
 'posix_prefix',
 'posix_user')

pprint(sysconfig.get_paths('osx_framework_library'))

{'data': '/Library/Python/3.8',
 'include': '/Library/Python/3.8/include',
 'platinclude': '/Library/Python/3.8/include',
 'platlib': '/Library/Python/3.8/site-packages',
 'platstdlib': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8',
 'purelib': '/Library/Python/3.8/site-packages',
 'scripts': '/usr/local/bin',
 'stdlib': '/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8'}

pprint(sysconfig.get_paths('osx_framework_user'))

{'data': '/Users/dan/Library/Python/3.8',
 'include': '/Users/dan/Library/Python/3.8/include',
 'platlib': '/Users/dan/Library/Python/3.8/lib/python/site-packages',
 'platstdlib': '/Users/dan/Library/Python/3.8/lib/python',
 'purelib': '/Users/dan/Library/Python/3.8/lib/python/site-packages',
 'scripts': '/Users/dan/Library/Python/3.8/bin',
 'stdlib': '/Users/dan/Library/Python/3.8/lib/python'}

On my system, /Library/Python/2.7 exists but /Library/Python/3.8 does not (unless I sudo /usr/bin/python -m pip install)

@uranusjr
Copy link
Member Author

On further inspection, I think this patch does not affect anything meaningfully and am going to close without merging. Introducing osx_framework_user and osx_framework_library will cover all scheme selection for macOS Python installations in /Library.

@uranusjr uranusjr closed this Apr 26, 2021
@sbidoul sbidoul removed this from the 21.1.1 milestone Apr 26, 2021
@uranusjr
Copy link
Member Author

uranusjr commented May 4, 2021

I’ve posted to Homebrew/discussions#1405 to inform Homebrew about the issue. (Not on the issue tracker since they seem to be very strict about limiting its usage to bugs.)

@uranusjr uranusjr deleted the sysconfig-allow-samefile branch May 4, 2021 07:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants