def run_autogen(self): """ Generate auto-generated sources. This must be done before building the python modules, see :trac:`22106`. """ from sage_setup.autogen import autogen_all log.info("Generating auto-generated sources") for pkg in autogen_all(): if pkg not in self.distribution.packages: self.distribution.packages.append(pkg)
def run_autogen(self): """ Generate auto-generated sources. This must be done before building the python modules, see :trac:`22106`. """ from sage_setup.autogen import autogen_all from sage_setup.find import find_python_sources from sage.env import SAGE_SRC log.info("Generating auto-generated sources") pkgs = autogen_all() python_packages, python_modules, cython_modules = find_python_sources( SAGE_SRC, [pkg.replace('.', '/') for pkg in pkgs]) for pkg in python_packages: if pkg not in self.distribution.packages: self.distribution.packages.append(pkg) for cython_module in cython_modules: self.distribution.ext_modules.append(cython_module)
# ######################################################## # Remove (potentially invalid) star import caches if os.path.exists(sage.misc.lazy_import_cache.get_cache_file()): os.unlink(sage.misc.lazy_import_cache.get_cache_file()) # ######################################################## # ## Discovering Sources # ######################################################## if sdist: extensions = [] python_packages = [] else: log.info("Generating auto-generated sources") from sage_setup.autogen import autogen_all autogen_all() log.info("Discovering Python/Cython source code....") t = time.time() # Exclude a few files if the corresponding distribution is not loaded optional_packages = [ 'mcqd', 'bliss', 'tdlib', 'primecount', 'coxeter3', 'fes', 'sirocco', 'meataxe' ] not_installed_packages = [ package for package in optional_packages if not is_package_installed_and_updated(package) ] distributions_to_exclude = [