Commit ad94658e authored by Roman Yurchak's avatar Roman Yurchak

Force malloc

parent 40605620
......@@ -19,7 +19,7 @@ jobs:
- run:
name: dependencies
command: |
# Download BLAS/LAPACK
# Download BLAS/LAPACK
git clone https://github.com/adrianbg/CLAPACK-WA.git packages/scipy/CLAPACK-WA
- restore_cache:
......
......@@ -13,7 +13,9 @@ source:
patches:
- patches/disable_modules_with_blas.patch
- patches/disable_modules_global_cpp_namespace_issue.patch
- patches/fix-build-gcc5-a80460.patch
- patches/force_malloc.patch
build:
cflags: -I../../CLAPACK-WA/F2CLIBS/libf2c/ -Wno-implicit-function-declaration
......
commit 15e9f01458eec8cf9fc43de6646ee75cfa361859
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Wed Oct 10 14:12:22 2018 +0200
Remove modules with global C++ namespace issue
diff --git a/scipy/interpolate/setup.py b/scipy/interpolate/setup.py
index b42d3345c..2c8279403 100755
--- a/scipy/interpolate/setup.py
+++ b/scipy/interpolate/setup.py
@@ -35,10 +35,10 @@ def configuration(parent_package='',top_path=None):
depends=fitpack_src,
)
- config.add_extension('_interpolate',
- sources=['src/_interpolate.cpp'],
- include_dirs=['src'],
- depends=['src/interpolate.h'])
+ #config.add_extension('_interpolate',
+ # sources=['src/_interpolate.cpp'],
+ # include_dirs=['src'],
+ # depends=['src/interpolate.h'])
config.add_data_dir('tests')
diff --git a/scipy/sparse/setup.py b/scipy/sparse/setup.py
index ecf8ae5c6..27fd128c3 100755
--- a/scipy/sparse/setup.py
+++ b/scipy/sparse/setup.py
@@ -45,17 +45,17 @@ def configuration(parent_package='',top_path=None):
'sparsetools.h',
'util.h']
depends = [os.path.join('sparsetools', hdr) for hdr in depends],
- config.add_extension('_sparsetools',
- define_macros=[('__STDC_FORMAT_MACROS', 1)],
- depends=depends,
- include_dirs=['sparsetools'],
- sources=[os.path.join('sparsetools', 'sparsetools.cxx'),
- os.path.join('sparsetools', 'csr.cxx'),
- os.path.join('sparsetools', 'csc.cxx'),
- os.path.join('sparsetools', 'bsr.cxx'),
- os.path.join('sparsetools', 'other.cxx'),
- get_sparsetools_sources]
- )
+ #config.add_extension('_sparsetools',
+ # define_macros=[('__STDC_FORMAT_MACROS', 1)],
+ # depends=depends,
+ # include_dirs=['sparsetools'],
+ # sources=[os.path.join('sparsetools', 'sparsetools.cxx'),
+ # os.path.join('sparsetools', 'csr.cxx'),
+ # os.path.join('sparsetools', 'csc.cxx'),
+ # os.path.join('sparsetools', 'bsr.cxx'),
+ # os.path.join('sparsetools', 'other.cxx'),
+ # get_sparsetools_sources]
+ # )
return config
diff --git a/scipy/spatial/setup.py b/scipy/spatial/setup.py
index 43b635dec..5b100ac06 100755
--- a/scipy/spatial/setup.py
+++ b/scipy/spatial/setup.py
@@ -58,10 +58,10 @@ def configuration(parent_package='', top_path=None):
ckdtree_headers = [join('ckdtree', 'src', x) for x in ckdtree_headers]
ckdtree_dep = ['ckdtree.cxx'] + ckdtree_headers + ckdtree_src
- config.add_extension('ckdtree',
- sources=['ckdtree.cxx'] + ckdtree_src,
- depends=ckdtree_dep,
- include_dirs=inc_dirs + [join('ckdtree','src')])
+ #config.add_extension('ckdtree',
+ # sources=['ckdtree.cxx'] + ckdtree_src,
+ # depends=ckdtree_dep,
+ # include_dirs=inc_dirs + [join('ckdtree','src')])
# _distance_wrap
config.add_extension('_distance_wrap',
sources=[join('src', 'distance_wrap.c')],
diff --git a/scipy/special/setup.py b/scipy/special/setup.py
index e5efb2e7a..6f75681c0 100755
--- a/scipy/special/setup.py
+++ b/scipy/special/setup.py
@@ -91,18 +91,18 @@ def configuration(parent_package='',top_path=None):
'_faddeeva.cxx', 'Faddeeva.cc']
ufuncs_cxx_dep = (headers + ufuncs_cxx_src + cephes_src
+ ['*.hh'])
- config.add_extension('_ufuncs_cxx',
- sources=ufuncs_cxx_src,
- depends=ufuncs_cxx_dep,
- include_dirs=[curdir],
- define_macros=define_macros,
- extra_info=get_info("npymath"))
-
- cfg = dict(get_system_info('lapack_opt'))
- config.add_extension('_ellip_harm_2',
- sources=['_ellip_harm_2.c', 'sf_error.c',],
- **cfg
- )
+ #config.add_extension('_ufuncs_cxx',
+ # sources=ufuncs_cxx_src,
+ # depends=ufuncs_cxx_dep,
+ # include_dirs=[curdir],
+ # define_macros=define_macros,
+ # extra_info=get_info("npymath"))
+
+ #cfg = dict(get_system_info('lapack_opt'))
+ #config.add_extension('_ellip_harm_2',
+ # sources=['_ellip_harm_2.c', 'sf_error.c',],
+ # **cfg
+ # )
config.add_data_files('tests/*.py')
config.add_data_files('tests/data/README')
diff --git a/scipy/interpolate/setup.py b/scipy/interpolate/setup.py
deleted file mode 100755
index b42d3345c..000000000
--- a/scipy/interpolate/setup.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-from __future__ import division, print_function, absolute_import
-
-from os.path import join
-
-
-def configuration(parent_package='',top_path=None):
- from numpy.distutils.misc_util import Configuration
- from numpy.distutils.system_info import get_info
-
- lapack_opt = get_info('lapack_opt', notfound_action=2)
-
- config = Configuration('interpolate', parent_package, top_path)
-
- fitpack_src = [join('fitpack', '*.f')]
- config.add_library('fitpack', sources=fitpack_src)
-
- config.add_extension('interpnd',
- sources=['interpnd.c'])
-
- config.add_extension('_ppoly',
- sources=['_ppoly.c'],
- **lapack_opt)
-
- config.add_extension('_fitpack',
- sources=['src/_fitpackmodule.c'],
- libraries=['fitpack'],
- depends=(['src/__fitpack.h','src/multipack.h']
- + fitpack_src)
- )
-
- config.add_extension('dfitpack',
- sources=['src/fitpack.pyf'],
- libraries=['fitpack'],
- depends=fitpack_src,
- )
-
- config.add_extension('_interpolate',
- sources=['src/_interpolate.cpp'],
- include_dirs=['src'],
- depends=['src/interpolate.h'])
-
- config.add_data_dir('tests')
-
- return config
-
-if __name__ == '__main__':
- from numpy.distutils.core import setup
- setup(**configuration(top_path='').todict())
commit 96142c968cda5394482c9fe086d0eeaf88d8e4f4
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Mon Oct 8 10:53:11 2018 +0200
Removes files that require LAPACK
diff --git a/scipy/linalg/setup.py b/scipy/linalg/setup.py
deleted file mode 100755
index 2c9b9ba22..000000000
......
diff --git a/scipy/optimize/zeros.c b/scipy/optimize/zeros.c
index e557f37cb..d450b3ed4 100644
--- a/scipy/optimize/zeros.c
+++ b/scipy/optimize/zeros.c
@@ -193,6 +193,10 @@ PyObject *PyInit__zeros(void)
{
PyObject *m;
+ volatile long x;
+ x = (long)malloc(0);
+ free((void*)x);
+
m = PyModule_Create(&moduledef);
return m;
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