Skip to content

Commit

Permalink
WIP: Add logic to find packaged casacore data
Browse files Browse the repository at this point in the history
  • Loading branch information
gmloose committed Feb 16, 2024
1 parent 2f540a8 commit 2e2674c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include *.rst *.md
graft data
graft casacore/data
graft doc
graft src
graft tests
1 change: 1 addition & 0 deletions casacore/.aipsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
measures.directory: ${CASACORE_DATA}
13 changes: 12 additions & 1 deletion casacore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
__version__ = "3.5.2"
__version__ = "3.6.0a1"
__mincasacoreversion__ = "3.1.1"

import os

# If environment variable `AIPSPATH` is not set, then set it to the directory
# containing the `.aipsrc` file that is distributed with this package.
# This `.aipsrc` file uses the environment `CASACORE_DATA`, which should point
# to the directory containing the casacore data files.
if "AIPSPATH" not in os.environ:
root = os.path.dirname(__file__)
os.environ["AIPSPATH"] = root
os.environ["CASACORE_DATA"] = os.path.join(root, "data")

0 comments on commit 2e2674c

Please sign in to comment.