summaryrefslogtreecommitdiffstats
path: root/Lib/sysconfig.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41282: Fix broken `make install` (GH-26329)Petr Viktorin2021-05-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous commit broke a check in sysconfig when building cpython itself. This caused builds of the standard library modules to search a wrong location (the installed location rather than the source directory) for header files with the net effect that a ``make install`` incorrectly caused all extension modules to be rebuilt again and with incorrect include file paths. When building Python, we need two distinct "include" directories: - source .h files - install target for .h files Note that this doesn't matter except when building Python from source. Historically: - source .h files were in the distutils scheme under 'include' - the install directory was in the distutils.command.install scheme under 'headers' GH-24549 merged these; sysconfig is now the single source of truth and distutils is derived from it. This commit introduces a "secret" scheme path, 'headers', which contains the install target. It is only present when building Python. The distutils code uses it if present, and falls back to 'include'. Co-authored-by: Ned Deily <nad@python.org>
* bpo-43312: Functions returning default and preferred sysconfig schemes ↵Tzu-ping Chung2021-04-271-33/+57
| | | | (GH-24644)
* bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation ↵Lumír 'Frenzy' Balhar2021-04-231-10/+40
| | | | | | | | | | of the PEP) (GH-23142) This change: * merges `distutils.sysconfig` into `sysconfig` while keeping the original functionality and * marks `distutils.sysconfig` as deprecated https://bugs.python.org/issue41282
* bpo-41282: (PEP 632) Load install schemes from sysconfig (GH-24549)Lumír 'Frenzy' Balhar2021-04-141-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, `distutils.command.install.INSTALL_SCHEMES` are loaded from `sysconfig._INSTALL_SCHEMES`. The distutils module is deprecated and will be removed in 3.12 (PEP 632). This change makes the `sysconfig._INSTALL_SCHEMES` the single point of truth for install schemes while keeping `distutils.command.install.INSTALL_SCHEMES` exactly the same. If we, during the transition to the sysconfig, change something, this makes sure that it also propagates to distutils until the module gets removed. Moreover, as discussed [on Discourse], Linux distros need to patch distutils/sysconfig to make sure the packages will land in proper locations. This patch makes it easier because it leaves only one location where install schemes are defined which is much easier to patch/adjust. [on Discourse]: https://discuss.python.org/t/pep-632-deprecate-distutils-module/5134 The implementation is slightly different than the plan but I think it's the easiest way how to do it and it also makes the downstream patch simple, flexible and easy to maintain. It's also necessary to implement this before setuptools starts bundling the distutils module so the default install schemes stay in the standard library. The removed code from sysconfig does not seem to have any negative effect because, honestly, it seems that nothing actually uses the install schemes from sysconfig at all. There were many big changes in these modules where they were trying to include packaging in stdlib and then reverted that. Also, the test of distutils install command does not count with the different locations which is good evidence that the reason to have this piece of code is no longer valid. https://bugs.python.org/issue41282
* bpo-43651: Fix EncodingWarning in sysconfig (GH-25192)Inada Naoki2021-04-061-2/+3
|
* bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a ↵Ronald Oussoren2021-02-011-0/+12
| | | | | string (GH-24341) * bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string
* bpo-31904: Fix site and sysconfig modules for VxWorks RTOS (GH-21821)pxinwr2020-12-201-51/+64
|
* bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match ↵Matti Picus2020-12-071-1/+2
| | | | distutils (GH-22088)
* bpo-41627: Distinguish 32 and 64-bit user site packages on Windows (GH-22098)Steve Dower2020-09-041-9/+13
| | | Also fixes the error message returned when sysconfig fails to interpolate a variable correctly.
* bpo-40503: PEP 615: Tests and implementation for zoneinfo (GH-19909)Paul Ganssle2020-05-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial implementation of PEP 615, the zoneinfo module, ported from the standalone reference implementation (see https://www.python.org/dev/peps/pep-0615/#reference-implementation for a link, which has a more detailed commit history). This includes (hopefully) all functional elements described in the PEP, but documentation is found in a separate PR. This includes: 1. A pure python implementation of the ZoneInfo class 2. A C accelerated implementation of the ZoneInfo class 3. Tests with 100% branch coverage for the Python code (though C code coverage is less than 100%). 4. A compile-time configuration option on Linux (though not on Windows) Differences from the reference implementation: - The module is arranged slightly differently: the accelerated module is `_zoneinfo` rather than `zoneinfo._czoneinfo`, which also necessitates some changes in the test support function. (Suggested by Victor Stinner and Steve Dower.) - The tests are arranged slightly differently and do not include the property tests. The tests live at test/test_zoneinfo/test_zoneinfo.py rather than test/test_zoneinfo.py or test/test_zoneinfo/__init__.py because we may do some refactoring in the future that would likely require this separation anyway; we may: - include the property tests - automatically run all the tests against both pure Python and C, rather than manually constructing C and Python test classes (similar to the way this works with test_datetime.py, which generates C and Python test cases from datetimetester.py). - This includes a compile-time configuration option on Linux (though not on Windows); added with much help from Thomas Wouters. - Integration into the CPython build system is obviously different from building a standalone zoneinfo module wheel. - This includes configuration to install the tzdata package as part of CI, though only on the coverage jobs. Introducing a PyPI dependency as part of the CI build was controversial, and this is seen as less of a major change, since the coverage jobs already depend on pip and PyPI. Additional changes that were introduced as part of this PR, most / all of which were backported to the reference implementation: - Fixed reference and memory leaks With much debugging help from Pablo Galindo - Added smoke tests ensuring that the C and Python modules are built The import machinery can be somewhat fragile, and the "seamlessly falls back to pure Python" nature of this module makes it so that a problem building the C extension or a failure to import the pure Python version might easily go unnoticed. - Adjustments to zoneinfo.__dir__ Suggested by Petr Viktorin. - Slight refactorings as suggested by Steve Dower. - Removed unnecessary if check on std_abbr Discovered this because of a missing line in branch coverage.
* bpo-24916: Remove an outdated comment. (GH-19101)Serhiy Storchaka2020-03-211-2/+0
|
* bpo-1294959: Add sys.platlibdir attribute (GH-18381)Victor Stinner2020-03-101-6/+7
| | | | | | | | | | | | | Add --with-platlibdir option to the configure script: name of the platform-specific library directory, stored in the new sys.platlitdir attribute. It is used to build the path of platform-specific dynamic libraries and the path of the standard library. It is equal to "lib" on most platforms. On Fedora and SuSE, it is equal to "lib64" on 64-bit systems. Co-Authored-By: Jan Matějek <jmatejek@suse.com> Co-Authored-By: Matěj Cepl <mcepl@cepl.eu> Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
* bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303)Michael Felt2019-12-151-1/+2
| | | | | | | | Provides a richer platform tag for AIX that we expect to be sufficient for PEP 425 binary distribution identification. Any backports to earlier Python versions will be handled via setuptools. Patch by Michael Felt.
* bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366)Victor Stinner2019-09-251-1/+1
| | | | | | | Add test_init_pybuilddir() and test_init_pyvenv_cfg() to test_embed to test pyvenv.cfg and pybuilddir.txt configuration files. Fix sysconfig._generate_posix_vars(): pybuilddir.txt uses UTF-8 encoding, not ASCII.
* bpo-37201: fix test_distutils failures for Windows ARM64 (GH-13902)Paul Monson2019-06-121-0/+2
|
* bpo-35920: Windows 10 ARM32 platform support (GH-11774)Paul Monson2019-04-251-0/+2
|
* bpo-35299: Fixed sysconfig and distutils during PGO profiling (GH-11744)Steve Dower2019-02-051-3/+10
|
* bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229)Antoine Pitrou2018-07-161-1/+1
| | | | | bpo-32430: Rename Modules/Setup.dist to Modules/Setup Remove the necessity to copy the former manually to the latter when updating the local source tree.
* remove support for BSD/OS (closes bpo-31624) (#3812)Benjamin Peterson2017-09-291-2/+2
|
* Remove all mention of Windows IA-64 support (GH-3389)Zachary Ware2017-09-061-11/+1
| | | It was mostly removed long ago.
* remove IRIX support (closes bpo-31341) (#3310)Benjamin Peterson2017-09-041-10/+5
| | | See PEP 11.
* bpo-29585: optimize site.py startup time (GH-136)INADA Naoki2017-06-281-16/+10
| | | | Avoid importing `sysconfig` from `site` by copying minimum code. Python startup is 5% faster on Linux and 30% faster on macOS
* bpo-29762: More use "raise from None". (#569)Serhiy Storchaka2017-04-051-1/+1
| | | This hides unwanted implementation details from tracebacks.
* Issue #28046: get_sysconfigdata_name() uses the _PYTHON_SYSCONFIGDATA_NAMEXavier de Gaye2016-09-111-14/+8
| | | | environment variable that is defined when cross-compiling.
* Issue #28046: Fix get_sysconfigdata_name().Xavier de Gaye2016-09-101-7/+14
|
* Issue #28046: Remove platform-specific directories from sys.pathZachary Ware2016-09-101-2/+11
|
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-1/+1
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* - Issue #23968: Rename the platform directory from plat-$(MACHDEP) todoko@ubuntu.com2016-06-141-2/+6
| | | | | | | | plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install the platform specifc _sysconfigdata module into the platform directory and rename it to include the ABIFLAGS.
* Issue #25985: sys.version_info is now used instead of sys.versionSerhiy Storchaka2016-02-111-4/+4
| | | | to format short Python version.
* - Issue #24705: Fix sysconfig._parse_makefile not expanding ${} varsdoko@ubuntu.com2016-01-111-1/+6
| | | | appearing before $() vars.
* Closes #23437: Make user scripts directory versioned on Windows (patch by ↵Steve Dower2015-02-141-1/+1
| | | | pmoore)
* Issue #22919: Windows build updated to support VC 14.0 (Visual Studio 2015), ↵Steve Dower2014-11-221-12/+5
| | | | which will be used for the official 3.5 release.
* Issue #19760: Silence sysconfig's 'SO' key deprecation warnings in tests.Serhiy Storchaka2013-11-261-1/+1
| | | | Change stacklevel in warnings.warn() for 'SO' key to 2.
* A fix for issue 19555 on Windows.Barry Warsaw2013-11-221-4/+4
|
* - Issue #19555: Restore sysconfig.get_config_var('SO'), with aBarry Warsaw2013-11-211-0/+7
| | | | DeprecationWarning pointing people at $EXT_SUFFIX.
* Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX.Antoine Pitrou2013-10-191-1/+1
|\ | | | | | | Patch by David Edelsohn.
| * Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX.Antoine Pitrou2013-10-191-1/+1
| | | | | | | | Patch by David Edelsohn.
* | Issue #19205: Don't import the 're' module in site and sysconfig module toChristian Heimes2013-10-111-1/+3
| | | | | | | | to speed up interpreter start.
* | Issue #17177: Stop using imp in sysconfigBrett Cannon2013-06-151-2/+2
| |
* | - Issue #16754: Fix the incorrect shared library extension on linux. Introducedoko@ubuntu.com2013-03-211-1/+1
|\ \ | |/ | | | | | | two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
| * - Issue #16754: Fix the incorrect shared library extension on linux. Introducedoko@ubuntu.com2013-03-211-0/+1
| |\ | | | | | | | | | | | | two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
| | * - Issue #16754: Fix the incorrect shared library extension on linux. Introducedoko@ubuntu.com2013-03-211-0/+1
| | | | | | | | | | | | | | | two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
| | * Issue #13590: OS X Xcode 4 - improve support for universal extension modulesNed Deily2013-01-311-143/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, fix extension module build failures when trying to use 32-bit-only installer Pythons on systems with Xcode 4 (currently OS X 10.8, 10.7, and optionally 10.6). * Backport 3.3.0 fixes to 3.2 branch (for release in 3.2.4) * Since Xcode 4 removes ppc support, extension module builds now check for ppc compiler support and by default remove ppc and ppc64 archs when they are not available. * Extension module builds now revert to using system installed headers and libs (/usr and /System/Library) if the SDK used to build the interpreter is not installed or has moved. * Try to avoid building extension modules with deprecated and problematic Apple llvm-gcc compiler. If original compiler is not available, use clang instead by default.
* | | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-4/+4
| | |
* | | Remove sys.platform == 'riscos' checks from some Python and test files. #16501Christian Heimes2012-11-181-1/+0
| | |
* | | Merge issue #15298.Trent Nelson2012-10-171-12/+17
|\ \ \ | |/ /
| * | Issue #15298: refactor previous fix from 66959d419369.Trent Nelson2012-10-171-12/+17
| | |
* | | Merge issue #15298: fix an OS X bootstrap issue with _sysconfigdata.py.Trent Nelson2012-10-171-6/+19
|\ \ \ | |/ /
| * | Issue #15298: fix an OS X bootstrap issue with _sysconfigdata.py.Trent Nelson2012-10-171-6/+19
| | | | | | | | | | | | Reported by: Ned Deily.
* | | Merge issue #15298: ensure _sysconfigdata is generated in build directory,Trent Nelson2012-10-161-1/+10
|\ \ \ | |/ / | | | | | | | | | | | | not source directory. Patch by: Richard Oudkerk (sbt).