mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Added build config to get python.com
Modules/Setup and Modules/Setup.local contain the build recipes for various extensions, wrote a custom script to translate them for python.mk. Modules/config.c needs to be changed if any extensions are removed or added. Most of the source modifications are for missing headers or compile time build vars like ABIFLAGS. Created separate mk files for the C extensions and the Python stdlib. Can use find for adding the python files to the APE ZIP store, but right now necessary files are just hardcoded. python.com loads but some build configs are still missing (showing 1 Jan 1970 as time of compilation).
This commit is contained in:
parent
5ef64dbcdb
commit
98f330b764
45 changed files with 2482 additions and 45 deletions
2
third_party/python/Python/dynload_shlib.c
vendored
2
third_party/python/Python/dynload_shlib.c
vendored
|
@ -17,7 +17,7 @@
|
|||
#endif /* NetBSD */
|
||||
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#include "libc/runtime/dlfcn.h"
|
||||
#endif
|
||||
|
||||
#if (defined(__OpenBSD__) || defined(__NetBSD__)) && !defined(__ELF__)
|
||||
|
|
5
third_party/python/Python/fileutils.c
vendored
5
third_party/python/Python/fileutils.c
vendored
|
@ -1,6 +1,6 @@
|
|||
#include "Python.h"
|
||||
#include "osdefs.h"
|
||||
#include <locale.h>
|
||||
#include "libc/unicode/locale.h"
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
# include <malloc.h>
|
||||
|
@ -13,7 +13,8 @@ extern int winerror_to_errno(int);
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/sysv/consts/fd.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
of int.__float__, etc., that take and return unicode objects */
|
||||
|
||||
#include "Python.h"
|
||||
#include <locale.h>
|
||||
#include "libc/unicode/locale.h"
|
||||
|
||||
/* Raises an exception about an unknown presentation type for this
|
||||
* type. */
|
||||
|
|
2
third_party/python/Python/frozenmain.c
vendored
2
third_party/python/Python/frozenmain.c
vendored
|
@ -2,7 +2,7 @@
|
|||
/* Python interpreter main program for frozen scripts */
|
||||
|
||||
#include "Python.h"
|
||||
#include <locale.h>
|
||||
#include "libc/unicode/locale.h"
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
extern void PyWinFreeze_ExeInit(void);
|
||||
|
|
3
third_party/python/Python/pylifecycle.c
vendored
3
third_party/python/Python/pylifecycle.c
vendored
|
@ -14,7 +14,8 @@
|
|||
#include "ast.h"
|
||||
#include "marshal.h"
|
||||
#include "osdefs.h"
|
||||
#include <locale.h>
|
||||
#include "libc/unicode/locale.h"
|
||||
#include "libc/calls/sigbits.h"
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
|
|
2
third_party/python/Python/pystate.c
vendored
2
third_party/python/Python/pystate.c
vendored
|
@ -23,7 +23,7 @@ to avoid the expense of doing their own locking).
|
|||
|
||||
#ifdef HAVE_DLOPEN
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#include "libc/runtime/dlfcn.h"
|
||||
#endif
|
||||
#if !HAVE_DECL_RTLD_LAZY
|
||||
#define RTLD_LAZY 1
|
||||
|
|
2
third_party/python/Python/pystrtod.c
vendored
2
third_party/python/Python/pystrtod.c
vendored
|
@ -1,7 +1,7 @@
|
|||
/* -*- Mode: C; c-file-style: "python" -*- */
|
||||
|
||||
#include <Python.h>
|
||||
#include <locale.h>
|
||||
#include "libc/unicode/locale.h"
|
||||
|
||||
/* Case-insensitive string match used for nan and inf detection; t should be
|
||||
lower-case. Returns 1 for a successful match, 0 otherwise. */
|
||||
|
|
2
third_party/python/Python/pythonrun.c
vendored
2
third_party/python/Python/pythonrun.c
vendored
|
@ -15,7 +15,7 @@
|
|||
#include "ast.h"
|
||||
#include "marshal.h"
|
||||
#include "osdefs.h"
|
||||
#include <locale.h>
|
||||
#include "libc/unicode/locale.h"
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
|
|
2
third_party/python/Python/sysmodule.c
vendored
2
third_party/python/Python/sysmodule.c
vendored
|
@ -20,7 +20,7 @@ Data members:
|
|||
#include "pythread.h"
|
||||
|
||||
#include "osdefs.h"
|
||||
#include <locale.h>
|
||||
#include "libc/unicode/locale.h"
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue