Skip to content

Commit 8e44908

Browse files
committed
setup: Import trubar locally
1 parent f3d9e19 commit 8e44908

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from distutils.command import config, build
1212
from distutils.core import Extension
1313

14-
from trubar import translate
15-
1614
try:
1715
import numpy
1816
have_numpy = True
@@ -488,6 +486,10 @@ def run(self):
488486
self.compile_to_multilingual()
489487

490488
def compile_to_multilingual(self):
489+
# Import locally so that editable install won't require trubar
490+
# pylint: disable=import-outside-toplevel
491+
from trubar import translate
492+
491493
package_dir = os.path.dirname(os.path.abspath(__file__))
492494
translate(
493495
"msgs.jaml",

0 commit comments

Comments
 (0)