summaryrefslogtreecommitdiffstats
path: root/Tools/freeze
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-65701: document that freeze doesn't work with framework builds on ↵Miss Islington (bot)2023-12-222-0/+10
| | | | | | | | | | | | | | | | macOS (GH-113352) (#113361) gh-65701: document that freeze doesn't work with framework builds on macOS (GH-113352) * gh-65701: document that freeze doesn't work with framework builds on macOS The framework install is inherently incompatible with freeze. Document that that freeze doesn't work with framework builds and bail out early when trying to run freeze anyway. (cherry picked from commit df1eec3dae3b1eddff819fd70f58b03b3fbd0eda) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.11] gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451) (#110457)Miss Islington (bot)2023-10-061-14/+19
| | | | | | | | | | | | | | | | gh-103053: Fix test_tools.test_freeze on FreeBSD (GH-110451) Fix test_tools.test_freeze on FreeBSD: run "make distclean" instead of "make clean" in the copied source directory to remove also the "python" program. Other test_freeze changes: * Log executed commands and directories, and the current directory. * No longer uses make -C option to change the directory, instead use subprocess cwd parameter. (cherry picked from commit a4baa9e8ac62cac3ea6363b15ea585b1998ea1f9) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.11] gh-109615: Fix support test_copy_python_src_ignore() (#109958) (#109962)Victor Stinner2023-09-271-1/+8
| | | | | | | | | | | | | | gh-109615: Fix support test_copy_python_src_ignore() (#109958) Fix the test when run on an installed Python: use "abs_srcdir" of sysconfig, and skip the test if the Python source code cannot be found. * Tools/patchcheck/patchcheck.py, Tools/freeze/test/freeze.py and Lib/test/libregrtest/utils.py now first try to get "abs_srcdir" from sysconfig, before getting "srcdir" from sysconfig. * test.pythoninfo logs sysconfig "abs_srcdir". (cherry picked from commit b89ed9df39851348fbb1552294644f99f6b17d2c)
* [3.11] gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) (#109951)Victor Stinner2023-09-271-47/+7
| | | | | | | | | | | | | gh-109615: Fix test_tools.test_freeze SRCDIR (#109935) Fix copy_source_tree() function of test_tools.test_freeze: * Don't copy SRC_DIR/build/ anymore. This directory is modified by other tests running in parallel. * Add test.support.copy_python_src_ignore(). * Use sysconfig to get the source directory. * Use sysconfig.get_config_var() to get CONFIG_ARGS variable. (cherry picked from commit 1512d6c6ee2a770afb339bbb74c1b990116f7f89)
* gh-102151: Correctly fetch CONFIG_ARGS in Tools/freeze/test/freeze.py ↵Miss Islington (bot)2023-02-231-1/+1
| | | | | | | (GH-102152) (cherry picked from commit c3a178398c199038f3a0891d09f0363ec73f3b38) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-89792: Limit test_tools freeze test build parallelism based on the number ↵Miss Islington (bot)2023-02-121-3/+12
| | | | | | | | of cores (GH-101841) unhardcode freeze test build parallelism. base it on the number of cpus, don't use more than max(2, os.cpu_count()/3). (cherry picked from commit dfc2e065a2e71011017077e549cd2f9bf4944c54) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-89792: Prevent test_tools from copying 1000M of "source" in freeze test ↵Miss Islington (bot)2023-02-121-1/+13
| | | | | | | | | | | | (GH-101837) Prevent test_tools from copying 1000M of "source" It doesn't need a git repo, just the checkout. We skip .git metadata, Doc/build, Doc/venv, and `__pycache__` subdirs, that developers often have in their clients to reduce the size of the source tree copy ten-fold. This should significantly reduce IO and presumably time on buildbots during this long test. (cherry picked from commit 1d194235e4d5981b5fea25c75318d61189103a58) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-57684: Update tests for PYTHONSAFEPATH=1 (#92358)Victor Stinner2022-05-061-1/+2
| | | | | Fix tests failing with the PYTHONSAFEPATH=1 env var. Enhance also -P help in Python usage (python --help).
* bpo-46748: Don't import <stdbool.h> in public headers (GH-31553)Petr Viktorin2022-02-251-2/+2
| | | | | | | <stdbool.h> is the standard/modern way to define embedd/extends Python free to define bool, true and false, but there are existing applications that use slightly different redefinitions, which fail if the header is included. It's OK to use stdbool outside the public headers, though. https://bugs.python.org/issue46748
* bpo-46608: exclude marshalled-frozen data if deep-freezing to save 300 KB ↵Kumar Aditya2022-02-041-6/+6
| | | | | | | | | | | | | space (GH-31074) This reduces the size of the data segment by **300 KB** of the executable because if the modules are deep-frozen then the marshalled frozen data just wastes space. This was inspired by comment by @gvanrossum in https://github.com/python/cpython/pull/29118#issuecomment-958521863. Note: There is a new option `--deepfreeze-only` in `freeze_modules.py` to change this behavior, it is on be default to save disk space. ```console # du -s ./python before 27892 ./python # du -s ./python after 27524 ./python ``` Automerge-Triggered-By: GH:ericsnowcurrently
* Fix EncodingWarning in Tools/freeze/test/freeze.py (GH-29742)Inada Naoki2021-11-301-2/+2
|
* bpo-45783: Preserve file moves and deletions in the tests for the freeze ↵Eric Snow2021-11-231-31/+11
| | | | | | tool. (GH-29527) Use shutil.copytree rather than Git, which might be missing (or configured differently) when testing Python built from a source release.
* bpo-45696: Deep-freeze selected modules (GH-29118)Guido van Rossum2021-11-111-7/+17
| | | | | | | This gains 10% or more in startup time for `python -c pass` on UNIX-ish systems. The Makefile.pre.in generating code builds on Eric's work for bpo-45020, but the .c file generator is new. Windows version TBD.
* bpo-45395: Make custom frozen modules additions instead of replacements. ↵Eric Snow2021-10-281-6/+0
| | | | | | | | | (gh-28778) Currently custom modules (the array set on PyImport_FrozenModules) replace all the frozen stdlib modules. That can be problematic and is unlikely to be what the user wants. This change treats the custom frozen modules as additions instead. They take precedence over all other frozen modules except for those needed to bootstrap the import system. If the "code" field of an entry in the custom array is NULL then that frozen module is treated as disabled, which allows a custom entry to disable a frozen stdlib module. This change allows us to get rid of is_essential_frozen_module() and simplifies the logic for which frozen modules should be ignored. https://bugs.python.org/issue45395
* bpo-45629: Add a test for the "freeze" tool. (gh-29222)Eric Snow2021-10-281-0/+194
| | | | | | | The "freeze" tool has been part of the repo for a long time. However, it hasn't had any tests in the test suite to guard against regressions. We add such a test here. This is especially important as there has been a lot of change recently related to frozen modules, with more to come. Note that as part of the test we build Python out-of-tree and install it in a temp dir. https://bugs.python.org/issue45629
* Update URLs in comments and metadata to use HTTPS (GH-27458)Noah Kantrowitz2021-07-301-1/+1
|
* bpo-44131: Test Py_FrozenMain() (GH-26126)Victor Stinner2021-05-171-11/+9
| | | | | | | | | * Add test_frozenmain to test_embed * Add Programs/test_frozenmain.py * Add Programs/freeze_test_frozenmain.py * Add Programs/test_frozenmain.h * Add make regen-test-frozenmain * Add test_frozenmain command to Programs/_testembed * _testembed.c: add error(msg) function
* bpo-39448: Add regen-frozen makefile target. (GH-18174)Neil Schemenauer2021-02-191-0/+51
| | | | | Add the "regen-frozen" makefile target that regenerates the code for the frozen __hello__ module.
* bpo-42613: Fix freeze.py config directory (GH-23792)Victor Stinner2020-12-161-10/+10
| | | Fix freeze.py tool to use the prope config and library directories.
* bpo-22831: Use "with" to avoid possible fd leaks in tools (part 2). (GH-10927)Serhiy Storchaka2019-03-302-2/+4
|
* bpo-32217: Correct usage of ABI tags in freeze. (GH-4719)AraHaan2019-03-231-1/+4
| | | | Check for sys.abiflags before using since not all platforms have it defined.
* bpo-35471: Remove the macpath module (GH-11129)Victor Stinner2018-12-141-1/+1
| | | | Python 2.4 dropped MacOS 9 support. The macpath module was deprecated in Python 3.7. This change removes it.
* bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711)Stefan Grönke2017-09-251-9/+9
|
* bpo-31462: Remove trailing whitespaces. (#3564)Serhiy Storchaka2017-09-141-1/+1
|
* bpo-29762: More use "raise from None". (#569)Serhiy Storchaka2017-04-051-1/+1
| | | This hides unwanted implementation details from tracebacks.
* Issue #27566: Fix clean target in freeze makefile (patch by Lisa Roach)Steve Dower2016-09-101-2/+2
|\
| * Issue #27566: Fix clean target in freeze makefile (patch by Lisa Roach)Steve Dower2016-09-101-2/+2
| |
* | #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-3/+3
| | | | | | | | | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* | Issue #27355: Removed support for Windows CE. It was never finished,Larry Hastings2016-09-051-3/+1
| | | | | | | | and Windows CE is no longer a relevant platform for Python.
* | Issue #27626: Merge spelling fixes from 3.5Martin Panter2016-07-281-1/+1
|\ \ | |/
| * Issue #27626: Spelling fixes in docs, comments and internal namesMartin Panter2016-07-281-1/+1
| | | | | | | | Based on patch by Ville Skyttä.
* | Merge for issue #26271Brett Cannon2016-03-181-2/+2
|\ \ | |/
| * Issue #26271: Fix the Freeze tool to use variables passed in from theBrett Cannon2016-03-181-2/+2
| | | | | | | | | | | | configure script related to compiler flags. Thanks to Daniel Shaulov for the bug report and patch.
* | Issue #25985: sys.version_info is now used instead of sys.versionSerhiy Storchaka2016-02-111-1/+1
|/ | | | to format short Python version.
* merge 3.4 (#25504)Benjamin Peterson2015-10-301-1/+1
|\
| * fix usage of undefined name (#25504)Benjamin Peterson2015-10-301-1/+1
| |
* | Issue #23911: Move path-based bootstrap code to a separate frozen module.Eric Snow2015-05-031-1/+3
| |
* | Removed trailing whitespaces in miscalenous files.Serhiy Storchaka2015-04-031-4/+4
| |
* | Removed unintentional trailing spaces in text files.Serhiy Storchaka2015-03-291-9/+9
| |
* | Issue #22826: The result of open() in Tools/freeze/bkfile.py is now betterSerhiy Storchaka2015-03-203-87/+51
|/ | | | | compatible with regular files (in particular it now supports the context management protocol).
* Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded withSerhiy Storchaka2015-03-111-1/+1
| | | | imp.reload(). Patch by Thomas Kluyver.
* Add test case for freeze.Martin v. Löwis2014-03-302-0/+13
|
* Issue #16047: Fix module exception list and __file__ handling in freeze.Martin v. Löwis2014-03-302-1/+5
| | | | Patch by Meador Inge.
* Issue #11824: Consider ABI tags in freeze. Patch by Meador Inge.Martin v. Löwis2014-03-301-4/+6
|
* #18803: merge with 3.3.Ezio Melotti2013-08-252-3/+3
|\
| * #18803: fix more typos. Patch by Févry Thibault.Ezio Melotti2013-08-252-3/+3
| |
* | Use OESeeror instead of os.error (#16720)Andrew Svetlov2012-12-242-3/+3
| | | | | | | | Patch by Serhiy Storchaka.
* | #16135: Removal of OS/2 support (C code and Docs)Jesus Cea2012-10-051-1/+1
|/
* (Merge 3.1) Issue #11614: import __hello__ prints "Hello World!". Patch writtenVictor Stinner2011-05-161-0/+1
|\ | | | | | | by Andreas Stührk.
| * Issue #11614: import __hello__ prints "Hello World!". Patch written by AndreasVictor Stinner2011-05-161-0/+1
| | | | | | | | Stührk.