Commit 04f4515f authored by Kevin Modzelewski's avatar Kevin Modzelewski

Get rid of the numpy patch

parent 7f84725f
......@@ -46,8 +46,6 @@ if not os.path.exists(CYTHON_DIR):
else:
print ">>> Cython already installed."
NUMPY_PATCH_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__), "../integration/numpy_patch.patch"))
print_progress_header("Cloning up NumPy...")
if not os.path.exists(NUMPY_DIR):
url = "https://github.com/numpy/numpy"
......@@ -55,12 +53,6 @@ if not os.path.exists(NUMPY_DIR):
else:
print ">>> NumPy already installed."
PATCH_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__), "../integration/numpy_patch.patch"))
if USE_CUSTOM_PATCHES:
print_progress_header("Patching NumPy...")
subprocess.check_call(["patch", "-p1", "--input=" + PATCH_FILE], cwd=NUMPY_DIR)
try:
env = os.environ
CYTHON_BIN_DIR = os.path.abspath(os.path.join(ENV_NAME + "/bin"))
......@@ -76,25 +68,14 @@ try:
print_progress_header("Installing NumPy...")
subprocess.check_call([PYTHON_EXE, "setup.py", "install"], cwd=NUMPY_DIR, env=env)
except:
if USE_CUSTOM_PATCHES:
print_progress_header("Unpatching NumPy...")
cmd = ["patch", "-p1", "--forward", "-i", NUMPY_PATCH_FILE, "-R", "-d", NUMPY_DIR]
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
# TODO: I'm not sure we need to do this:
subprocess.check_call(["rm", "-rf", NUMPY_DIR + "/build"])
subprocess.check_call(["rm", "-rf", NUMPY_DIR + "/dist"])
raise
try:
test_helper.run_test(['sh', '-c', '. %s/bin/activate && python %s/numpy/tools/test-installed-numpy.py' % (ENV_DIR, ENV_DIR)],
ENV_NAME, [dict(ran=6139, errors=1, failures=1)])
finally:
if USE_CUSTOM_PATCHES:
print_progress_header("Unpatching NumPy...")
cmd = ["patch", "-p1", "--forward", "-i", NUMPY_PATCH_FILE, "-R", "-d", NUMPY_DIR]
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
test_helper.run_test(['sh', '-c', '. %s/bin/activate && python %s/numpy/tools/test-installed-numpy.py' % (ENV_DIR, ENV_DIR)],
ENV_NAME, [dict(ran=6139, failures=1)])
print
print "PASSED"
diff --git a/numpy/core/src/multiarray/compiled_base.c b/numpy/core/src/multiarray/compiled_base.c
index b9db3bb..2d24efc 100644
--- a/numpy/core/src/multiarray/compiled_base.c
+++ b/numpy/core/src/multiarray/compiled_base.c
@@ -1337,13 +1337,13 @@ arr_add_docstring(PyObject *NPY_UNUSED(dummy), PyObject *args)
_ADDDOC(Type, new->tp_doc, new->tp_name);
}
else if (_TESTDOC2(MemberDescr)) {
- _ADDDOC(MemberDescr, new->d_member->doc, new->d_member->name);
+ /* _ADDDOC(MemberDescr, new->d_member->doc, new->d_member->name); */
}
else if (_TESTDOC2(GetSetDescr)) {
- _ADDDOC(GetSetDescr, new->d_getset->doc, new->d_getset->name);
+ /* _ADDDOC(GetSetDescr, new->d_getset->doc, new->d_getset->name); */
}
else if (_TESTDOC2(MethodDescr)) {
- _ADDDOC(MethodDescr, new->d_method->ml_doc, new->d_method->ml_name);
+ /* _ADDDOC(MethodDescr, new->d_method->ml_doc, new->d_method->ml_name); */
}
else {
PyObject *doc_attr;
......@@ -86,8 +86,6 @@ if not os.path.exists(CYTHON_DIR):
else:
print ">>> Cython already installed."
NUMPY_PATCH_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__), "numpy_patch.patch"))
print_progress_header("Cloning up NumPy...")
if not os.path.exists(NUMPY_DIR):
url = "https://github.com/numpy/numpy"
......@@ -95,12 +93,6 @@ if not os.path.exists(NUMPY_DIR):
else:
print ">>> NumPy already installed."
PATCH_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__), "numpy_patch.patch"))
if USE_CUSTOM_PATCHES:
print_progress_header("Patching NumPy...")
subprocess.check_call(["patch", "-p1", "--input=" + PATCH_FILE], cwd=NUMPY_DIR)
try:
env = os.environ
CYTHON_BIN_DIR = os.path.abspath(os.path.join(ENV_NAME + "/bin"))
......@@ -112,12 +104,6 @@ try:
print_progress_header("Installing NumPy...")
subprocess.check_call([PYTHON_EXE, "setup.py", "install"], cwd=NUMPY_DIR, env=env)
except:
if USE_CUSTOM_PATCHES:
print_progress_header("Unpatching NumPy...")
cmd = ["patch", "-p1", "--forward", "-i", NUMPY_PATCH_FILE, "-R", "-d", NUMPY_DIR]
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
# TODO: I'm not sure we need to do this:
subprocess.check_call(["rm", "-rf", NUMPY_DIR + "/build"])
subprocess.check_call(["rm", "-rf", NUMPY_DIR + "/dist"])
......@@ -190,10 +176,5 @@ print_progress_header("Running NumPy test suite...")
# when all the crashes are fixed.
# subprocess.check_call([PYTHON_EXE, "-c", numpy_test], cwd=CYTHON_DIR)
if USE_CUSTOM_PATCHES:
print_progress_header("Unpatching NumPy...")
cmd = ["patch", "-p1", "--forward", "-i", NUMPY_PATCH_FILE, "-R", "-d", NUMPY_DIR]
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
print
print "PASSED"
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