diff --git a/pkgs/sagemath-categories/tox.ini b/pkgs/sagemath-categories/tox.ini index f05668393cb..831b361256a 100644 --- a/pkgs/sagemath-categories/tox.ini +++ b/pkgs/sagemath-categories/tox.ini @@ -15,6 +15,10 @@ setenv = # Sage scripts such as sage-runtests like to use $HOME/.sage HOME={envdir} +passenv = + SAGE_NUM_THREADS + SAGE_NUM_THREADS_PARALLEL + whitelist_externals = bash diff --git a/pkgs/sagemath-objects/setup.py b/pkgs/sagemath-objects/setup.py index b53284f75b7..b988cbeaac1 100644 --- a/pkgs/sagemath-objects/setup.py +++ b/pkgs/sagemath-objects/setup.py @@ -14,19 +14,29 @@ import sys sys.path.insert(0, os.path.dirname(__file__)) +if len(sys.argv) > 1 and (sys.argv[1] == "sdist" or sys.argv[1] == "egg_info"): + sdist = True +else: + sdist = False + import sage.env sage.env.default_required_modules = sage.env.default_optional_modules = () from sage_setup.command.sage_build_cython import sage_build_cython from sage_setup.command.sage_build_ext import sage_build_ext -from sage_setup.find import find_python_sources -python_packages, python_modules, cython_modules = find_python_sources( - '.', ['sage']) # for now, we do the filtering using MANIFEST - -log.warn('python_packages = {0}'.format(python_packages)) -log.warn('python_modules = {0}'.format(python_modules)) -log.warn('cython_modules = {0}'.format(cython_modules)) +if sdist: + python_packages = [] + python_modules = [] + cython_modules = [] +else: + from sage_setup.find import find_python_sources + python_packages, python_modules, cython_modules = find_python_sources( + '.', ['sage']) # for now, we do the filtering using MANIFEST + + log.warn('python_packages = {0}'.format(python_packages)) + log.warn('python_modules = {0}'.format(python_modules)) + log.warn('cython_modules = {0}'.format(cython_modules)) setup( cmdclass = dict(build_cython=sage_build_cython, diff --git a/pkgs/sagemath-objects/tox.ini b/pkgs/sagemath-objects/tox.ini index d676cb7d8f5..a1244f7aa8c 100644 --- a/pkgs/sagemath-objects/tox.ini +++ b/pkgs/sagemath-objects/tox.ini @@ -15,6 +15,10 @@ setenv = # Sage scripts such as sage-runtests like to use $HOME/.sage HOME={envdir} +passenv = + SAGE_NUM_THREADS + SAGE_NUM_THREADS_PARALLEL + whitelist_externals = bash