Skip to content

Commit

Permalink
Use CLAW env variable to set path for editable installs.
Browse files Browse the repository at this point in the history
The old approach doesn't work with meson, but this does.
  • Loading branch information
ketch committed Oct 31, 2023
1 parent e8ee7af commit d7094ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pyclaw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
import logging, logging.config


CLAW_dir = os.environ.get('CLAW')
if CLAW_dir == None:
raise Exception('You must set the CLAW environment to use an editable install.')
# To get pyclaw.examples
_path = os.path.dirname(os.path.dirname(__path__[0]))
_path = os.path.dirname(os.path.join(CLAW_dir, 'clawpack'))
if os.path.isdir(_path):
__path__.append(_path)
del _path
Expand Down

0 comments on commit d7094ef

Please sign in to comment.