Skip to content

Commit 07a6950

Browse files
committed
Revert sagemathgh-40765 which breaks builds from the git repo
1 parent 83b52a7 commit 07a6950

File tree

11 files changed

+78
-186
lines changed

11 files changed

+78
-186
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SAGE_ROOT_LOGS = logs
4242

4343
# CONFIG_FILES lists all files that appear in AC_CONFIG_FILES in configure.ac;
4444
# except for build/make/Makefile-auto, which is unused by the build system
45-
CONFIG_FILES = build/make/Makefile src/bin/sage-env-config build/bin/sage-build-env-config
45+
CONFIG_FILES = build/make/Makefile src/bin/sage-env-config build/bin/sage-build-env-config pkgs/sage-conf/_sage_conf/_conf.py
4646

4747
# SPKG_COLLECT_FILES contains the files that influence the *runtime* of the
4848
# portions of the 'configure' script generated by the SAGE_SPKG_COLLECT macro

configure.ac

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ AC_SUBST(SAGE_PKG_CONFIG_PATH, [$SAGE_DARWIN_PKG_CONFIG_PATH'$SAGE_LOCAL/lib/pkg
581581
AC_CONFIG_FILES([build/make/Makefile-auto build/make/Makefile])
582582
AC_CONFIG_FILES([src/bin/sage-env-config src/bin/sage-src-env-config build/bin/sage-build-env-config])
583583

584+
AC_CONFIG_FILES([pkgs/sage-conf/_sage_conf/_conf.py])
585+
584586
dnl Create basic directories needed for Sage
585587
AC_CONFIG_COMMANDS(mkdirs,
586588
[

configure_wrapper

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#! /bin/sh
22
cp conftest.py bak_conftest.py
33
./real_configure $@
4-
realconf_result=$?
54
mv bak_conftest.py conftest.py
6-
exit $realconf_result

meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,5 @@ for path in file_paths:
217217
run_command(create_files_command, check: true)
218218

219219
root = meson.current_source_dir()
220-
root_build = meson.current_build_dir()
221220

222221
subdir('src')
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# @configure_input@
2+
3+
VERSION = "@PACKAGE_VERSION@"
4+
5+
# The following must not be used during build to determine source or installation
6+
# location of sagelib. See comments in SAGE_ROOT/src/Makefile.in
7+
# These variables come first so that other substituted variable values can refer
8+
# to it.
9+
SAGE_LOCAL = "@prefix@"
10+
SAGE_ROOT = "@SAGE_ROOT@"
11+
SAGE_SHARE = "@SAGE_SHARE@"
12+
13+
# The semicolon-separated list of GAP root paths. This is the list of
14+
# locations that are searched for GAP packages. This is passed directly
15+
# to GAP via the -l flag.
16+
GAP_ROOT_PATHS = "@GAP_ROOT_PATHS@".replace('${prefix}', SAGE_LOCAL)
17+
18+
# The path to the standalone maxima executable.
19+
MAXIMA = "@SAGE_MAXIMA@".replace('${prefix}', SAGE_LOCAL)
20+
21+
# Set this to the empty string if your ECL can load maxima without
22+
# further prodding.
23+
MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL)
24+
MAXIMA_SHARE = "@SAGE_MAXIMA_SHARE@".replace('${prefix}', SAGE_LOCAL)
25+
26+
# Delete this line if your ECL can load Kenzo without further prodding.
27+
KENZO_FAS = "@SAGE_KENZO_FAS@".replace('${prefix}', SAGE_LOCAL)
28+
29+
NTL_INCDIR = "@NTL_INCDIR@"
30+
NTL_LIBDIR = "@NTL_LIBDIR@"
31+
32+
# Path to the ecl-config script
33+
ECL_CONFIG = "@SAGE_ECL_CONFIG@".replace('${prefix}', SAGE_LOCAL)
34+
35+
SAGE_NAUTY_BINS_PREFIX = "@SAGE_NAUTY_BINS_PREFIX@"
36+
37+
SAGE_ECMBIN = "@SAGE_ECMBIN@"
38+
39+
# Names or paths of the 4ti2 executables
40+
FOURTITWO_HILBERT = "@FOURTITWO_HILBERT@"
41+
FOURTITWO_MARKOV = "@FOURTITWO_MARKOV@"
42+
FOURTITWO_GRAVER = "@FOURTITWO_GRAVER@"
43+
FOURTITWO_ZSOLVE = "@FOURTITWO_ZSOLVE@"
44+
FOURTITWO_QSOLVE = "@FOURTITWO_QSOLVE@"
45+
FOURTITWO_RAYS = "@FOURTITWO_RAYS@"
46+
FOURTITWO_PPI = "@FOURTITWO_PPI@"
47+
FOURTITWO_CIRCUITS = "@FOURTITWO_CIRCUITS@"
48+
FOURTITWO_GROEBNER = "@FOURTITWO_GROEBNER@"
49+
50+
# Colon-separated list of pkg-config modules to search for cblas functionality.
51+
# We hard-code it here as cblas because configure (build/pkgs/openblas/spkg-configure.m4)
52+
# always provides cblas.pc, if necessary by creating a facade pc file for a system BLAS.
53+
CBLAS_PC_MODULES = "cblas"
54+
55+
# for sage_setup.setenv
56+
SAGE_ARCHFLAGS = "@SAGE_ARCHFLAGS@"
57+
SAGE_PKG_CONFIG_PATH = "@SAGE_PKG_CONFIG_PATH@".replace('$SAGE_LOCAL', SAGE_LOCAL)
58+
59+
# Used in sage.repl.ipython_kernel.install
60+
MATHJAX_DIR = "@SAGE_MATHJAX_DIR@".replace('${prefix}', SAGE_LOCAL)
61+
THREEJS_DIR = SAGE_LOCAL + "/share/threejs-sage"
62+
63+
# OpenMP flags, if available.
64+
OPENMP_CFLAGS = "@OPENMP_CFLAGS@"
65+
OPENMP_CXXFLAGS = "@OPENMP_CXXFLAGS@"
66+
67+
# Installation location of wheels. This is determined at configuration time
68+
# and does not depend on the installation location of sage-conf.
69+
SAGE_SPKG_WHEELS = "@SAGE_VENV@".replace('${SAGE_LOCAL}', SAGE_LOCAL) + "/var/lib/sage/wheels"

src/sage/config.py.in

Lines changed: 0 additions & 149 deletions
This file was deleted.

src/sage/config_test.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/sage/env.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
from platformdirs import site_data_dir, user_data_dir
5050

5151
from sage import version
52-
from sage.config import get_include_dirs
5352

5453
# All variables set by var() appear in this SAGE_ENV dict
5554
SAGE_ENV = dict()
@@ -308,9 +307,6 @@ def sage_include_directories(use_sources=False):
308307
309308
sage: import sage.env
310309
sage: sage.env.sage_include_directories()
311-
doctest:warning...
312-
DeprecationWarning: use sage.config.get_include_dirs() instead
313-
...
314310
['...',
315311
'.../numpy/...core/include',
316312
'.../include/python...']
@@ -331,9 +327,6 @@ def sage_include_directories(use_sources=False):
331327
sage: any(os.path.isfile(os.path.join(d, file)) for d in dirs)
332328
True
333329
"""
334-
from sage.misc.superseded import deprecation
335-
deprecation(40765, 'use sage.config.get_include_dirs() instead')
336-
337330
if use_sources:
338331
dirs = [SAGE_SRC]
339332
else:
@@ -348,8 +341,6 @@ def sage_include_directories(use_sources=False):
348341

349342
dirs.append(sysconfig.get_config_var('INCLUDEPY'))
350343

351-
dirs.extend([dir.as_posix() for dir in get_include_dirs()])
352-
353344
return dirs
354345

355346

src/sage/features/meson_editable.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
r"""
22
Feature for testing if Meson editable install is used.
33
"""
4-
from sage.config import is_editable_install
5-
64
from . import Feature, FeatureTestResult
75

86

@@ -37,7 +35,9 @@ def _is_present(self):
3735
sage: MesonEditable()._is_present() # random
3836
FeatureTestResult('meson_editable', True)
3937
"""
40-
return FeatureTestResult(self, is_editable_install())
38+
import sage
39+
result = type(sage.__loader__).__module__ == '_sagemath_editable_loader'
40+
return FeatureTestResult(self, result)
4141

4242

4343
def all_features():

src/sage/meson.build

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ sage_install_dir = py.get_install_dir() / 'sage'
22

33
# Generate the configuration file
44
conf_data = configuration_data()
5-
conf_data.set('EDITABLE_SRC', root)
6-
conf_data.set('EDITABLE_BUILD', root_build)
75
conf_data.set('PACKAGE_VERSION', '1.2.3')
86
# We use Python's prefix here to make it work with conda
97
prefix = fs.as_posix(py.get_variable('prefix', ''))
@@ -85,7 +83,6 @@ py.install_sources(
8583
'__init__.py',
8684
'all.py',
8785
'all_cmdline.py',
88-
'config_test.py',
8986
'env.py',
9087
'version.py',
9188
subdir: 'sage',
@@ -150,7 +147,7 @@ configure_file(
150147
# Write config file
151148
# Should be last so that subdir calls can modify the config data
152149
config_file = configure_file(
153-
input: 'config.py.in',
150+
input: '../../pkgs/sage-conf/_sage_conf/_conf.py.in',
154151
output: 'config.py',
155152
install_dir: sage_install_dir,
156153
install: true,

0 commit comments

Comments
 (0)