Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/setup.py: Remove use of module_list.py; filter by distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jun 3, 2020
1 parent ae70c81 commit ec7e9c5
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@
# This import allows instancemethods to be pickable
import sage_setup.fpickle_setup

#########################################################
### List of Extensions
###
### The list of extensions resides in module_list.py in
### the same directory as this file
#########################################################

from module_list import ext_modules

#########################################################
### Configuration
#########################################################
Expand Down Expand Up @@ -62,9 +53,23 @@
# TODO: This should be quiet by default
print("Discovering Python/Cython source code....")
t = time.time()

distributions = ['']

from sage_setup.optional_extension import is_package_installed_and_updated

optional_packages_with_extensions = ['mcqd', 'bliss', 'tdlib', 'primecount',
'coxeter3', 'fes', 'sirocco', 'meataxe']

distributions += ['sage-{}'.format(pkg)
for pkg in optional_packages_with_extensions
if is_package_installed_and_updated(pkg)]

log.warn('distributions = {0}'.format(distributions))

from sage_setup.find import find_python_sources
python_packages, python_modules, cython_modules = find_python_sources(
SAGE_SRC, ['sage', 'sage_setup'])
SAGE_SRC, ['sage', 'sage_setup'], distributions=distributions)

log.debug('python_packages = {0}'.format(python_packages))

Expand Down Expand Up @@ -117,4 +122,4 @@
build_cython=sage_build_cython,
build_ext=sage_build_ext,
install=sage_install),
ext_modules = ext_modules + cython_modules)
ext_modules = cython_modules)

0 comments on commit ec7e9c5

Please sign in to comment.