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

Commit

Permalink
pkgs/sagemath-objects/setup.py: On sdist or egg_info, do not run find…
Browse files Browse the repository at this point in the history
…_python_sources
  • Loading branch information
Matthias Koeppe committed Oct 12, 2021
1 parent e9fc48d commit f79f0f8
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions pkgs/sagemath-objects/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f79f0f8

Please sign in to comment.