Commit Graph

881 Commits

Author SHA1 Message Date
Victor Stinner 54ba556c6c
bpo-35134: Create Include/cpython/tupleobject.h (GH-10764)
Move tupleobject.h code surrounded by "#ifndef Py_LIMITED_API"
to a new Include/cpython/tupleobject.h header file.

Add cpython/ header files to Makefile.pre.in and pythoncore project
of PCbuild.
2018-11-28 13:01:32 +01:00
Victor Stinner 480833808e
bpo-35134: Update "make tags": add Include/cpython/ (GH-10739)
"make tags" and "make TAGS" now also parse Include/cpython/ header
files.
2018-11-27 12:42:25 +01:00
E. M. Bray da324d53d4 closes bpo-34212: Build core extension modules with Py_BUILD_CORE_BUILTIN. (GH-8712) 2018-11-26 20:21:31 -06:00
Victor Stinner ec13b9322d
bpo-35081: Add Include/internal/pycore_tupleobject.h (GH-10705)
Move _PyTuple_ITEMS() to a new header file:
Include/internal/pycore_tupleobject.h
2018-11-25 23:56:17 +01:00
Victor Stinner e421106b9e
bpo-35134: Create Include/cpython/ subdirectory (GH-10624)
Include/*.h should be the "portable Python API", whereas
Include/cpython/*.h should be the "CPython API": CPython
implementation details.

Changes:

* Create Include/cpython/ subdirectory
* "make install" now creates $prefix/include/cpython and copy
  Include/cpython/* to $prefix/include/cpython
* Create Include/cpython/objimpl.h: move objimpl.h code
  surrounded by "#ifndef Py_LIMITED_API" to cpython/objimpl.h.
* objimpl.h now includes cpython/objimpl.h
* Windows installer (MSI) now also install Include/ subdirectories:
  Include/cpython/ and Include/internal/.
2018-11-23 17:00:00 +01:00
Victor Stinner f653fd4d95
bpo-35296: make install now installs the internal API (GH-10665)
make install now also installs the internal API: Include/internal/*.h
header files.
2018-11-23 16:30:12 +01:00
Victor Stinner 984061eeb4
bpo-35081: Add new internal headers to Makefile (GH-10670)
Add pycore_fileutils.h and pycore_object.h to Makefile.pre.in and to
the pythoncore project of PCbuild/.
2018-11-23 12:30:40 +01:00
Victor Stinner 621cebe81b
bpo-35081: Rename internal headers (GH-10275)
Rename Include/internal/ headers:

* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h

Add missing headers to Makefile.pre.in and PCbuild:

* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
2018-11-12 16:53:38 +01:00
Victor Stinner a1c249c405
bpo-35081: And pycore_lifecycle.h and pycore_pathconfig.h (GH-10273)
* And pycore_lifecycle.h and pycore_pathconfig.h headers to
  Include/internal/
* Move Py_BUILD_CORE specific code from coreconfig.h and
  pylifecycle.h to pycore_pathconfig.h and pycore_lifecycle.h
* Move _Py_wstrlist_XXX() definitions and _PyPathConfig code
  from pycore_state.h to pycore_pathconfig.h
* Move "Init" and "Fini" function definitions from pylifecycle.c to
  pycore_lifecycle.h.
2018-11-01 03:15:58 +01:00
Victor Stinner e281f7d80c
bpo-35081: Move accu.h to Include/internal/pycore_accu.h (GH-10271)
The accu.h header is no longer part of the Python C API: it has been
moved to the "internal" headers which are restricted to Python
itself.

Replace #include "accu.h" with #include "pycore_accu.h".
2018-11-01 02:30:36 +01:00
Victor Stinner 27e2d1f219
bpo-35081: Add pycore_ prefix to internal header files (GH-10263)
* Rename Include/internal/ header files:

  * pyatomic.h -> pycore_atomic.h
  * ceval.h -> pycore_ceval.h
  * condvar.h -> pycore_condvar.h
  * context.h -> pycore_context.h
  * pygetopt.h -> pycore_getopt.h
  * gil.h -> pycore_gil.h
  * hamt.h -> pycore_hamt.h
  * hash.h -> pycore_hash.h
  * mem.h -> pycore_mem.h
  * pystate.h -> pycore_state.h
  * warnings.h -> pycore_warnings.h

* PCbuild project, Makefile.pre.in, Modules/Setup: add the
  Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
  with #include "pycore_mem.h".
2018-11-01 00:52:28 +01:00
Victor Stinner 31368a4f0e
bpo-35081: Move Include/pyatomic.c to Include/internal/ (GH-10239)
Add pyatomic.h to the VS project (it wasn't referenced).
2018-10-30 15:14:25 +01:00
Victor Stinner 6279c1c500
bpo-35053: Add Include/tracemalloc.h (GH-10091)
* Modify object.h to ensure that pymem.h is included,
  to get _Py_tracemalloc_config variable.
* Move _PyTraceMalloc_XXX() functions to tracemalloc.h,
  they need PyObject type. Break circular dependency between pymem.h
  and object.h.
2018-10-25 15:54:13 +02:00
Benjamin Peterson 65ed12cb7c
closes bpo-34869: Remove LDLAST. (GH-9667) 2018-10-03 19:23:24 -07:00
Serhiy Storchaka 79d1c2e6c9
bpo-25711: Rewrite zipimport in pure Python. (GH-6809) 2018-09-18 22:22:29 +03:00
Victor Stinner 6c785c0ebd
bpo-34170: Add Python/coreconfig.c for _PyCoreConfig (GH-8607)
* Add Include/coreconfig.h
* Move config_*() and _PyCoreConfig_*() functions from Modules/main.c
  to a new Python/coreconfig.c file.
* Inline _Py_ReadHashSeed() into config_init_hash_seed()
* Move global configuration variables to coreconfig.c
2018-08-01 17:56:14 +02:00
Antoine Pitrou 961d54c5c1
bpo-32430: Rename Modules/Setup.dist to Modules/Setup (GH-8229)
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.
2018-07-16 19:03:03 +02:00
Matthias Klose 10f715d712
Enable the verbose build for extension modules with GNU make (#6659) 2018-04-30 20:07:55 +02:00
Brett Cannon a8c342465b
bpo-25427: Remove pyvenv (GH-5962) 2018-04-20 14:15:40 -07:00
xdegaye 063db62aab bpo-32232: by default, Setup modules are no longer built with -DPy_BUILD_CORE (GH-6489)
Setup modules are no longer built with -DPy_BUILD_CORE by default,
as using that flag may now require including additional internal-only header files.

Instead, only the modules that specifically need it use that setting.
2018-04-21 01:03:49 +10:00
Zachary Ware d6ff8a7037
bpo-30638: Add clinic to `make regen-all` (GH-5671)
Also, use PYTHON_FOR_REGEN for clinic and blake2s_impl.c rather than PYTHON_FOR_BUILD, and update .travis.yml to make use of the change.
2018-02-17 17:58:57 -06:00
Guido van Rossum 95e4d58913 String annotations [PEP 563] (#4390)
* Document `from __future__ import annotations`
* Provide plumbing and tests for `from __future__ import annotations`
* Implement unparsing the AST back to string form

This is required for PEP 563 and as such only implements a part of the
unparsing process that covers expressions.
2018-01-26 08:20:18 -08:00
Yury Selivanov f23746a934
bpo-32436: Implement PEP 567 (#5027) 2018-01-22 19:11:18 -05:00
Christian Heimes ff5be6e810
bpo-32598: Use autoconf to detect usable OpenSSL (#5242)
Add https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
to auto-detect compiler flags, linker flags and libraries to compile
OpenSSL extensions. The M4 macro uses pkg-config and falls back to
manual detection.

Add autoconf magic to detect usable X509_VERIFY_PARAM_set1_host()
and related functions.

Refactor setup.py to use new config vars to compile _ssl and _hashlib
modules.

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-20 13:19:21 +01:00
Christian Heimes ced9cb5303
bpo-32549: Compile OpenSSL 1.1.0 on Travis CI (#5180)
Use an improved version of multissl test helper to compile a local copy
of OpenSSL 1.1.0g.

Signed-off-by: Christian Heimes <christian@python.org>
2018-01-16 21:02:26 +01:00
Ned Deily ca0c5f2656
bpo-32248: install new test_importlib directories (#5138) 2018-01-08 21:07:59 -05:00
Benjamin Peterson e425bd7517
move pygetopt.h to internal (closes bpo-32264) (#4830) 2017-12-14 23:48:12 -08:00
INADA Naoki 7ea143ae79
bpo-29469: Move constant folding to AST optimizer (GH-2858) 2017-12-14 16:47:20 +09:00
Victor Stinner 31a8393cf6
Revert "bpo-32197: Try to fix a compiler error on OS X introduced in bpo-32030. (#4681)" (#4694)
* Revert "bpo-32197: Try to fix a compiler error on OS X introduced in bpo-32030. (#4681)"

This reverts commit 13badcbc60.

Re-apply commits:

* "bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673)"
  commit af5a895073.
* "bpo-32030: Fix config_get_program_name() on macOS (#4669)"
  commit e23c06e2b0.
* "bpo-32030: Add Python/pathconfig.c (#4668)"
  commit 0ea395ae96.
* "bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667)"
  commit ebac19dad6.
* "bpo-32030: Fix Py_GetPath(): init program_name (#4665)"
  commit 9ac3d88827.

* Fix compilation error on macOS
2017-12-04 13:39:15 +01:00
Serhiy Storchaka 13badcbc60
bpo-32197: Try to fix a compiler error on OS X introduced in bpo-32030. (#4681)
* Revert "bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673)"

This reverts commit af5a895073.

* Revert "bpo-32030: Fix config_get_program_name() on macOS (#4669)"

This reverts commit e23c06e2b0.

* Revert "bpo-32030: Add Python/pathconfig.c (#4668)"

This reverts commit 0ea395ae96.

* Revert "bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667)"

This reverts commit ebac19dad6.

* Revert "bpo-32030: Fix Py_GetPath(): init program_name (#4665)"

This reverts commit 9ac3d88827.
2017-12-02 21:36:00 +02:00
Victor Stinner 0ea395ae96
bpo-32030: Add Python/pathconfig.c (#4668)
* Factorize code from PC/getpathp.c and Modules/getpath.c to remove
  duplicated code
* rename pathconfig_clear() to _PyPathConfig_Clear()
* Inline _PyPathConfig_Fini() in pymain_impl() and then remove it,
  since it's a oneliner
2017-12-01 20:50:58 +01:00
Victor Stinner 3be3b97a97
make tags: index also Modules/_ctypes/ (#4648)
Avoid also "cd $(srcdir)" to not change the current directory.
2017-11-30 22:49:10 +01:00
Victor Stinner 9e87e7776f
bpo-32096: Remove obj and mem from _PyRuntime (#4532)
bpo-32096, bpo-30860:  Partially revert the commit
2ebc5ce42a8a9e047e790aefbf9a94811569b2b6:

* Move structures back from Include/internal/mem.h to
  Objects/obmalloc.c
* Remove _PyObject_Initialize() and _PyMem_Initialize()
* Remove Include/internal/pymalloc.h
* Add test_capi.test_pre_initialization_api():
   Make sure that it's possible to call Py_DecodeLocale(), and then call
   Py_SetProgramName() with the decoded string, before Py_Initialize().

PyMem_RawMalloc() and Py_DecodeLocale() can be called again before
_PyRuntimeState_Init().

Co-Authored-By: Eric Snow <ericsnowcurrently@gmail.com>
2017-11-24 12:09:24 +01:00
xdegaye 0de92859ca
bpo-31934: Abort when building out of a not clean source tree (GH-4255) 2017-11-08 16:03:58 +01:00
luzpaz a5293b4ff2 Fix miscellaneous typos (#4275) 2017-11-05 15:37:50 +02:00
Neil Schemenauer 4e38d71a2b
bpo-28643: Record profile-opt build progress with stamp files (#4223)
* bpo-28643: Record profile-opt build progress with stamp files

The profile-opt makefile target is expensive to build. Since the
makefile does not contain complete dependency information for this
target, much extra work can get done if the build is interrupted and
re-started.  Even running "make" a second time will result in a huge
amount of redundant work.

As a minimal fix (rather than removing recursive "make" and adding a
proper dependency graph), split the profile-opt target into parts:

- ensure tree is clean (profile-clean-stamp)
- build with profile generation enabled (profile-gen-stamp)
- run task to generate profile information (profile-run-stamp)
- build optimized Python using above information (profile-opt)

We use "stamp" files to record completion of the steps.  Running
"make clean" will not remove the profile-run-stamp file.

Other minor changes:

- remove the "build_all_use_profile" target.  I don't expect callers
  of the makefile to use this target so that should be safe.

- remove execution of "profile-removal" at end of "profile-opt".  I
  don't see any reason to not to keep the profile information, given
  the cost to generate it.  Removing the "profile-run-stamp" file
  will force re-generation of it.
2017-11-02 10:46:02 -07:00
Victor Stinner 87d332dcdb bpo-31810: Add smelly.py to check exported symbols (#4057)
* Add Tools/scripts/smelly.py: script checking if all symbols
  exported by libpython start with "Py" or "_Py".
* Modify "make smelly" to run smelly.py: the command now fails with a
  non-zero exit code if libpython leaks a "smelly" symbol.
* Travis CI now runs "make smelly"
2017-10-24 01:29:53 -07:00
Benjamin Peterson 6fb0e4a6d0 explicitly list objects for the ar command (#3824)
$^ is not portable.

closes bpo-31625
2017-09-29 09:26:48 -07:00
Benjamin Peterson d15108a478 stop using ranlib (closes bpo-31625) (#3815)
Instead, simply pass 's' to ar.
2017-09-29 08:42:41 -07:00
Antoine Pitrou b091bec824 bpo-31536: Avoid wholesale rebuild after `make regen-all` (#3678)
* bpo-31536: Avoid wholesale rebuild after `make regen-all`

* Add NEWS
2017-09-20 14:57:56 -07:00
Victor Stinner 4866957e86 bpo-30860: Add Include/internal/ in "make tags" (#3498) 2017-09-11 09:34:36 -07:00
octaviansoldea 4c81401b3a bpo-31354: Let configure --with-lto work on all builds
Allow configure --with-lto to apply to all builds, not just profile-opt builds.

Whether this is actually useful or not must be determined by the person
building CPython using their own toolchain.

My own quick test on x86_64 Debian 9 (gcc 6.3, binutils 2.28) seemed
to suggest that it wasn't, but I expect better toolchains can or will exist
at some point.  The point is to allow it at all.
2017-09-08 12:14:33 -07:00
Eric Snow 2ebc5ce42a bpo-30860: Consolidate stateful runtime globals. (#3397)
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals

Other globals are excluded (see globals.txt and check-c-globals.py).
2017-09-07 23:51:28 -06:00
Antoine Pitrou a6a4dc816d bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Christian Heimes d3b9f97e6d Update multissl test helper (#3349)
Signed-off-by: Christian Heimes <christian@python.org>
2017-09-06 18:59:22 -07:00
Eric Snow 05351c1bd8 Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)
Windows buildbots started failing due to include-related errors.
2017-09-05 21:43:08 -07:00
Eric Snow 76d5abc868 bpo-30860: Consolidate stateful runtime globals. (#2594)
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals

Other globals are excluded (see globals.txt and check-c-globals.py).
2017-09-05 18:26:16 -07:00
Victor Stinner a3a01a2fce bpo-30871: Add "make pythoninfo" (#3120) 2017-08-18 11:31:52 +02:00
Serhiy Storchaka d5ed47dea2 bpo-30814, bpo-30876: Add new import test files to projects. (#2851) 2017-07-27 12:24:36 +03:00
Victor Stinner 00561189fb buildbot: pass --fail-env-changed to regrtest (#2509)
Make tests fail if a test altered the environment.
2017-06-30 16:44:08 +02:00
Gregory P. Smith 178418ad67 bpo-30492: Allow make clinic to work out of tree. (#1836)
* bpo-30492: Allow make clinic to work out of tree.

* Use os.curdir instead of "." as the default value.
2017-05-27 16:40:45 -07:00
xdegaye c0364fc7c2 bpo-20210: Support the *disabled* marker in Setup files (GH-132)
Extension modules listed after the *disabled* marker are not built at all,
neither by the Makefile nor by setup.py.
2017-05-27 18:25:03 +02:00
Eric Snow 6b4be195cd bpo-22257: Small changes for PEP 432. (#1728)
PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
2017-05-22 21:36:03 -07:00
Stéphane Wirtel 7bac69d7f1 Remove .bzrignore (GH-1661) 2017-05-22 14:28:28 -07:00
stratakis f6eae5bf1c bpo-28787: Fix out of tree --with-dtrace builds (#135)
* bpo-28787: Fix out of tree --with-dtrace builds

* Unsilence directory creation

* Add Misc/NEWS and Misc/ACKS entries
2017-05-10 17:08:15 +02:00
Xiang Zhang fa5abac1e6 bpo-30289: remove Misc/python-config.sh when make distclean (#1498) 2017-05-09 10:32:13 +08:00
torsava a1054c3b00 bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478)
* 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
2017-05-05 17:35:50 +02:00
Victor Stinner a5c62a8e9f bpo-23404: make touch becomes make regen-all (#1405)
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-importlib: Python/importlib_external.h and Python/importlib.h
  - regen-opcode: Include/opcode.h
  - regen-opcode-targets: Python/opcode_targets.h
  - regen-typeslots: Objects/typeslots.inc

* Rename PYTHON_FOR_GEN to PYTHON_FOR_REGEN
* 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

Note: $(PYTHON_FOR_REGEN) is no more used nor needed by "make"
default target building Python.
2017-05-03 18:21:48 +02:00
Victor Stinner 826f83f1d5 bpo-30104: Only use -fno-strict-aliasing on dtoa.c (#1340)
On clang, only compile dtoa.c with -fno-strict-aliasing, use strict
aliasing to compile all other C files.
2017-04-28 15:07:10 +02:00
Alex Dzyoba 8a543c0bc7 `make tags` fixes (GH-717)
* Fix `make tags` warnings

`make tags` target tries to find C sources and headers in "Grammar" and
"Mac" folders and generates these warnings:

    ctags: Warning: cannot open source file "Grammar/*.[ch]" : No such file or directory
    ctags: Warning: cannot open source file "Mac/*.[ch]" : No such file or directory

This commit changes $SRCDIRS variable in configure.ac to remote these
directories. This variable is used only for tags generation.

Also, "configure" was regenerated with `autoreconf`.

* Fix `make tags` fail on non-default tag names

When ctags overrides default tags filename (e.g. `-f .tags`) `make tags`
is failed because it assumes to see default `tags` filename:

    sort: cannot read: tags: No such file or directory

This commit explicitly specifies "tags" filename for tags generation.
2017-03-24 17:23:43 +09:00
Ned Deily 5c4b0d063a bpo-27593: Get SCM build info from git instead of hg. (#446)
sys.version and the platform module python_build(),
python_branch(), and python_revision() functions now use
git information rather than hg when building from a repo.

Based on original patches by Brett Cannon and Steve Dower.
2017-03-04 00:19:55 -05:00
Victor Stinner c22bfaae83 bpo-29524: Add Objects/call.c file (#12)
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
  called once.
* Export _PyEval_EvalCodeWithName() since it is now called
  from call.c.
2017-02-12 19:27:05 +01:00
Victor Stinner d783b01fdf Rename README to README.rst and enhance formatting (#2)
Update also the Release Schedule to Python 3.7.
2017-02-11 02:21:38 +01:00
Victor Stinner d2306cec4d Backed out changeset f23fa1f7b68f
Sorry, I didn't want to push this change before the review :-( I was pushing a
change into the 2.7 branch.
2017-02-10 14:19:36 +01:00
Victor Stinner 766af559ad Issue #29465: Add Objects/call.c file
* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
  called once.
* Export _PyEval_EvalCodeWithName() since it is now called
  from call.c.
2017-02-10 13:32:29 +01:00
Vinay Sajip abe40bcbfe Closed #29261: merged fix from 3.6. 2017-01-13 19:17:51 +00:00
Vinay Sajip 6b642c9a71 Fixes #29261: merged fix from 3.5. 2017-01-13 19:17:03 +00:00
Vinay Sajip 5fd832ba09 Fixes #29261: added venv/scripts/common to LIBSUBDIRS. 2017-01-13 19:08:47 +00:00
Xiang Zhang 44dcd1e1d5 Issue #28930: Merge from 3.6. 2016-12-15 17:05:04 +08:00
Xiang Zhang 3d40e37883 Issue #28930: Add a Makefile rule for bytes_methods.c.
Add a dependency to stringlib to make sure that bytes_methods.c is
recompiled if stringlib is modified.
2016-12-15 16:41:12 +08:00
Martin Panter a57890e5ec Issue #10656: Merge AIX build fix from 3.6 2016-11-20 22:16:46 +00:00
Martin Panter e45df0a6da Issue #10656: Merge AIX build fix from 3.5 2016-11-20 22:06:44 +00:00
Martin Panter 395733d46b Issue #10656: Fix out-of-tree building on AIX
The ld_so_aix script and python.exp file are created in the build directory.
Patch by Tristan Carel and Michael Haubenwallner.
2016-11-20 07:56:37 +00:00
Xavier de Gaye 0eacef3ecf Issue #28444: Merge with 3.5. 2016-10-29 16:59:32 +02:00
Xavier de Gaye 84968b74c8 Issue #28444: Fix missing extensions modules when cross compiling. 2016-10-29 16:57:20 +02:00
Xavier de Gaye 0af10ac472 Issue #28444: Merge with 3.6. 2016-10-29 17:01:07 +02:00
Xavier de Gaye 800d6dc17d Issue #28046: Merge with 3.6. 2016-10-28 11:23:24 +02:00
Xavier de Gaye 1c17e7ff08 Issue #28046: Fix the removal of the sysconfigdata module
from lib-dynload on install.
2016-10-28 11:22:05 +02:00
Benjamin Peterson a2bc46da14 merge 3.6 2016-10-20 22:39:39 -07:00
Benjamin Peterson 4510e6de9d mark dtrace stubs as static inline; remove stubs
C99 inline semantics don't work everywhere. (https://bugs.python.org/issue28092)
We don't want these to have external visibility anyway.
2016-10-20 22:37:00 -07:00
Zachary Ware 3839d99b79 Issue #13756: Fix building extensions modules on Cygwin
Patch by Roumen Petrov, based on original patch by Jason Tishler.
2016-10-01 16:15:09 -05:00
Victor Stinner d920d3906f Merge 3.6 2016-09-29 22:31:28 +02:00
Victor Stinner e234fce57b Merge 3.5 2016-09-29 22:31:20 +02:00
Victor Stinner 8d50d628b8 Issue #28258: Explain the LC_ALL change in a comment 2016-09-29 22:31:06 +02:00
Serhiy Storchaka cf6d2d90c5 Issue #28258: Fixed build with Estonian locale (python-config and distclean
targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.
2016-09-29 20:39:45 +03:00
Serhiy Storchaka 80bc7dc59e Issue #28258: Fixed build with Estonian locale (python-config and distclean
targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.
2016-09-29 20:29:23 +03:00
Serhiy Storchaka 2e8c939e3d Issue #28258: Fixed build with Estonian locale (python-config and distclean
targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.
2016-09-29 20:46:08 +03:00
Martin Panter adab00fb3e Issue #27950: Silence long makefile commands and comments
Gnu Make treats comments in a list of commands as shell comments (not
makefile comments), and reports them as shell commands. The space separating
the @ and # symbols helps syntax highlighting.
2016-09-22 09:34:43 +00:00
Christian Heimes 79f9d4ff97 lcov: ignore more 3rd party code and internal test/debug/dummy files 2016-09-21 14:55:43 +02:00
Martin Panter 134192630a Issue #15819: Remove old unconditional -IInclude option
A newer instance of this option, enabled in the configure script when
building outside the source tree, made this redundant.
2016-09-13 12:21:47 +00:00
Martin Panter b2317a4d9d Issue #15819: Merge include search from 3.5 into 3.6 2016-09-13 12:40:51 +00:00
Victor Stinner 2f462a68f9 Buildbot: give 20 minute per test file
It seems like at least 2 buildbots need more than 15 minutes per test file.
Example with "AMD64 Snow Leop 3.x":

    10 slowest tests:
    - test_tools: 14 min 40 sec
    - test_tokenize: 11 min 57 sec
    - test_datetime: 11 min 25 sec
    - ...
2016-09-12 13:04:17 +02:00
Benjamin Peterson f5781958af add dtrace inline stubs 2016-09-09 19:48:47 -07:00
Zachary Ware c4b53afce4 Issue #28046: Remove platform-specific directories from sys.path 2016-09-09 17:59:49 -07:00
Łukasz Langa a785c87d6e DTrace support: function calls, GC activity, line execution
Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc.

Largely based by an initial patch by Jesús Cea Avión, with some
influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's
unification patch.

Things deliberately left out for simplicity:
- ustack helpers, I have no way of testing them at this point since
they are Solaris-specific
- PyFrameObject * in function__entry/function__return, this is
SystemTap-specific
- SPARC support
- dynamic tracing
- sys module dtrace facility introspection

All of those might be added later.
2016-09-09 17:37:37 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 255295f13e Fix make buildbottest to not re-trigger a profile-opt build. issue28035. 2016-09-09 12:22:49 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) e53592091a Fix make buildbottest to not re-trigger a profile-opt build. issue28035. 2016-09-09 12:23:05 -07:00
Benjamin Peterson 7d895ac953 remove --with(out)-signal-module, since the signal module is non-optional 2016-09-09 12:01:10 -07:00
Brett Cannon 8c94f97465 Issue #26359: Add the --with-optimizations flag. 2016-09-06 17:15:21 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) 653c850919 Fixes issue26307: The profile-opt build now applys PGO to the built-in
modules.
2016-09-06 23:56:54 +00:00
Benjamin Peterson 41356f926d indicate the dependence of odict and dictobject on dict-common.h 2016-09-08 13:19:14 -07:00
Zachary Ware 20737cc91e Issue #28027: Remove Lib/plat-* files 2016-09-08 11:38:46 -07:00
Eric Snow 97be87a5c8 Issue #15352: Rebuild frozen modules when marshal.c is changed. 2016-09-07 18:48:06 -07:00
Steve Dower 22d0698d3b Adds test.support.PGO and skips tests that are not useful for PGO. 2016-09-06 19:38:15 -07:00
Brett Cannon 63d98bcd4c Issue #26359: Add the --with-optimizations configure flag.
The flag will activate LTO and PGO build support when available.
Thanks to Alecsandur Patrascu of Intel for the original patch.
2016-09-06 17:12:40 -07:00
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) c083476bde Fixes issue26307: The profile-opt build now applys PGO to the built-in modules. 2016-09-06 23:58:32 +00:00
Christian Heimes 3c397e4c39 Fix out-of-tree builds for blake2 2016-09-06 22:35:14 +02:00
Christian Heimes 121b9487d1 Issue #26798: Add BLAKE2 (blake2b and blake2s) to hashlib. 2016-09-06 22:03:25 +02:00
Zachary Ware a582af8a5c Merge with 3.5 2016-08-30 02:12:43 -05:00
Zachary Ware de354bc7fc Include test/test_warnings/data as well 2016-08-30 02:12:27 -05:00
Zachary Ware 6dd11094f2 Merge with 3.5 2016-08-30 01:41:35 -05:00
Zachary Ware 19e5064e24 Include test_tools and test_warnings in install
test_tools is pretty much useless unless somebody copies the scripts
it tests into the proper location, but we might as well install it
anyway to make sure it skips properly.  test_warnings just didn't get
included when it was turned into a package in 94966dfd3bd3.
2016-08-30 00:28:40 -05:00
Benjamin Peterson 201c328524 remove unused list of pgen srcs 2016-08-21 12:53:09 -07:00
Victor Stinner 034fb564b1 Issue #27726: Fix "make tags"
* Memove -t option of ctags. The option was kept for backward compatibility,
  but it was completly removed recently. Patch written by Stéphane Wirtel.
* Set locale to C to call sort. vim expects that the tags file is sorted using
  english collation, so it fails if the locale is french for example. Use
  LC_ALL=C to force english sorting order. .
2016-08-17 14:00:58 +02:00
Victor Stinner cf0ac6a71a Fix "make tags": set locale to C to call sort
vim expects that the tags file is sorted using english collation, so it fails
if the locale is french for example. Use LC_ALL=C to force english sorting
order. Issue #27726.
2016-08-17 13:58:12 +02:00
Victor Stinner 9c4bfa6669 "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.
2016-08-17 13:51:52 +02:00
Victor Stinner f7457001a6 Tests: add --slowest option to buildbots
Display the top 10 slowest tests.
2016-08-17 11:27:40 +02:00
Martin Panter c57e4d16ea Issue #25825: Merge AIX fix from 3.5 2016-08-12 13:26:01 +00:00
Martin Panter 5401e87b01 Issue #25825: Fix references to Modules/python.exp
These were incorrectly changed in revision 88a532a31eb3.
2016-08-12 13:21:05 +00:00
Martin Panter 0c859f362c Issue #27641: Merge cross-compiling improvement from 3.5 2016-08-04 01:53:40 +00:00
Martin Panter 43a94a7e2f Issue #27641: Comment out regeneration rules when cross compiling 2016-07-29 05:52:32 +00:00
Martin Panter 4b53359090 Issue #27490: Merge pgen cross-compile logic from 3.5 2016-07-28 01:30:06 +00:00
Martin Panter eac67be948 Issue #27490: Do not build pgen when cross-compiling
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.
2016-07-28 01:28:27 +00:00
Xavier de Gaye 8d4989687c (merge from 3.5) Issue #26662: Set PYTHON_FOR_GEN in configure
as the Python program to be used for file generation during the build.
2016-07-26 12:55:20 +02:00
Xavier de Gaye fd0d5939bd Issue #26662: Set PYTHON_FOR_GEN in configure
as the Python program to be used for file generation during the build.
2016-07-26 12:48:08 +02:00
Ned Deily b8d3e40567 Issue #23968: Fix installs of the renamed config directory for OS X
framework builds.
2016-06-18 15:58:52 -04:00
doko@ubuntu.com 5553231b91 - Issue #23968: Rename the platform directory from plat-$(MACHDEP) to
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.
2016-06-14 08:55:19 +02:00
Brett Cannon 82029ac14c Issue #27186: add Include/osmodule.h to the proper build rules 2016-06-12 13:21:22 -07:00
Martin Panter cb3a581636 Issue #27229: Merge makefile fix from 3.5 2016-06-07 01:08:48 +00:00
Martin Panter 6827fd867b Issue #27229: Comment in middle of shell command fails on BSD and OS X 2016-06-07 01:07:32 +00:00
Martin Panter bb707607ea Issue #27229: Merge cross-compiling fix from 3.5 2016-06-07 00:30:49 +00:00
Martin Panter 9c2a8f97da Issue #27229: Fix in-tree cross-build rule, by Xavier de Gaye 2016-06-07 00:27:17 +00:00
Martin Panter 3e04d5b306 Issue #27076: Merge spelling from 3.5 2016-05-26 06:03:19 +00:00
Martin Panter 46f50726a0 Issue #27076: Doc, comment and tests spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Martin Panter da28494d0a Issue #22359: Merge cross-compilation fix from 3.5 2016-04-23 01:18:54 +00:00
Martin Panter 1046d5c653 Issue #22359: Disable running cross-compiled _freeze_importlib and pgen
Patch by Xavier de Gaye.
2016-04-23 00:58:44 +00:00
Gregory P. Smith 79a12a2aa5 Issue #25702: A --with-lto configure option has been added that will
enable link time optimizations at build time during a make profile-opt.
2016-04-15 16:58:51 -07:00
Gregory P. Smith d82da9f7f2 Issue #25702: A --with-lto configure option has been added that will
enable link time optimizations at build time during a make profile-opt.
2016-04-15 16:57:04 -07:00
Gregory P. Smith 65f315e1ef Exclude super long running tests from the PROFILE_TASK for PGO
builds.  multiprocessing and subprocess tests in particular
along with test_asyncore and test_gdb.  Running them does not
meaningfully add to the profile guidance.
2016-04-15 16:46:14 -07:00
Gregory P. Smith ad45ab876f Exclude super long running tests from the PROFILE_TASK for PGO
builds.  multiprocessing and subprocess tests in particular
along with test_asyncore and test_gdb.  Running them does not
meaningfully add to the profile guidance.
2016-04-15 16:45:43 -07:00
doko@ubuntu.com b9e0834f46 Merge 3.5 2016-03-23 12:58:00 +01:00
doko@ubuntu.com 3a56b775da Makefile.pre.in (profile-opt): Fix bashism. 2016-03-23 12:57:29 +01:00
Victor Stinner d65e0c7560 Makefile: change default value of TESTTIMEOUT from 1 hour to 15 min
The whole test suite takes 6 minutes on my laptop. It takes less than 30
minutes on most buildbots. The TESTTIMEOUT is the timeout for a single test
file.
2016-03-23 02:05:39 +01:00
Serhiy Storchaka 885bdc4946 Issue #25985: sys.version_info is now used instead of sys.version
to format short Python version.
2016-02-11 13:10:36 +02:00
Martin Panter 63d096ddab Issue #24421: Compile _math.c separately to avoid race condition 2016-02-03 05:19:44 +00:00
Martin Panter c9deece272 Issue #24421: Compile _math.c separately to avoid race condition 2016-02-03 05:19:44 +00:00
Zachary Ware 266514ae93 Issue #25827: Merge with 3.5 2015-12-21 14:17:12 -06:00
Zachary Ware 5af856404a Issue #25827: Add support for ICC to configure 2015-12-21 12:09:17 -06:00
Victor Stinner e33baf8b83 Merge 3.5 2015-12-13 21:26:34 +01:00
Victor Stinner 8de795f4d2 Issue #25696: Don't ignore errors in 'make bininstall' on creating $(LIBPC) directory 2015-12-13 21:26:17 +01:00
Victor Stinner 117051afa9 (Merge 3.5) Issue #25696: Fix installation of Python on UNIX with make -j9. 2015-12-13 21:21:36 +01:00
Victor Stinner c2021558ef Issue #25696: Fix installation of Python on UNIX with make -j9. 2015-12-13 21:20:36 +01:00
Victor Stinner dc0965551e Issue #25694: Install test.libregrtest to be able to run tests on the installed
Python
2015-11-22 15:18:40 +01:00
Brett Cannon be7c1638e2 Issue #25188: Add a -P/--pgo flag to regrtest to silence error output.
Since PGO building doesn't care about test failures, silence them when
running the test suite for performance reasons. Initial patch by
Alecsandru Patrascu of Intel.
2015-10-02 16:16:44 -07:00
Brett Cannon 7188a3efe0 Issue #24915: Add Clang support to PGO builds and use the test suite
for profile data.

Thanks to Alecsandru Patrascu of Intel for the initial patch.
2015-09-18 15:13:44 -07:00
Eric Snow 96c6af9b20 Issue #16991: Add a C implementation of collections.OrderedDict. 2015-05-29 22:21:39 -06:00
Eric Snow 32439d6eb6 Issue #23911: Move path-based bootstrap code to a separate frozen module. 2015-05-02 19:15:18 -06:00
doko@ubuntu.com dd2693fc1f - merge 3.4 2015-04-30 13:44:43 +02:00
doko@ubuntu.com ca40e4315c - remove unused EXTRAPLATDIR macro in Makefile.pre.in 2015-04-30 13:44:18 +02:00
Gregory P. Smith 8cb6569fe1 Implements issue #9951: Adds a hex() method to bytes, bytearray, & memoryview.
Also updates a few internal implementations of the same thing to use the
new built-in code.

Contributed by Arnon Yaari.
2015-04-25 23:22:26 +00:00
doko@ubuntu.com ae18f387e4 merge 3.4 2015-04-13 22:10:47 +02:00
doko@ubuntu.com 100aa18556 - Makefile.pre.in (LIBPL): Use the definition from configure.ac 2015-04-13 22:10:21 +02:00
doko@ubuntu.com 4b761bf79a - merge 3.4 2015-04-13 22:00:30 +02:00
doko@ubuntu.com 1345d20193 - Use PLATDIR for the platform directory everywhere (refactoring only) 2015-04-13 21:59:57 +02:00
Brett Cannon f299abdafa Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Nick Coghlan 8d11ccceeb Rebuild _freeze_importlib.o when Makefile changes 2015-04-13 11:30:49 -04:00
Robert Collins c7965e0c21 Issue #23585: make patchcheck will ensure the interpreter is built. 2015-03-16 15:30:31 +13:00
Ned Deily 914db0f11c Issue #23285: Install new test directory. 2015-02-08 15:48:40 +11:00
Gregory P. Smith 28fe496598 Fixes issue23390: make profile-opt causes -fprofile-generate and related flags
to end up in distutils CFLAGS.
2015-02-04 02:16:13 -08:00
Gregory P. Smith 2f90aa6366 Fixes issue23390: make profile-opt causes -fprofile-generate and related flags
to end up in distutils CFLAGS.
2015-02-04 02:11:56 -08:00
Ned Deily 7c562f670c Issue #17636: Install new test directories. 2014-12-13 02:05:15 -08:00
Nick Coghlan d600951748 Issue #22869: Split pythonrun into two modules
- interpreter startup and shutdown code moved to a new
  pylifecycle.c module
- Py_OptimizeFlag moved into the new module with the other
  global flags
2014-11-20 21:39:37 +10:00
Georg Brandl 4f8fed28f0 merge with 3.4 2014-10-06 16:19:20 +02:00
Georg Brandl 2a3e396b24 Closes #21480: better explanation of "hg touch" in the Makefile. 2014-10-06 14:58:17 +02:00
Antoine Pitrou 895ce149c1 Issue #22359: Remove incorrect uses of recursive make. Patch by Jonas Wagner. 2014-09-21 00:21:58 +02:00
Ned Deily 87018afeae Issue #21166: fix typo in comment 2014-08-23 18:10:49 -07:00
Ned Deily ec7aaf5de4 Issue #21166: fix typo in comment 2014-08-23 18:10:16 -07:00
Ned Deily 682c04c70c Issue #21166: merge from 3.4 2014-08-22 13:36:30 -07:00
Ned Deily fcbc246e9f Issue #21166: Prevent possible segfaults and other random failures of
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.
2014-08-22 13:32:49 -07:00
Benjamin Peterson acb8c52343 add -Werror=declaration-after-statement only to stdlib extension modules (closes #21121)
Patch from Stefan Krah.
2014-08-09 20:01:49 -07:00
Benjamin Peterson b30802b7a8 merge 3.4 (#21121) 2014-08-09 20:04:19 -07:00
Nick Coghlan 973fe0ba7a Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
Ned Deily 05278eeac9 Issue 21383: merge from 3.4 2014-05-11 21:47:21 -07:00
Ned Deily a869fd3dc0 Issue #21383: Allow "make touch" to work when building outside of the
source directory.
2014-05-11 21:45:13 -07:00
Thomas Wouters 67d8dc1f58 Fix Tools/scripts/generate_opcode_h.py from issue #17861 to work correctly
when building in a separate object tree. More people should build this way.
This may still fail if the source is unwritable, I haven't tested that yet.
2014-04-17 01:13:29 +02:00
Kushal Das 02d23a212a Closes Issue 17861: Autogenerate Include/opcode.h from opcode.py.
It includes required changes in Makefile.pre.in and configure.ac
among other files.
2014-04-15 23:50:06 +05:30
Ned Deily 490e53b853 Issue #21097: Update Makefile with changed install locations of test directories. 2014-04-08 18:54:49 -07:00
Ned Deily 2f2ecaa484 Issue #19990: Install test/imghdrdata. 2014-02-02 14:00:39 -08:00
Ned Deily 6bb21c48bc Issue #19990: Install test/imghdrdata. 2014-02-02 13:59:49 -08:00
Martin v. Löwis 24e43308b7 * Issue #16113: Remove sha3 module again.
Patch by Christian Heimes, with modifications.
2014-01-03 14:05:06 +01:00
Charles-François Natali 250a452fcf Issue #19965: Make sure that Python-ast.h is properly taken into account in the
makefile.
2013-12-15 19:12:52 +01:00
Charles-François Natali 46c686fc40 Issue #19965: Make sure that Python-ast.h is properly taken into account in the
makefile.
2013-12-15 19:09:00 +01:00
Christian Heimes 1969e01ae5 Fix make distclean for out-of-tree builds 2013-11-24 03:32:51 +01:00
Christian Heimes f8471862d6 Fix make distclean for out-of-tree builds 2013-11-24 03:32:40 +01:00
Larry Hastings dcd340eeeb Issue #19358: "make clinic" now runs the Argument Clinic preprocessor
over all CPython source files.
2013-11-23 14:58:45 -08:00
Ned Deily 322f5ba0d8 Issue #19553: PEP 453 - "make install" and "make altinstall" now install or
upgrade pip by default, using the bundled pip provided by the new ensurepip
module.  A new configure option, --with-ensurepip[=upgrade|install|no], is
available to override the default ensurepip "--upgrade" option.  The option
can also be set with "make [alt]install ENSUREPIP=[upgrade|install\no]".
2013-11-21 23:01:59 -08:00
Ned Deily b8f944f0b7 Issue #19649: On OS X, the same set of file names are now installed
in bin directories for all configurations: non-framework vs framework,
and single arch vs universal builds.  pythonx.y-32 is now always
installed for 64-bit/32-bit universal builds.  The obsolete and
undocumented pythonw* symlinks are no longer installed anywhere.
2013-11-21 22:42:25 -08:00
Christian Heimes 985ecdcfc2 ssue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.
Python now uses SipHash24 on all major platforms.
2013-11-20 11:46:18 +01:00
Nick Coghlan d0cf0635b3 Close #19406: Initial implementation of ensurepip
Patch by Donald Stufft and Nick Coghlan
2013-11-11 22:11:55 +10:00
Ned Deily db5ab780e8 Issue #15392: merge from 3.3 2013-11-03 20:09:51 -08:00