Commit cf03864b authored by Matti Picus's avatar Matti Picus
Browse files

fix cpyext for using PC/pyconfig.h on windows, change <> to "" for include priority

--HG--
branch : py3.7
parent 3c63cbfd5f7a
Pipeline #21536 passed with stage
in 9 minutes and 1 second
......@@ -683,4 +683,12 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define if libssl has X509_VERIFY_PARAM_set1_host and related function */
#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1
/* PyPy backport from python2, used in cpyext/src/unicodeobject.c
Remove when the implementation (in c) of PyUnicode_FromFormatV is updated
*/
#define HAVE_LONG_LONG 1
#define PY_FORMAT_LONG_LONG "ll"
#define PY_FORMAT_SIZE_T "z"
#endif /* !Py_CONFIG_H */
......@@ -47,9 +47,16 @@ from pypy.objspace.std.typeobject import W_TypeObject, find_best_base
from rpython.tool.cparser import CTypeSpace
DEBUG_WRAPPER = True
if sys.platform == 'win32':
dash = '_'
WIN32 = True
else:
dash = ''
WIN32 = False
pypydir = py.path.local(pypydir)
include_dir = pypydir / 'module' / 'cpyext' / 'include'
pc_dir = pypydir / 'module' / 'cpyext' / 'PC'
parse_dir = pypydir / 'module' / 'cpyext' / 'parse'
source_dir = pypydir / 'module' / 'cpyext' / 'src'
translator_c_dir = py.path.local(cdir)
......@@ -59,6 +66,8 @@ include_dirs = [
translator_c_dir,
udir,
]
if WIN32:
include_dirs.insert(0, pc_dir)
configure_eci = ExternalCompilationInfo(
include_dirs=include_dirs,
......@@ -92,14 +101,6 @@ assert CONST_WSTRING == rffi.CWCHARP
# FILE* interface
if sys.platform == 'win32':
dash = '_'
WIN32 = True
else:
dash = ''
WIN32 = False
def fclose(fp):
try:
with FdValidator(c_fileno(fp)):
......
......@@ -16,8 +16,6 @@
# define PyAPI_DATA(RTYPE) extern PyAPI_FUNC(RTYPE)
# define Py_LOCAL_INLINE(type) static inline type
#else
# define MS_WIN32 1
# define MS_WINDOWS 1
# ifdef _MSC_VER
# include <crtdefs.h>
# endif
......@@ -71,7 +69,7 @@
// #define PyExc_WindowsError PyExc_OSError
#include "patchlevel.h"
#include "pyconfig.h"
#include <pyconfig.h>
#include "object.h"
#include "typeslots.h"
......
#ifndef Py_PYPORT_H
#define Py_PYPORT_H
#include "pyconfig.h" /* include for defines */
#include <pyconfig.h> /* include for defines */
#include <inttypes.h>
......
......@@ -2,7 +2,7 @@
#ifndef Py_PYTIME_H
#define Py_PYTIME_H
#include "pyconfig.h" /* include for defines */
#include <pyconfig.h> /* include for defines */
#include "object.h"
/**************************************************************************
......
#ifdef _WIN32
# define _WIN32_WINNT 0x0501
#endif
#include <Python.h>
#ifdef _WIN32
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment