mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-05 04:48:00 +00:00
Avoid reliance on __file__
"__file__" does not work with some bundle compilers, such as pyoxidizer. Also, it's not the recommended way to proceed. See https://pyoxidizer.readthedocs.io/en/latest/packaging_pitfalls.html#reliance-on-file
This commit is contained in:
parent
be1ff08917
commit
c9adf68ba3
@ -4,6 +4,7 @@ import os
|
||||
import shutil
|
||||
|
||||
import jinja2
|
||||
import pkg_resources
|
||||
|
||||
from . import exceptions
|
||||
from . import fmt
|
||||
@ -12,7 +13,7 @@ from . import utils
|
||||
from .__about__ import __version__
|
||||
|
||||
|
||||
TEMPLATES_ROOT = os.path.join(os.path.dirname(__file__), "templates")
|
||||
TEMPLATES_ROOT = pkg_resources.resource_filename("tutor", "templates")
|
||||
VERSION_FILENAME = "version"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user