summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
Commit message (Collapse)AuthorAgeFilesLines
* gh-90473: Misc test fixes for WASI (GH-93218)Christian Heimes2022-05-251-0/+1
| | | | | | | | * ``sys.executable`` is not set * WASI does not support subprocess * ``pwd`` module is not available * WASI checks ``open`` syscall flags more strict, needs r, w, rw flag. * ``umask`` is not available * ``/dev/null`` may not be accessible
* bpo-45046: Support context managers in unittest (GH-28045)Serhiy Storchaka2022-05-081-3/+1
| | | | | | Add methods enterContext() and enterClassContext() in TestCase. Add method enterAsyncContext() in IsolatedAsyncioTestCase. Add function enterModuleContext().
* bpo-44712: Replace "type(literal)" with corresponding builtin types (GH-27294)Serhiy Storchaka2022-05-081-1/+1
| | | | I suppose it is a remnants of very old code written when str, int, list, dict, etc were functions and not classes.
* gh-57684: Update tests for PYTHONSAFEPATH=1 (#92358)Victor Stinner2022-05-061-0/+6
| | | | | Fix tests failing with the PYTHONSAFEPATH=1 env var. Enhance also -P help in Python usage (python --help).
* gh-91670: Removes `SO` config variable in `sysconfig.py` (#91671)Bryan Weber2022-04-181-20/+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-47061: deprecate cgi and cgitb (GH-32410)Brett Cannon2022-04-091-1/+4
| | | Part of PEP 594.
* bpo-40280: Detect missing threading on WASM platforms (GH-32352)Christian Heimes2022-04-071-0/+2
| | | Co-authored-by: Brett Cannon <brett@python.org>
* bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124)Hugo van Kemenade2022-03-301-1/+1
|
* bpo-40280: Skip more tests on Emscripten (GH-31947)Christian Heimes2022-03-171-1/+2
| | | | | | - lchmod, lchown are not fully implemented - skip umask tests - cannot fstat unlinked or renamed files yet - ignore musl libc issues that affect Emscripten
* bpo-40280: Block more non-working syscalls in Emscripten (GH-31757)Christian Heimes2022-03-081-0/+2
| | | | | | | | | - getgroups always fails. - geteuid and getegid always return 0 (root), which confuse tarfile and tests. - hardlinks (link, linkat) always fails. - non-encodable file names are not supported by NODERAWFS layer. - mark more tests with dependency on subprocess and multiprocessing. Mocking does not work if the module fails to import.
* bpo-46933: Make pwd module optional (GH-31700)Christian Heimes2022-03-071-1/+4
| | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615)Christian Heimes2022-01-258-7/+23
|
* Fix typos in the Lib directory (GH-28775)Christian Clauss2021-10-062-3/+3
| | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-45371: Fix distutils' rpath support for clang (GH-28732)Christian Heimes2021-10-051-1/+2
| | | Signed-off-by: Christian Heimes <christian@python.org>
* [codemod] Fix non-matching bracket pairs (GH-28473)Mohamad Mansour2021-09-212-2/+2
| | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45182: Fix incorrect use of requires_zlib in test_bdist_rpm (GH-28305)Serhiy Storchaka2021-09-131-2/+2
| | | It is a decorator factory and should be always followed by "()".
* bpo-5846: Do not use obsolete unittest functions. (GH-28303)Serhiy Storchaka2021-09-1339-42/+42
| | | | Get rid of use of makeSuite() and findTestCases(). Also make test_math and test_threading_local discoverable.
* bpo-45124: Remove the bdist_msi command (GH-28195)Hugo van Kemenade2021-09-074-787/+6
| | | | The bdist_msi command, deprecated in Python 3.9, is now removed. Use bdist_wheel (wheel packages) instead.
* bpo-44781: make distutils test suppress deprecation warning from import ↵Irit Katriel2021-08-021-2/+5
| | | | distutils (GH-27485)
* Update URLs in comments and metadata to use HTTPS (GH-27458)Noah Kantrowitz2021-07-301-2/+2
|
* Remove unnecessary pass statement in msvccompiler.py (GH-27123)Leonardo Freua2021-07-151-1/+0
|
* bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637)Lumír 'Frenzy' Balhar2021-06-111-4/+107
| | | | The function uses distutils.text_file.TextFile and therefore behaves differently than _parse_makefile in sysconfig.
* bpo-41282: Fix broken `make install` (GH-26329)Petr Viktorin2021-05-241-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix import of HTTPError (GH-22304)Sebastian Rittau2021-05-112-2/+3
| | | Import HTTPError from urllib.error instead of urllib.request.
* bpo-43568: Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 (GH-25827)Ned Deily2021-05-031-5/+9
| | | | | | | | | | Only complain if the config target is >= 10.3 and the current target is < 10.3. The check was originally added to ensure that incompatible LDSHARED flags are not used, because -undefined dynamic_lookup is used when building for 10.3 and later, and is not supported on older OS versions. Apart from that, there should be no problem in general with using an older target. Authored-by: Joshua Root <jmr@macports.org>
* bpo-41282: Consistent message and filter warning in setup.py (GH-25571)Christian Heimes2021-04-241-1/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation ↵Lumír 'Frenzy' Balhar2021-04-238-435/+159
| | | | | | | | | | 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: Fix distutils.utils.byte_compile() DeprecationWarning (GH-25406)Victor Stinner2021-04-162-3/+7
| | | | | * byte_compile() of distutils.utils no longer logs a DeprecationWarning * test_distutils no longer logs a DeprecationWarning
* bpo-41282: (PEP 632) Load install schemes from sysconfig (GH-24549)Lumír 'Frenzy' Balhar2021-04-141-32/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "bpo-42405: fix C extensions build on Windows ARM64 (GH-23399)" (#24753)Jason R. Coombs2021-03-041-22/+1
| | | This reverts commit cb7bc7640935f6b05e9d2acfe4b33d496e8f8666.
* bpo-42405: fix C extensions build on Windows ARM64 (GH-23399)Adrian Vladu2021-03-041-1/+22
| | | | | | | | | | | | | | | | | | | | | | | The following changes are required: * add a new platform win-arm64 * replace the emulated compiler executable paths * bump the linker base addressed as ARM64 requires more memory this change might not be needed (investigation required) On Windows 10 ARM64, VS compiler paths look like this: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\ARM64\cl.exe Note that the cl.exe for ARM64 is an x32 binary, which can run emulated on Windows 10 ARM64 (it has builtin emulation for x32). The rc.exe and mc.exe paths have to also be changed, as the initial discovery has to be fixed. Work in progress to remove the hardcoded bits and to change the path query fixes to the proper location. Automerge-Triggered-By: GH:jaraco
* bpo-41282: distutils: Fix stacklevel for DeprecationWarning (GH-24657)Inada Naoki2021-03-021-1/+1
| | | DeprecationWarning is emit for `import distutils`, not for `distutils` itself.
* Fix a typo in a deprecation warning (GH-24423)Zackery Spytz2021-02-051-1/+1
|
* bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a ↵Ronald Oussoren2021-02-012-4/+4
| | | | | string (GH-24341) * bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string
* bpo-41282: Add deprecation warning and docs for distutils (PEP 632) (GH-24355)Steve Dower2021-01-291-0/+6
|
* bpo-42802: Remove distutils bdist_wininst command (GH-24043)Victor Stinner2021-01-0815-429/+4
| | | | | | | | | | The distutils bdist_wininst command deprecated in Python 3.8 has been removed. The distutils bidst_wheel command is now recommended to distribute binary packages on Windows. * Remove Lib/distutils/command/bdist_wininst.py * Remove PC/bdist_wininst/ project * Remove Lib/distutils/command/wininst-*.exe programs * Remove all references to bdist_wininst
* bpo-31904: Fix site and sysconfig modules for VxWorks RTOS (GH-21821)pxinwr2020-12-202-8/+13
|
* bpo-42504: fix for MACOSX_DEPLOYMENT_TARGET=11 (GH-23556)FX Coudert2020-12-032-5/+9
| | | | macOS releases numbering has changed as of macOS 11 Big Sur. Previously, major releases were of the form 10.x, 10.x+1, 10.x+2, etc; as of Big Sur, they are now x, x+1, etc, so, for example, 10.15, 10.15.1, ..., 10.15.7, 11, 11.0.1, 11.1, ..., 12, 12.1, etc. Allow Python to build with single-digit deployment target values. Patch provided by FX Coudert.
* bpo-41116: Ensure system supplied libraries are found on macOS 11 (GH-23301)Ronald Oussoren2020-11-221-1/+1
| | | | | | On macOS system provided libraries are in a shared library cache and not at their usual location. This PR teaches distutils to search in the SDK, even if there was no "-sysroot" argument in the compiler flags.
* bpo-41100: Support macOS 11 and Apple Silicon (GH-22855)Ronald Oussoren2020-11-081-1/+1
| | | | | | | | | | | Co-authored-by: Lawrence D’Anna <lawrence_danna@apple.com> * Add support for macOS 11 and Apple Silicon (aka arm64) As a side effect of this work use the system copy of libffi on macOS, and remove the vendored copy * Support building on recent versions of macOS while deploying to older versions This allows building installers on macOS 11 while still supporting macOS 10.9.
* bpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359)Jason R. Coombs2020-07-072-3/+14
| | | Automerge-Triggered-By: @jaraco
* bpo-40275: Use new test.support helper submodules in tests (GH-21317)Hai Shi2020-07-064-19/+19
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21151)Hai Shi2020-06-2512-16/+31
| | | | | | | | | | | | | Use new test.support helper submodules in tests: * distutils tests * test_buffer * test_compile * test_filecmp * test_fileinput * test_readline * test_smtpnet * test_structmembers * test_tools
* bpo-41043: Escape literal part of the path for glob(). (GH-20994)Serhiy Storchaka2020-06-201-3/+3
|
* bpo-41003: Fix test_copyreg when numpy is installed (GH-20935)Victor Stinner2020-06-171-7/+6
| | | | | | | | Fix test_copyreg when numpy is installed: test.pickletester now saves/restores warnings.filters when importing numpy, to ignore filters installed by numpy. Add the save_restore_warnings_filters() function to the test.support.warnings_helper module.
* bpo-40698: Improve distutils upload hash digests (GH-20260)Christian Heimes2020-05-202-5/+41
| | | | | | | - Fix upload test on systems that blocks MD5 - Add SHA2-256 and Blake2b-256 digests based on new Warehous and twine specs. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-40055: test_distutils leaves warnings filters unchanged (GH-20095)Victor Stinner2020-05-151-0/+6
| | | | | distutils.tests now saves/restores warnings filters to leave them unchanged. Importing tests imports docutils which imports pkg_resources which adds a warnings filter.
* bpo-40443: Remove unused imports in distutils (GH-19802)Victor Stinner2020-04-3011-17/+6
|
* bpo-40443: Remove unused imports in tests (GH-19804)Victor Stinner2020-04-304-5/+2
|
* bpo-38360: macOS: support alternate form of -isysroot flag (GH-16480)Joshua Root2020-04-221-1/+1
| | | | | | | It is possible to use either '-isysroot /some/path' (with a space) or '-isysroot/some/path' (no space in between). Support both forms in places where special handling of -isysroot is done, rather than just the first form. Co-authored-by: Ned Deily <nad@python.org>