[pypy-commit] pypy hpy: move the _vendored directory one level up and reorganize things until tests pass again

antocuni pypy.commits at gmail.com
Mon Nov 18 06:28:36 EST 2019


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: hpy
Changeset: r98102:c385bc205649
Date: 2019-11-18 09:17 +0100
http://bitbucket.org/pypy/pypy/changeset/c385bc205649/

Log:	move the _vendored directory one level up and reorganize things
	until tests pass again

diff --git a/pypy/module/hpy_universal/test/_vendored/__init__.py b/pypy/module/hpy_universal/_vendored/__init__.py
rename from pypy/module/hpy_universal/test/_vendored/__init__.py
rename to pypy/module/hpy_universal/_vendored/__init__.py
diff --git a/pypy/module/hpy_universal/test/_vendored/include/cpython/hpy.h b/pypy/module/hpy_universal/_vendored/include/cpython/hpy.h
rename from pypy/module/hpy_universal/test/_vendored/include/cpython/hpy.h
rename to pypy/module/hpy_universal/_vendored/include/cpython/hpy.h
diff --git a/pypy/module/hpy_universal/test/_vendored/include/hpy.h b/pypy/module/hpy_universal/_vendored/include/hpy.h
rename from pypy/module/hpy_universal/test/_vendored/include/hpy.h
rename to pypy/module/hpy_universal/_vendored/include/hpy.h
diff --git a/pypy/module/hpy_universal/test/_vendored/include/universal/autogen_ctx.h b/pypy/module/hpy_universal/_vendored/include/universal/autogen_ctx.h
rename from pypy/module/hpy_universal/test/_vendored/include/universal/autogen_ctx.h
rename to pypy/module/hpy_universal/_vendored/include/universal/autogen_ctx.h
diff --git a/pypy/module/hpy_universal/test/_vendored/include/universal/autogen_func.h b/pypy/module/hpy_universal/_vendored/include/universal/autogen_func.h
rename from pypy/module/hpy_universal/test/_vendored/include/universal/autogen_func.h
rename to pypy/module/hpy_universal/_vendored/include/universal/autogen_func.h
diff --git a/pypy/module/hpy_universal/test/_vendored/include/universal/hpy.h b/pypy/module/hpy_universal/_vendored/include/universal/hpy.h
rename from pypy/module/hpy_universal/test/_vendored/include/universal/hpy.h
rename to pypy/module/hpy_universal/_vendored/include/universal/hpy.h
diff --git a/pypy/module/hpy_universal/_vendored/test/__init__.py b/pypy/module/hpy_universal/_vendored/test/__init__.py
new file mode 100644
diff --git a/pypy/module/hpy_universal/test/_vendored/support.py b/pypy/module/hpy_universal/_vendored/test/support.py
rename from pypy/module/hpy_universal/test/_vendored/support.py
rename to pypy/module/hpy_universal/_vendored/test/support.py
diff --git a/pypy/module/hpy_universal/llapi.py b/pypy/module/hpy_universal/llapi.py
--- a/pypy/module/hpy_universal/llapi.py
+++ b/pypy/module/hpy_universal/llapi.py
@@ -1,11 +1,9 @@
-import os
+import py
 from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
+from pypy.module.hpy_universal import _vendored
 
-# XXX temporary location
-INCLUDE_DIR = os.path.join(os.path.dirname(__file__),
-                           "test", "_vendored", "include")
-
+INCLUDE_DIR = str(py.path.local(_vendored.__file__).dirpath().join('include'))
 eci = ExternalCompilationInfo(includes=["universal/hpy.h"],
                               include_dirs=[INCLUDE_DIR],
                               post_include_bits=["""
diff --git a/pypy/module/hpy_universal/test/support.py b/pypy/module/hpy_universal/test/support.py
--- a/pypy/module/hpy_universal/test/support.py
+++ b/pypy/module/hpy_universal/test/support.py
@@ -1,11 +1,11 @@
 import py
 import pytest
+from rpython.tool.udir import udir
 from pypy.interpreter.gateway import interp2app, unwrap_spec
+from pypy.module.hpy_universal.llapi import INCLUDE_DIR
+from pypy.module.hpy_universal._vendored.test import support as _support
 
-from rpython.tool.udir import udir
-from ._vendored import support as _support
 
-INCLUDE_DIR = str(py.path.local(__file__).dirpath().join('_vendored/include'))
 
 class ExtensionCompiler(object):
     def __init__(self, base_dir):


More information about the pypy-commit mailing list