| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b44aceb commit c4b53af
10 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,6 @@ Doc/venv/ | |||
| 21 | 21 | Lib/distutils/command/*.pdb | |
| 22 | 22 | Lib/lib2to3/*.pickle | |
| 23 | 23 | Lib/test/data/* | |
| 24 | - Lib/plat-mac/errors.rsrc.df.rsrc | ||
| 25 | 24 | Makefile | |
| 26 | 25 | Makefile.pre | |
| 27 | 26 | Misc/python.pc | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,6 @@ python-config$ | |||
| 26 | 26 | python-config.py$ | |
| 27 | 27 | reflog.txt$ | |
| 28 | 28 | tags$ | |
| 29 | - Lib/plat-mac/errors.rsrc.df.rsrc | ||
| 30 | 29 | Misc/python.pc | |
| 31 | 30 | Misc/python-config.sh$ | |
| 32 | 31 | Modules/Setup$ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -341,6 +341,15 @@ def get_makefile_filename(): | |||
| 341 | 341 | config_dir_name += '-%s' % sys.implementation._multiarch | |
| 342 | 342 | return os.path.join(get_path('stdlib'), config_dir_name, 'Makefile') | |
| 343 | 343 | ||
| 344 | + | ||
| 345 | + def _get_sysconfigdata_name(): | ||
| 346 | + return '_sysconfigdata_{abi}_{platform}_{multiarch}'.format( | ||
| 347 | + abi=sys.abiflags, | ||
| 348 | + platform=sys.platform, | ||
| 349 | + multiarch=getattr(sys.implementation, '_multiarch', ''), | ||
| 350 | + ) | ||
| 351 | + | ||
| 352 | + | ||
| 344 | 353 | def _generate_posix_vars(): | |
| 345 | 354 | """Generate the Python module containing build-time variables.""" | |
| 346 | 355 | import pprint | |
@@ -381,7 +390,7 @@ def _generate_posix_vars(): | |||
| 381 | 390 | # _sysconfigdata module manually and populate it with the build vars. | |
| 382 | 391 | # This is more than sufficient for ensuring the subsequent call to | |
| 383 | 392 | # get_platform() succeeds. | |
| 384 | - name = '_sysconfigdata_' + sys.abiflags | ||
| 393 | + name = _get_sysconfigdata_name() | ||
| 385 | 394 | if 'darwin' in sys.platform: | |
| 386 | 395 | import types | |
| 387 | 396 | module = types.ModuleType(name) | |
@@ -407,7 +416,7 @@ def _generate_posix_vars(): | |||
| 407 | 416 | def _init_posix(vars): | |
| 408 | 417 | """Initialize the module as appropriate for POSIX systems.""" | |
| 409 | 418 | # _sysconfigdata is generated at build time, see _generate_posix_vars() | |
| 410 | - name = '_sysconfigdata_' + sys.abiflags | ||
| 419 | + name = _get_sysconfigdata_name() | ||
| 411 | 420 | _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0) | |
| 412 | 421 | build_time_vars = _temp.build_time_vars | |
| 413 | 422 | vars.update(build_time_vars) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1292,7 +1292,8 @@ def buildPython(): | |||
| 1292 | 1292 | ||
| 1293 | 1293 | import pprint | |
| 1294 | 1294 | if getVersionMajorMinor() >= (3, 6): | |
| 1295 | - path = os.path.join(path_to_lib, 'plat-darwin', '_sysconfigdata_m.py') | ||
| 1295 | + # XXX this is extra-fragile | ||
| 1296 | + path = os.path.join(path_to_lib, '_sysconfigdata_m_darwin_darwin.py') | ||
| 1296 | 1297 | else: | |
| 1297 | 1298 | path = os.path.join(path_to_lib, '_sysconfigdata.py') | |
| 1298 | 1299 | fp = open(path, 'r') | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1178,8 +1178,6 @@ maninstall: altmaninstall | |||
| 1178 | 1178 | (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python3.1) | |
| 1179 | 1179 | ||
| 1180 | 1180 | # Install the library | |
| 1181 | - PLATDIR= @PLATDIR@ | ||
| 1182 | - MACHDEPS= $(PLATDIR) | ||
| 1183 | 1181 | XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax | |
| 1184 | 1182 | LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ | |
| 1185 | 1183 | tkinter/test/test_ttk site-packages test \ | |
@@ -1238,8 +1236,8 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ | |||
| 1238 | 1236 | multiprocessing multiprocessing/dummy \ | |
| 1239 | 1237 | unittest unittest/test unittest/test/testmock \ | |
| 1240 | 1238 | venv venv/scripts venv/scripts/posix \ | |
| 1241 | - curses pydoc_data $(MACHDEPS) | ||
| 1242 | - libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c | ||
| 1239 | + curses pydoc_data | ||
| 1240 | + libinstall: build_all $(srcdir)/Modules/xxmodule.c | ||
| 1243 | 1241 | @for i in $(SCRIPTDIR) $(LIBDEST); \ | |
| 1244 | 1242 | do \ | |
| 1245 | 1243 | if test ! -d $(DESTDIR)$$i; then \ | |
@@ -1294,10 +1292,10 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c | |||
| 1294 | 1292 | esac; \ | |
| 1295 | 1293 | done; \ | |
| 1296 | 1294 | done | |
| 1297 | - $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS).py \ | ||
| 1298 | - $(DESTDIR)$(LIBDEST)/$(PLATDIR); \ | ||
| 1295 | + $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \ | ||
| 1296 | + $(DESTDIR)$(LIBDEST); \ | ||
| 1299 | 1297 | echo $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS).py \ | |
| 1300 | - $(LIBDEST)/$(PLATDIR) | ||
| 1298 | + $(LIBDEST) | ||
| 1301 | 1299 | $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt | |
| 1302 | 1300 | if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ | |
| 1303 | 1301 | $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ | |
@@ -1335,9 +1333,6 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c | |||
| 1335 | 1333 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | |
| 1336 | 1334 | $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt | |
| 1337 | 1335 | ||
| 1338 | - $(srcdir)/Lib/$(PLATDIR): | ||
| 1339 | - mkdir $(srcdir)/Lib/$(PLATDIR) | ||
| 1340 | - | ||
| 1341 | 1336 | python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh | |
| 1342 | 1337 | # Substitution happens here, as the completely-expanded BINDIR | |
| 1343 | 1338 | # is not available in configure | |
@@ -1614,9 +1609,6 @@ clobber: clean profile-removal | |||
| 1614 | 1609 | -rm -rf build platform | |
| 1615 | 1610 | -rm -rf $(PYTHONFRAMEWORKDIR) | |
| 1616 | 1611 | -rm -f python-config.py python-config | |
| 1617 | - if [ -n "$(MULTIARCH)" ]; then \ | ||
| 1618 | - rm -rf $(srcdir)/Lib/$(PLATDIR); \ | ||
| 1619 | - fi | ||
| 1620 | 1612 | ||
| 1621 | 1613 | # Make things extra clean, before making a distribution: | |
| 1622 | 1614 | # remove all generated files, even Makefile[.pre] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,8 @@ What's New in Python 3.6.0 beta 1 | |||
| 10 | 10 | Core and Builtins | |
| 11 | 11 | ----------------- | |
| 12 | 12 | ||
| 13 | + - Issue #28046: Remove platform-specific directories from sys.path. | ||
| 14 | + | ||
| 13 | 15 | - Issue #25758: Prevents zipimport from unnecessarily encoding a filename | |
| 14 | 16 | (patch by Eryk Sun) | |
| 15 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,15 +26,15 @@ | |||
| 26 | 26 | is set, we believe it. Otherwise, we use the path of our host .EXE's | |
| 27 | 27 | to try and locate on of our "landmarks" and deduce our home. | |
| 28 | 28 | - If we DO have a Python Home: The relevant sub-directories (Lib, | |
| 29 | - plat-win, etc) are based on the Python Home | ||
| 29 | + DLLs, etc) are based on the Python Home | ||
| 30 | 30 | - If we DO NOT have a Python Home, the core Python Path is | |
| 31 | 31 | loaded from the registry. This is the main PythonPath key, | |
| 32 | 32 | and both HKLM and HKCU are combined to form the path) | |
| 33 | 33 | ||
| 34 | 34 | * Iff - we can not locate the Python Home, have not had a PYTHONPATH | |
| 35 | 35 | specified, and can't locate any Registry entries (ie, we have _nothing_ | |
| 36 | 36 | we can assume is a good path), a default path with relative entries is | |
| 37 | - used (eg. .\Lib;.\plat-win, etc) | ||
| 37 | + used (eg. .\Lib;.\DLLs, etc) | ||
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | 40 | If a sys.path file exists adjacent to python.exe, it must contain a | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,8 +67,6 @@ def include_in_lib(p): | |||
| 67 | 67 | if p.is_dir(): | |
| 68 | 68 | if name in EXCLUDE_FROM_LIBRARY: | |
| 69 | 69 | return False | |
| 70 | - if name.startswith('plat-'): | ||
| 71 | - return False | ||
| 72 | 70 | if name == 'test' and p.parts[-2].lower() == 'lib': | |
| 73 | 71 | return False | |
| 74 | 72 | if name in {'test', 'tests'} and p.parts[-3].lower() == 'lib': | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -712,7 +712,6 @@ EGREP | |||
| 712 | 712 | NO_AS_NEEDED | |
| 713 | 713 | MULTIARCH_CPPFLAGS | |
| 714 | 714 | PLATFORM_TRIPLET | |
| 715 | - PLATDIR | ||
| 716 | 715 | MULTIARCH | |
| 717 | 716 | ac_ct_CXX | |
| 718 | 717 | MAINCC | |
@@ -2929,7 +2928,7 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; } | |||
| 2929 | 2928 | fi | |
| 2930 | 2929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 | |
| 2931 | 2930 | $as_echo "$interp" >&6; } | |
| 2932 | - PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp | ||
| 2931 | + PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib '$interp | ||
| 2933 | 2932 | fi | |
| 2934 | 2933 | # Used to comment out stuff for rebuilding generated files | |
| 2935 | 2934 | GENERATED_COMMENT='#' | |
@@ -5361,12 +5360,6 @@ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then | |||
| 5361 | 5360 | elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then | |
| 5362 | 5361 | MULTIARCH=$PLATFORM_TRIPLET | |
| 5363 | 5362 | fi | |
| 5364 | - if test x$PLATFORM_TRIPLET = x; then | ||
| 5365 | - PLATDIR=plat-$MACHDEP | ||
| 5366 | - else | ||
| 5367 | - PLATDIR=plat-$PLATFORM_TRIPLET | ||
| 5368 | - fi | ||
| 5369 | - | ||
| 5370 | 5363 | ||
| 5371 | 5364 | if test x$MULTIARCH != x; then | |
| 5372 | 5365 | MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\"" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,7 +78,7 @@ if test "$cross_compiling" = yes; then | |||
| 78 | 78 | AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) | |
| 79 | 79 | fi | |
| 80 | 80 | AC_MSG_RESULT($interp) | |
| 81 | - PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp | ||
| 81 | + PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib '$interp | ||
| 82 | 82 | fi | |
| 83 | 83 | # Used to comment out stuff for rebuilding generated files | |
| 84 | 84 | GENERATED_COMMENT='#' | |
@@ -910,12 +910,6 @@ if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then | |||
| 910 | 910 | elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then | |
| 911 | 911 | MULTIARCH=$PLATFORM_TRIPLET | |
| 912 | 912 | fi | |
| 913 | - if test x$PLATFORM_TRIPLET = x; then | ||
| 914 | - PLATDIR=plat-$MACHDEP | ||
| 915 | - else | ||
| 916 | - PLATDIR=plat-$PLATFORM_TRIPLET | ||
| 917 | - fi | ||
| 918 | - AC_SUBST(PLATDIR) | ||
| 919 | 913 | AC_SUBST(PLATFORM_TRIPLET) | |
| 920 | 914 | if test x$MULTIARCH != x; then | |
| 921 | 915 | MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\"" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments