Skip to content

Commit

Permalink
Explain use of symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
gmloose committed Feb 23, 2024
1 parent ce2b52d commit 6f1ac4a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ def run(self):
long_description_content_type='text/x-rst',
packages=find_packages() + find_namespace_packages(include=["casacore.data.*"]),
include_package_data=True,
# We need to bring the casacore data files in scope of the python package.
# There is no need to copy the files, creating a symlink suffices. Environment
# variable `CASACORE_DATA` must point to the directory containing the data files.
# If `CASACORE_DATA` is not set, or points to a non-existing directory, no data
# will be added to the python package. If `casacore/data` already exists and is
# not a symlink, then no attempt is made to create a symlink; the contents of
# `casacore/data` will be used instead.
package_data={
"casacore.data": [create_symlink(os.getenv("CASACORE_DATA"), "casacore/data")]
},
Expand Down

0 comments on commit 6f1ac4a

Please sign in to comment.