Skip to content

Commit 02d8440

Browse files
committed
threejs feature: include version file in sage.feature
This makes the feature complete when only sagemath_environment is installed. Fixes: sagemath#37178
1 parent 30b3d78 commit 02d8440

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

pkgs/sagemath-environment/pyproject.toml.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ script-files = [
5656
# - bin/sage-run, bin/sage-runtests, ... -- installed by sagemath-repl
5757
# - bin/sage-ipython -- uses sage.repl, so installed by sagemath-repl
5858
]
59-
include-package-data = false
6059

6160
[tool.setuptools.dynamic]
6261
version = {file = ["VERSION.txt"]}

src/sage/features/threejs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ def required_version(self):
5252
sage: Threejs().required_version()
5353
'r...'
5454
"""
55-
from sage.env import SAGE_EXTCODE
55+
from importlib.resources import files
5656

57-
filename = os.path.join(SAGE_EXTCODE, 'threejs', 'threejs-version.txt')
57+
filename = files(__package__).joinpath("threejs-version.txt")
5858

5959
with open(filename) as f:
6060
return f.read().strip()

0 commit comments

Comments
 (0)