* bpo-30871: Add test.pythoninfo (#3075)
* Add Lib/test/pythoninfo.py: script collecting various informations
about Python to help debugging test failures.
* regrtest: remove sys.hash_info and sys.flags from header.
* Travis CI, Appveyor: run pythoninfo before tests
(cherry picked from commit b907abc885)
* bpo-30871: pythoninfo: add expat and _decimal (#3121)
* bpo-30871: pythoninfo: add expat and _decimal
* Remove _decimal.__version__
The string is hardcoded, not really interesting.
(cherry picked from commit f6ebd838f0)
* bpo-30871: Add "make pythoninfo" (#3120)
(cherry picked from commit a3a01a2fce)
* bpo-30871: pythoninfo: more sys, os, time data (#3130)
* bpo-30871: pythoninfo: more sys, os, time data
PythonInfo now converts types other than intger to string by default.
* fix typo
(cherry picked from commit ad7eaed543)
* bpo-31231: Fix pythoninfo in Travis config (#3134)
bpo-31231, bpo-30871: Replace "./python -m test.pythoninfo" with
"make pythoninfo", since macOS uses ./python.exe.
(cherry picked from commit 92b1f90143)
(cherry picked from commit 29d007bb67)
* bpo-29243: Fix Makefile with respect to --enable-optimizations
When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.
Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.
* !squash.
(cherry picked from commit a1054c3b00)
* regrtest: add --slowest alias to --slow
* make buildbottest: add --slowest option
* regrtest: add "- " prefix to --slowest output
* regrtest: Fix an outdated comment
* regrtest: replace PermissionError
Replace PermissionError with OSError and check on exc.errno.
PermissionError was added to Python 3.3.
* regrtest: add -3 -tt options to run Python scripts
* regrtest: backport --list-tests option
* regrtest: backport "Tests result: xxx" summary
* regrtest: backport total duration
* regrtest: add timestamp to the progress
* regrtest: describe previous test state
* Add the state of the test: passed, failed, etc.
* If a test took longer than 30 seconds, log its execution time
* regrtest: -jN logs running workers
* regrtest: mention if tests are run in parallel
* regrtest: parallel mode is more verbose during wait
Display running tests every 30 seconds if no test completed in the
meanwhile.
* test_regrtest: fix typo in SubprocessRun
Don't rebuild generated files based on file modification time
anymore, the action is now explicit. Replace "make touch"
with "make regen-all".
Changes:
* Remove "make touch", Tools/hg/hgtouch.py and .hgtouch
* Add a new "make regen-all" command to rebuild all generated files
* Add subcommands to only generate specific files:
- regen-ast: Include/Python-ast.h and Python/Python-ast.c
- regen-grammar: Include/graminit.h and Python/graminit.c
- regen-opcode-targets: Python/opcode_targets.h
* Add PYTHON_FOR_REGEN variable
* pgen is now only built by by "make regen-grammar"
* Add $(srcdir)/ prefix to paths to source files to handle correctly
compilation outside the source directory
Based on commit 5c4b0d063a by Ned
Deily, which is based on original patches by Brett Cannon and Steve
Dower.
Remove also the private _Py_svnversion() function and SVNVERSION
variable.
Note: Py_SubversionRevision() and Py_SubversionShortBranch() are
unchanged, they are part of the public API.
Backport enhancements from master, commits:
* 9c4bfa6669e220efdd379b9f8e7db32bb4e25e72: "make tags": remove -t
option of ctags. The option was kept for backward compatibility,
but it was completly removed recently. Patch written by Stéphane
Wirtel.
* cf0ac6a71ae51249a05521f49c1a0fabbb948488: Fix "make tags": set
locale to C to call sort
* 8a543c0bc7347d5b333f334d157bf4a7cd33c14a: `make tags` fixes (GH-717)
The dependendency on the $(PGEN) variable must only be
set when not cross-compiling. When cross-compiling,
$(PGEN) will not be used, so no need to build it.
Patch by Thomas Perl.
take a rediculious amount of time to run, fail or provide little use
to the profile feedback. (similar to what is already done in 3.5 and
by major Linux distro builds own profiling runs)
enable link time optimizations at build time during a make profile-opt.
Some compilers and toolchains are known to not produce stable code when
using LTO, be sure to test things thoroughly before relying on it.
It can provide a few % speed up over profile-opt alone.
The backport of ensurepip to 2.7.9 allows pip to optionally be installed
or upgraded using the bundled pip provided by the new ensurepip module.
The option can be specified persistently using the configure option:
./configure --with-ensurepip[=upgrade|install|no]
It can also be overridden on either the "install" or "altinstall" targets:
make [alt]install ENSUREPIP=[upgrade|install|no]
For Python 2, the default option is "no" (do not install pip).
* Backports ensurepip to the 2.7 branch
* Backports some of the improved documentation to the 2.7 branch.
* Adds a private backport of the 3.x mock library as test._mock_backport
to enable saner testing of ensurepip.
Key Differences from 3.x:
* Ensurepip does not have any Makefile integration, specifically
it is not ran by default in the Makefile.
* There is no venv module in 2.7, so downstream distributors can
completely disable ensurepip, ideally with a message redirecting
to the correct way to install pip.
* To match the ``python`` command in 2.7, ensurepip will install
the unversioned ``pip`` command as well.
* No-op and hide --default-pip and add --no-default-pip to restore
the 3.x behavor on 2.7.
python --generate-posix-vars in pybuilddir.txt build target by ensuring
that pybuilddir.txt is always regenerated when configure is run and
that the newly built skeleton python does not inadvertently import
modules from previously installed instances.
when building _tkinter. configure has two new options; if used, both must
be specified:
./configure \
--with-tcltk-includes="-I/opt/local/include" \
--with-tcltk-libs="-L/opt/local/lib -ltcl8.5 -ltk8.5"
In addition, the options can be overridden with make:
make \
TCLTK_INCLUDES="-I/opt/local/include" \
TCLTK_LIBS="-L/opt/local/lib -ltcl8.6 -ltk8.6"