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

Commit

Permalink
Move src/ext to src/sage/ext_data and install it as 'package_data'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Feb 1, 2020
1 parent 2cbd93e commit 95c8316
Show file tree
Hide file tree
Showing 80 changed files with 4 additions and 25 deletions.
2 changes: 0 additions & 2 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ SDIST_PACKAGES = @SAGE_SDIST_PACKAGES@

SCRIPTS = @SAGE_SCRIPTS@

EXTCODE = @SAGE_EXTCODE@

# Packages that use the 'normal' build rules
NORMAL_PACKAGES = @SAGE_NORMAL_PACKAGES@

Expand Down
14 changes: 2 additions & 12 deletions build/make/deps
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ all-sage: \
sagelib \
$(STANDARD_PACKAGE_INSTS) \
$(OPTIONAL_INSTALLED_PACKAGE_INSTS) \
$(EXTCODE) \
$(SCRIPTS)

# Download all packages which should be inside an sdist tarball (the -B
Expand Down Expand Up @@ -123,6 +122,7 @@ base: $(inst_patch) $(inst_pkgconf)
# Sage library (e.g. CYTHON, JINJA2), and on the other hand all
# dependencies for Cython files (e.g. PARI, NTL, MP_LIBRARY).
sagelib: \
$(SCRIPTS) \
$(inst_arb) \
$(inst_boost_cropped) \
$(inst_$(BLAS)) \
Expand Down Expand Up @@ -175,7 +175,6 @@ sagelib: \
$(inst_six) \
$(inst_symmetrica) \
$(inst_zn_poly) \
$(EXTCODE) \
$(PCFILES)
$(AM_V_at)if [ -z "$$SAGE_INSTALL_FETCH_ONLY" ]; then \
cd $(SAGE_SRC) && source bin/sage-env && \
Expand All @@ -184,27 +183,18 @@ sagelib: \


###############################################################################
# Building scripts and extcode
# Building scripts
###############################################################################

# Don't just use "install" since we don't want to change permissions
$(SAGE_LOCAL)/bin/%: $(SAGE_SRC)/bin/%
$(AM_V_at)cp $< $@

# Don't just use "install -D" since we don't want to change permissions.
# cp won't correctly setup the SAGE_EXTCODE directory structure
# (unlike install), so we need a mkdir here such that cp can copy into
# an existing folder.
$(SAGE_EXTCODE)/%: $(SAGE_SRC)/ext/%
@mkdir -p "$(@D)"
$(AM_V_at)cp $< $@

# Install sage-specific generated .pc files
$(SAGE_PKGCONFIG)/%.pc: $(SAGE_SRC)/lib/pkgconfig/%.pc
@mkdir -p "$(@D)"
$(AM_V_at)cp -P $< $@


###############################################################################
# Building the documentation
###############################################################################
Expand Down
1 change: 0 additions & 1 deletion build/make/install
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ if [ $? -ne 0 ]; then
fi

export SAGE_SHARE="$SAGE_LOCAL/share"
export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
export SAGE_PKGCONFIG="$SAGE_LOCAL/lib/pkgconfig"
export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
Expand Down
8 changes: 0 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,6 @@ done

AC_SUBST([SAGE_SCRIPTS])

SAGE_EXTCODE='\
'
for file in `find "$SAGE_SRC"/ext -type f`; do
SAGE_EXTCODE+=" \$(SAGE_EXTCODE)${file#$SAGE_SRC/ext} \\"$'\n'
done

AC_SUBST([SAGE_EXTCODE])

SAGE_MAKE_DEPS="$SAGE_ROOT/build/make/deps"
AC_SUBST_FILE([SAGE_MAKE_DEPS])

Expand Down
1 change: 0 additions & 1 deletion src/bin/sage-env
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ fi
# depending on SAGE_ROOT and SAGE_LOCAL which are already defined.
export SAGE_ETC="$SAGE_LOCAL/etc"
export SAGE_SHARE="$SAGE_LOCAL/share"
export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
export SAGE_PKGCONFIG="$SAGE_LOCAL/lib/pkgconfig"
export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
Expand Down
2 changes: 1 addition & 1 deletion src/sage/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def var(key, *fallbacks, **kwds):
var('SAGE_DOC', join(SAGE_SHARE, 'doc', 'sage'))
var('SAGE_SPKG_INST', join(SAGE_LOCAL, 'var', 'lib', 'sage', 'installed'))
var('SAGE_LIB', os.path.dirname(os.path.dirname(sage.__file__)))
var('SAGE_EXTCODE', join(SAGE_LIB, 'sage', 'ext_data'))

var('SAGE_ROOT') # no fallback for SAGE_ROOT
var('SAGE_SRC', join(SAGE_ROOT, 'src'), SAGE_LIB)
Expand All @@ -175,7 +176,6 @@ def var(key, *fallbacks, **kwds):
var('SAGE_STARTUP_FILE', join(DOT_SAGE, 'init.sage'))

# installation directories for various packages
var('SAGE_EXTCODE', join(SAGE_SHARE, 'sage', 'ext'))
var('CONWAY_POLYNOMIALS_DATA_DIR', join(SAGE_SHARE, 'conway_polynomials'))
var('GRAPHS_DATA_DIR', join(SAGE_SHARE, 'graphs'))
var('ELLCURVE_DATA_DIR', join(SAGE_SHARE, 'ellcurves'))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ def clean_stale_files(self):
packages = python_packages,
package_data = {
'sage.libs.gap': ['sage.gaprc'],
'sage': ['ext_data/*']
},
cmdclass = dict(build=sage_build,
build_cython=sage_build_cython,
Expand Down

0 comments on commit 95c8316

Please sign in to comment.