Skip to content

Commit 148e483

Browse files
committed
configure installs jupyter kerneldata to SAGE_LOCAL/share
As well, we make consistent use of PACKAGE_VERSION (instead of SAGE_VERSION) in meson, and rename PACKAGE_VERSION in meson.build's to something more descriptive and non-clashing
1 parent cb03043 commit 148e483

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,11 @@ AC_CONFIG_FILES([src/bin/sage-env-config src/bin/sage-src-env-config build/bin/s
555555

556556
AC_CONFIG_FILES([pkgs/sage-conf/_sage_conf/_conf.py])
557557

558+
# install jupyter kernel data
559+
AC_CONFIG_FILES([$SAGE_LOCAL/share/notebook/kernel.json:src/sage/ext_data/notebook-ipython/kernel.json.in]
560+
[$SAGE_LOCAL/share/notebook/logo.svg:src/sage/ext_data/notebook-ipython/logo.svg]
561+
[$SAGE_LOCAL/share/notebook/logo-64x64.png:src/sage/ext_data/notebook-ipython/logo-64x64.png])
562+
558563
dnl Create basic directories needed for Sage
559564
AC_CONFIG_COMMANDS(mkdirs,
560565
[

src/sage/ext_data/notebook-ipython/kernel.json.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
"-f",
77
"{connection_file}"
88
],
9-
"display_name": "SageMath @SAGE_VERSION@",
9+
"display_name": "SageMath @PACKAGE_VERSION@",
1010
"language": "sage"
1111
}

src/sage/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sage_install_dir = py.get_install_dir() / 'sage'
22

33
# Generate the configuration file
44
conf_data = configuration_data()
5-
conf_data.set('PACKAGE_VERSION', '1.2.3')
5+
conf_data.set('SAGE_MESON_PKG_VERSION', '1.2.3')
66
# We use Python's prefix here to make it work with conda
77
prefix = fs.as_posix(py.get_variable('prefix', ''))
88
conf_data.set('prefix', prefix)
@@ -144,7 +144,7 @@ kernel_dir = get_option('datadir') / 'share/jupyter/kernels/sagemath'
144144
install_data('ext_data/notebook-ipython/logo.svg', install_dir: kernel_dir)
145145
install_data('ext_data/notebook-ipython/logo-64x64.png', install_dir: kernel_dir)
146146
kernel_data = configuration_data()
147-
kernel_data.set('SAGE_VERSION', meson.project_version())
147+
kernel_data.set('PACKAGE_VERSION', meson.project_version())
148148
configure_file(
149149
input: 'ext_data/notebook-ipython/kernel.json.in',
150150
output: 'kernel.json',

subprojects/packagefiles/mpfi/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mpfr = dependency('mpfr', version: '>= 4.0.1')
1212

1313
# Configuration data
1414
conf = configuration_data()
15-
conf.set('PACKAGE_VERSION', '"' + meson.project_version() + '"')
15+
conf.set('SAGE_MESON_PKG_VERSION', '"' + meson.project_version() + '"')
1616
# Check for functions
1717
conf.set('HAVE_DUP2', c.has_function('dup2') ? 1 : 0)
1818
conf.set('HAVE_GETTIMEOFDAY', c.has_function('gettimeofday') ? 1 : 0)

0 commit comments

Comments
 (0)