Commit 928d5de2 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Need to handle the zip_safe issues as well

Do it by patching distutils, which setuptools I guess builds on
parent 64d40697
......@@ -100,6 +100,10 @@ def setup(**attrs):
else:
klass = Distribution
# Pyston change:
if "zip_safe" not in attrs:
attrs['zip_safe'] = False
if 'script_name' not in attrs:
attrs['script_name'] = os.path.basename(sys.argv[0])
if 'script_args' not in attrs:
......
......@@ -94,7 +94,7 @@ def compile(file, cfile=None, dfile=None, doraise=False, force=False):
# Pyston restrictions for things that we don't yet support
assert cfile is None or cfile == file + "c"
assert dfile is None
assert dfile is None or dfile == file
try:
__pyston__.py_compile(file, force)
......
......@@ -847,8 +847,7 @@ void setupSys() {
new BoxedBuiltinFunctionOrMethod(BoxedCode::create(
(void*)sysGetRecursionLimit, UNKNOWN, 0, "getrecursionlimit", getrecursionlimit_doc)));
// As we don't support compile() etc yet force 'dont_write_bytecode' to true.
sys_module->giveAttrBorrowed("dont_write_bytecode", Py_True);
sys_module->giveAttr("dont_write_bytecode", boxBool(Py_DontWriteBytecodeFlag));
sys_module->giveAttr("prefix", boxString(Py_GetPrefix()));
sys_module->giveAttr("exec_prefix", boxString(Py_GetExecPrefix()));
......
......@@ -42,6 +42,7 @@ if not os.path.exists(CYTHON_DIR):
subprocess.check_call([PYTHON_EXE, "-c", "import Cython"], cwd=CYTHON_DIR)
except:
subprocess.check_call(["rm", "-rf", CYTHON_DIR])
raise
else:
print ">>> Cython already installed."
......@@ -62,6 +63,9 @@ try:
# but they end up naming f2py "f2py_release"/"f2py_dbg"
print_progress_header("Setting up NumPy...")
os.environ["CC"] = "ccache gcc"
print "\ndoing 'build'\n"
subprocess.check_call([PYTHON_EXE, "setup.py", "build"], cwd=NUMPY_DIR, env=env)
print_progress_header("Installing NumPy...")
......
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