summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40947: getpath.c uses PyConfig.platlibdir (GH-20807) (GH-20813)Victor Stinner2020-06-111-2/+0
| | | | | | | | | | | | Followup of bpo-40854, there is one remaining usage of PLATLIBDIR which should be replaced by config->platlibdir. test_sys checks that sys.platlibdir attribute exists and is a string. Update Makefile: getpath.c and sysmodule.c no longer need PLATLIBDIR macro, PyConfig.platlibdir member is used instead. Co-authored-by: Sandro Mani <manisandro@gmail.com> (cherry picked from commit d72b9644a3e6eec83be48b1ebc2ec6ca776134d3)
* bpo-40939: Generate keyword.py using the new parser (GH-20800)Miss Islington (bot)2020-06-111-3/+4
| | | | | (cherry picked from commit 9727694f08cad4b019d2939224e3416312b1c0e1) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-40684: Fix make install for platlibdir=lib64 (GH-20736)Miss Islington (bot)2020-06-091-1/+1
| | | | | | | | | "make install" now uses the PLATLIBDIR variable for the destination lib-dynload/ directory when ./configure --with-platlibdir is used. Update --with-platlibdir comment in configure. (cherry picked from commit 51ae31e5b93b986e57a7e18e25f981a6ffcdefb7) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var ↵Victor Stinner2020-06-081-0/+5
| | | | | | | (GH-20605) (GH-20725) (cherry picked from commit 8f023a2f664f902a3d0b7a6f64d63afc0d1c15ae) Co-authored-by: Sandro Mani <manisandro@gmail.com>
* bpo-40683: Add zoneinfo to LIBSUBDIRS (GH-20229)Miss Islington (bot)2020-05-191-1/+3
| | | | | | | | Without this, only the _zoneinfo module is getting installed, not the zoneinfo module. I believe this was not noticed earlier because test.test_zoneinfo was also not being installed. (cherry picked from commit 2abededbc4165d2daa14ae9d74b1f33cce0593d7) Co-authored-by: Paul Ganssle <paul@ganssle.io>
* bpo-40528: Improve AST generation script to do builds simultaneously (GH-19968)Batuhan Taskaya2020-05-181-8/+6
| | | | | | - Switch from getopt to argparse. - Removed the limitation of not being able to produce both C and H simultaneously. This will make it run faster since it parses the asdl definition once and uses the generated tree to generate both the header and the C source.
* Revert "bpo-26317: Support OBJC and OBJCXX configure command line variables ↵Ned Deily2020-05-181-12/+1
| | | | | | | | | (GH-20176)" (GH-20182) This reverts commit 0da546665075aefbb476e192ed64122d340164f4. The commit is causing make failures on a FreeBSD buildbot. Due to the imminent 3.9.0b1 cutoff, revert this commit for now pending further investigation.
* bpo-26317: Support OBJC and OBJCXX configure command line variables (GH-20176)Ned Deily2020-05-181-1/+12
| | | | | | Add support to the configure script for OBJC and OBJCXX command line options so that the macOS builds can use the clang compiler for the macOS-specific Objective C source files. This allows third-party compilers, like GNU gcc, to be used to build the rest of the project since some of the Objective C system header files are not compilable by GNU gcc. Co-authored-by: Jeffrey Kintscher <websurfer@surf2c.net> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-40503: PEP 615: Tests and implementation for zoneinfo (GH-19909)Paul Ganssle2020-05-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-40602: Rename hashtable.h to pycore_hashtable.h (GH-20044)Victor Stinner2020-05-121-0/+2
| | | | | | | * Move Modules/hashtable.h to Include/internal/pycore_hashtable.h * Move Modules/hashtable.c to Python/hashtable.c * Python is now linked to hashtable.c. _tracemalloc is no longer linked to hashtable.c. Previously, marshal.c got hashtable.c via _tracemalloc.c which is built as a builtin module.
* bpo-38787: C API for module state access from extension methods (PEP 573) ↵Petr Viktorin2020-05-071-0/+1
| | | | | | | | | (GH-19936) Module C state is now accessible from C-defined heap type methods (PEP 573). Patch by Marcel Plch and Petr Viktorin. Co-authored-by: Marcel Plch <mplch@redhat.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* Call $(MKDIR_P) before regenerating the PEG meta-parser (GH-19861)Pablo Galindo2020-05-021-0/+1
|
* bpo-40334: regenerate metaparser as part of regen-all (GH-19854)Pablo Galindo2020-05-021-2/+11
|
* bpo-40421: Add Include/cpython/code.h header file (GH-19756)Victor Stinner2020-04-281-0/+1
| | | | | | | | | | | bpo-35134, bpo-40421: Add Include/cpython/code.h header file. code.h now defines PyCodeObject type in the limited C API. It is now included by Python.h. Give a name to the PyCodeObject structure: it is now called "struct PyCodeObject". So it becomes possible to define PyCodeObject as "struct PyCodeObject" in the limited C API without defining the structure.
* bpo-40421: Add pyframe.h header file (GH-19755)Victor Stinner2020-04-281-0/+1
| | | | | | | | | | Add a new separated pyframe.h header file of the PyFrame public C API: it is included by Python.h. Add PyFrame_GetLineNumber() to the limited C API. Replace "struct _frame" with "PyFrameObject" in header files. PyFrameObject is now defined as struct _frame by pyframe.h which is included early enough in Python.h.
* bpo-40334: Refactor peg_generator to receive a Tokens file when building c ↵Pablo Galindo2020-04-281-1/+3
| | | | code (GH-19745)
* Add files in tests/test_peg_generator to the install target lists (GH-19723)Pablo Galindo2020-04-271-0/+1
| | | Update the "Makefile.pre.in" template and the "PCbuild/lib.pyproj" with the files in "Lib/test/test/test_peg_generator" so they get correctly installed along the rest of the standard library.
* Fix broken mkdir -p call in regen-pegen (#19695)Guido van Rossum2020-04-231-1/+1
| | | We should use `$(MKDIR_P) <directory>`, not `$(MKDIR_P) -p <directory>`.
* bpo-40334: Improve various PEG-Parser related stuff (GH-19669)Lysandros Nikolaou2020-04-231-1/+1
| | | The changes in this commit are all related to @vstinner's original review comments of the initial PEP 617 implementation PR.
* bpo-40334: Fix builds outside the source directory and regenerate autoconf ↵Pablo Galindo2020-04-231-0/+1
| | | | files (GH-19667)
* bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)Pablo Galindo2020-04-221-3/+23
| | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* bpo-40302: Add pycore_byteswap.h header file (GH-19552)Victor Stinner2020-04-171-0/+1
| | | | | | | | | | | | | | Add a new internal pycore_byteswap.h header file with the following functions: * _Py_bswap16() * _Py_bswap32() * _Py_bswap64() Use these functions in _ctypes, sha256 and sha512 modules, and also use in the UTF-32 encoder. sha256, sha512 and _ctypes modules are now built with the internal C API.
* bpo-40241: Add pycore_interp.h header (GH-19499)Victor Stinner2020-04-131-0/+1
| | | | Move PyInterpreterState and related functions to a new internal pycore_interp.h header file.
* bpo-40268: Add pycore_runtime.h header file (GH-19493)Victor Stinner2020-04-131-0/+1
| | | | | | Move PyRuntimeState from pycore_pystate.h to pycore_runtime.h. Remove _PyGILState_check_enabled macro: access directly _PyRuntime.gilstate.check_enabled.
* bpo-40170: Add _PyIndex_Check() internal function (GH-19426)Victor Stinner2020-04-081-0/+1
| | | | | | | | | Add _PyIndex_Check() function to the internal C API: fast inlined verson of PyIndex_Check(). Add Include/internal/pycore_abstract.h header file. Replace PyIndex_Check() with _PyIndex_Check() in C files of Objects and Python subdirectories.
* bpo-39481: Implementation for PEP 585 (#18239)Guido van Rossum2020-04-071-0/+1
| | | | | | | | | | | | This implements things like `list[int]`, which returns an object of type `types.GenericAlias`. This object mostly acts as a proxy for `list`, but has attributes `__origin__` and `__args__` that allow recovering the parts (with values `list` and `(int,)`. There is also an approximate notion of type variables; e.g. `list[T]` has a `__parameters__` attribute equal to `(T,)`. Type variables are objects of type `typing.TypeVar`.
* bpo-38644: Add _PySys_Audit() which takes tstate (GH-19180)Victor Stinner2020-03-261-0/+1
| | | | | | | | | | | | | | | Add _PySys_Audit() function to the internal C API: similar to PySys_Audit(), but requires a mandatory tstate parameter. Cleanup sys_audit_tstate() code: remove code path for NULL tstate, since the function exits at entry if tstate is NULL. Remove also code path for NULL tstate->interp: should_audit() now ensures that it is not NULL (even if tstate->interp cannot be NULL in practice). PySys_AddAuditHook() now checks if tstate is not NULL to decide if tstate can be used or not, and tstate is set to NULL if the runtime is not initialized yet. Use _PySys_Audit() in sysmodule.c.
* bpo-40069: Clear out .lst files on make clean (GH-19169)Batuhan Taşkaya2020-03-261-0/+1
| | | Files created on AIX by xlc (C compiler).
* bpo-1294959: Add sys.platlibdir attribute (GH-18381)Victor Stinner2020-03-101-1/+4
| | | | | | | | | | | | | 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-35134: Add Include/cpython/fileutils.h header file (GH-18493)Victor Stinner2020-02-121-0/+1
| | | | | | | | | | | | Move CPython C API from Include/fileutils.h into a new Include/cpython/fileutils.h header file which is included by Include/fileutils.h. Exclude the following private symbols from the limited C API: * _Py_error_handler * _Py_GetErrorHandler() * _Py_DecodeLocaleEx() * _Py_EncodeLocaleEx()
* bpo-35134: Add Include/cpython/bytesobject.h file (GH-18494)Victor Stinner2020-02-121-0/+2
| | | | | | | | | Add Include/cpython/bytearrayobject.h and Include/cpython/bytesobject.h header files. Move CPython C API from Include/bytesobject.h into a new Include/cpython/bytesobject.h header file which is included by Include/bytesobject.h. Do a similar change for Include/bytearrayobject.h.
* bpo-35081: Move dtoa.h header to the internal C API (GH-18489)Victor Stinner2020-02-121-1/+1
| | | | | | | Move the dtoa.h header file to the internal C API as pycore_dtoa.h: it only contains private functions (prefixed by "_Py"). The math and cmath modules must now be compiled with the Py_BUILD_CORE macro defined.
* bpo-35081: Move bytes_methods.h to the internal C API (GH-18492)Victor Stinner2020-02-121-1/+1
| | | | | Move the bytes_methods.h header file to the internal C API as pycore_bytes_methods.h: it only contains private symbols (prefixed by "_Py"), except of the PyDoc_STRVAR_shared() macro.
* closes bpo-39575: Change -lgcov to --coverage. (GH-18382)Fangrui Song2020-02-071-1/+1
| | | | This allows clang to get rid of the dependency on libgcov. When linking, GCC passes -lgcov while clang passes the path to libclang_rt.profile-$arch.a
* bpo-35134: Create Include/cpython/listobject.h (GH-18395)Victor Stinner2020-02-071-0/+1
| | | | | | | | | Move listobject.h code surrounded by "#ifndef Py_LIMITED_API" to a new Include/cpython/listobject.h header file. Add cpython/ header files to Makefile.pre.in and pythoncore project of PCbuild. Add _PyList_CAST() macro.
* Add test.test_import.data.unwritable package to makefile (#18211)Dino Viehland2020-01-271-0/+1
|
* bpo-39144 Align ctags and etags behaviours in the makefile and include ↵Anthony Shaw2019-12-281-0/+3
| | | | Python stdlib files (GH-17721)
* bpo-38644: Add _PyObject_Call() (GH-17089)Victor Stinner2019-11-141-0/+1
| | | | | | | | | | * Add pycore_call.h internal header file. * Add _PyObject_Call(): PyObject_Call() with tstate * Add _PyObject_CallNoArgTstate(): _PyObject_CallNoArg() with tstate * Add _PyObject_FastCallDictTstate(): _PyObject_FastCallDict() with tstate * _PyObject_Call_Prepend() now takes tstate * Replace _PyObject_FastCall() calls with _PyObject_VectorcallTstate() calls
* bpo-38644: Add Py_EnterRecursiveCall() to the limited API (GH-17046)Victor Stinner2019-11-041-0/+1
| | | | | | | | | | Provide Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() as regular functions for the limited API. Previously, there were defined as macros, but these macros didn't work with the limited API which cannot access PyThreadState.recursion_depth field. Remove _Py_CheckRecursionLimit from the stable ABI. Add Include/cpython/ceval.h header file.
* bpo-28494: install ziptestdata to fix install bot (GH-15902)Gregory P. Smith2019-09-111-0/+1
|
* bpo-37725: have "make clean" remove PGO task data (#15033)Neil Schemenauer2019-09-101-6/+15
| | | | | Change "clean" makefile target to also clean the program guided optimization (PGO) data. Previously you would have to use "make clean" and "make profile-removal", or "make clobber".
* bpo-37589: Add a few missing dependencies on .h files in the Makefile. ↵T. Wouters2019-09-091-7/+11
| | | | | | (GH-15757) The missing dependencies prevented incremental builds from working when you touched any of these files. Based on GH-14758 by @vemakereporter.
* bpo-37653: Fix libinstall target in Makefile (GH-14911)Erlend Egeberg Aasland2019-07-231-2/+0
|
* bpo-36044: Reduce number of unit tests run for PGO build (GH-14702)Neil Schemenauer2019-07-221-3/+4
| | | | | | | | | | | | Reduce the number of unit tests run for the PGO generation task. This speeds up the task by a factor of about 15x. Running the full unit test suite is slow. This change may result in a slightly less optimized build since not as many code branches will be executed. If you are willing to wait for the much slower build, the old behavior can be restored using './configure [..] PROFILE_TASK="-m test --pgo-extended"'. We make no guarantees as to which PGO task set produces a faster build. Users who care should run their own relevant benchmarks as results can depend on the environment, workload, and compiler tool chain.
* bpo-37468: make install no longer install wininst-*.exe files (GH-14511)Victor Stinner2019-07-151-0/+3
| | | | make install no longer installs "wininst-*.exe" files used by distutils bdist_wininst: bdist_wininst only works on Windows.
* bpo-37359: Add --cleanup option to python3 -m test (GH-14332)Victor Stinner2019-06-241-0/+5
| | | | | * regrtest: Add --cleanup option to remove "test_python_*" directories of previous failed test jobs. * Add "make cleantest" to run "python3 -m test --cleanup".
* bpo-35134: Add Include/cpython/import.h header file (GH-14213)Victor Stinner2019-06-181-0/+2
| | | | | | * Add Include/cpython/import.h and Include/internal/pycore_import.h header files. * Move _PyImport_ReInitLock() to the internal C API. Don't export the symbol anymore.
* bpo-37215: Fix dtrace issue introduce by bpo-36842 (GH-13940)Christian Heimes2019-06-101-5/+5
| | | | | | Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37215
* bpo-26219: per opcode cache for LOAD_GLOBAL (GH-12884)Inada Naoki2019-06-031-0/+1
| | | | | | This patch implements per opcode cache mechanism, and use it in only LOAD_GLOBAL opcode. Based on Yury's opcache3.patch in bpo-26219.
* bpo-36763: Implement the PEP 587 (GH-13592)Victor Stinner2019-05-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a whole new documentation page: "Python Initialization Configuration" * PyWideStringList_Append() return type is now PyStatus, instead of int * PyInterpreterState_New() now calls PyConfig_Clear() if PyConfig_InitPythonConfig() fails. * Rename files: * Python/coreconfig.c => Python/initconfig.c * Include/cpython/coreconfig.h => Include/cpython/initconfig.h * Include/internal/: pycore_coreconfig.h => pycore_initconfig.h * Rename structures * _PyCoreConfig => PyConfig * _PyPreConfig => PyPreConfig * _PyInitError => PyStatus * _PyWstrList => PyWideStringList * Rename PyConfig fields: * use_module_search_paths => module_search_paths_set * module_search_path_env => pythonpath_env * Rename PyStatus field: _func => func * PyInterpreterState: rename core_config field to config * Rename macros and functions: * _PyCoreConfig_SetArgv() => PyConfig_SetBytesArgv() * _PyCoreConfig_SetWideArgv() => PyConfig_SetArgv() * _PyCoreConfig_DecodeLocale() => PyConfig_SetBytesString() * _PyInitError_Failed() => PyStatus_Exception() * _Py_INIT_ERROR_TYPE_xxx enums => _PyStatus_TYPE_xxx * _Py_UnixMain() => Py_BytesMain() * _Py_ExitInitError() => Py_ExitStatusException() * _Py_PreInitializeFromArgs() => Py_PreInitializeFromBytesArgs() * _Py_PreInitializeFromWideArgs() => Py_PreInitializeFromArgs() * _Py_PreInitialize() => Py_PreInitialize() * _Py_RunMain() => Py_RunMain() * _Py_InitializeFromConfig() => Py_InitializeFromConfig() * _Py_INIT_XXX() => _PyStatus_XXX() * _Py_INIT_FAILED() => _PyStatus_EXCEPTION() * Rename 'err' PyStatus variables to 'status' * Convert RUN_CODE() macro to config_run_code() static inline function * Remove functions: * _Py_InitializeFromArgs() * _Py_InitializeFromWideArgs() * _PyInterpreterState_GetCoreConfig()