Commit 26dabd18 authored by Kevin Modzelewski's avatar Kevin Modzelewski Committed by Kevin Modzelewski

Rebuild extension modules when we change headers

I think we track the dependency correctly in cmake, but distutils
doesn't know that the system headers can change from underneath it,
so manually specify them as extra dependencies.
parent 0edbf989
# CPython has a 2kloc version of this file
from distutils.core import setup, Extension
import glob
import os
import sysconfig
......@@ -132,5 +133,10 @@ ext_modules = [future_builtins_ext(),
curses_ext(),
termios_ext()]
builtin_headers = map(relpath, glob.glob("Include/*.h"))
for m in ext_modules:
m.depends += builtin_headers
setup(name="Pyston", version="1.0", description="Pyston shared modules", ext_modules=ext_modules)
from distutils.core import setup, Extension
import glob
import os
setup(name="test",
version="1.0",
description="test",
ext_modules=[
extensions = [
Extension("basic_test", sources = ["basic_test.c"]),
Extension("descr_test", sources = ["descr_test.c"]),
Extension("slots_test", sources = ["slots_test.c"]),
],
]
def relpath(fn):
r = os.path.join(os.path.dirname(__file__), fn)
return r
print glob.glob("../from_cpython/Include/*.h")
builtin_headers = map(relpath, glob.glob("../../from_cpython/Include/*.h"))
for m in extensions:
m.depends += builtin_headers
setup(name="test",
version="1.0",
description="test",
ext_modules=extensions,
)
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