summaryrefslogtreecommitdiffstats
path: root/Lib/sysconfig.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-99201: fix IndexError when initializing sysconfig config variablesFilipe Laíns2022-11-191-1/+6
|
* gh-92452: Avoid race in initialization of sysconfig._CONFIG_VARSGareth Rees2022-10-281-60/+80
| | | Co-authored-by: Filipe Laíns <lains@riseup.net>
* gh-92897: Ensure `venv --copies` respects source build property of the ↵Jeremy Kloth2022-07-051-25/+26
| | | | creating interpreter (GH-92899)
* gh-90473: disable user site packages on WASI/Emscripten (GH-93633)Christian Heimes2022-06-091-2/+2
|
* gh-91670: Removes `SO` config variable in `sysconfig.py` (#91671)Bryan Weber2022-04-181-7/+0
| | | | | | | | | | | | | | | * Removes SO config variable in sysconfig Per @warsaw in https://github.com/python/cpython/issues/63754, this was deprecated in Python 3.4 and was suggested for removal in Python 3.5. * Add NEWS * Update Misc/NEWS.d/next/Library/2022-04-18-15-23-24.gh-issue-91670.6eyChw.rst Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Barry Warsaw <barry@python.org> Co-authored-by: Éric <merwok@netwok.org>
* bpo-45413: Define "posix_venv", "nt_venv" and "venv" sysconfig installation ↵Miro Hrončok2022-03-181-0/+47
| | | | | | | | | | | | | | | | | | | schemes (GH-31034) Define *posix_venv* and *nt_venv* sysconfig installation schemes to be used for bootstrapping new virtual environments. Add *venv* sysconfig installation scheme to get the appropriate one of the above. The schemes are identical to the pre-existing *posix_prefix* and *nt* install schemes. The venv module now uses the *venv* scheme to create new virtual environments instead of hardcoding the paths depending only on the platform. Downstream Python distributors customizing the *posix_prefix* or *nt* install scheme in a way that is not compatible with the install scheme used in virtual environments are encouraged not to customize the *venv* schemes. When Python itself runs in a virtual environment, sysconfig.get_default_scheme and sysconfig.get_preferred_scheme with `key="prefix"` returns *venv*.
* bpo-46565: `del` loop vars that are leaking into module namespaces (GH-30993)Nikita Sobolev2022-02-031-0/+1
|
* bpo-45582: Fix test_embed failure during a PGO build on Windows (GH-30014)neonene2021-12-101-0/+1
| | | This defines VPATH differently in PGO instrumentation builds, to account for a different default output directory. It also adds sys._vpath on Windows to make the value available to sysconfig so that it can be used in tests.
* bpo-45582: Port getpath[p].c to Python (GH-29041)Steve Dower2021-12-031-0/+5
| | | | | The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code. This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.
* Fix typos in the Lib directory (GH-28775)Christian Clauss2021-10-061-1/+1
| | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Revert "bpo-45035: Make sysconfig posix_home depend on platlibdir ↵Pablo Galindo Salgado2021-09-071-3/+3
| | | | | (GH-28011)" (GH-28201) This reverts commit 4f88161f07538dfb24a43189fd59bf966cb40817.
* bpo-45035: Make sysconfig posix_home depend on platlibdir (GH-28011)Tzu-ping Chung2021-09-071-3/+3
|
* Make sysconfig posix_user not depend on platlibdir (GH-27655)Tzu-ping Chung2021-09-071-1/+1
|
* Fix osx_framework_user include to match distutils (#27093)Tzu-ping Chung2021-07-151-1/+1
|
* 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.