File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ dependencies = [
2929 " pathsim" ,
3030 " numpy>=1.15" ,
3131 " scipy>=1.2" ,
32- " jsbsim>=1.2.4"
32+ # JSBSim ships native code that can't be installed in Pyodide. The
33+ # marker resolves to a normal eager install on every real platform and
34+ # is skipped on Emscripten so the pure-Python parts of the toolbox
35+ # (`pathsim_flight.atmosphere`, `.utils`) still install in the browser.
36+ " jsbsim>=1.2.4; sys_platform != 'emscripten'" ,
3337]
3438
3539[project .optional-dependencies ]
Original file line number Diff line number Diff line change 1212
1313__all__ = ["__version__" ]
1414
15- # For direct block import from main package
16- from .atmosphere import *
17- from .jsbsim import *
18- from .utils import *
15+ # Pure-Python submodules — eager.
16+ from .atmosphere import * # noqa: F401,F403
17+ from .utils import * # noqa: F401,F403
18+
19+ # `jsbsim` wraps the native JSBSim Python bindings, which can't load in
20+ # Pyodide. Re-export the wrapper only when the import succeeds; on a normal
21+ # pip install it loads eagerly.
22+ try :
23+ from .jsbsim import * # noqa: F401,F403
24+ except ImportError :
25+ pass
You can’t perform that action at this time.
0 commit comments