diff -up src/module_list.py.orig src/module_list.py --- src/module_list.py.orig 2016-10-20 08:01:32.743523078 -0400 +++ src/module_list.py 2016-10-20 08:01:43.593523493 -0400 @@ -3,7 +3,7 @@ from glob import glob from distutils.extension import Extension from sage.env import SAGE_LOCAL -SAGE_INC = os.path.join(SAGE_LOCAL, 'include') +SAGE_INC = '/usr/include' ######################################################### ### pkg-config setup diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py --- src/sage/misc/cython.py.orig 2016-10-20 08:03:03.079526537 -0400 +++ src/sage/misc/cython.py 2016-10-20 08:03:18.761527138 -0400 @@ -433,7 +433,7 @@ extra_compile_args = %s ext_modules = [Extension('%s', sources=['%s.%s', %s], libraries=%s, - library_dirs=[SAGE_LOCAL + '/lib/'] + %s, + library_dirs=[os.path.realpath(SAGE_LOCAL + '/lib/')] + %s, extra_compile_args = extra_compile_args, language = '%s' )] diff -up src/setup.py.orig src/setup.py --- src/setup.py.orig 2016-10-20 08:01:54.264523902 -0400 +++ src/setup.py 2016-10-20 08:02:33.449525402 -0400 @@ -584,11 +584,9 @@ def run_cythonize(): print('Enabling Cython profiling support') profile = True - # Disable Cython caching (the cache is stored in ~/.cycache which is + # Enable Cython caching (the cache is stored in ~/.cycache which is # Cython's default). - # Cycache is currently too broken to use reliably: - # http://trac.sagemath.org/ticket/17851 - Cython.Compiler.Main.default_options['cache'] = False + Cython.Compiler.Main.default_options['cache'] = True force = True version_file = os.path.join(SAGE_CYTHONIZED, '.cython_version') @@ -641,21 +639,6 @@ print("Discovered Python/Cython sources, ######################################################### -### Clean -######################################################### - -print('Cleaning up stale installed files....') -t = time.time() -from sage_setup.clean import clean_install_dir -output_dirs = SITE_PACKAGES + glob.glob(os.path.join(build_base, 'lib*')) -for output_dir in output_dirs: - print('- cleaning {0}'.format(output_dir)) - clean_install_dir(output_dir, python_packages, python_modules, - ext_modules, python_data_files) -print('Finished cleaning, time: %.2f seconds.' % (time.time() - t)) - - -######################################################### ### Install also Jupyter kernel spec #########################################################