Repository navigation
Support Sisco #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Support Sisco #17
Changes from 13 commits
f5de9e8
1b605d9
878e979
e4c217f
0383a70
592cd70
73f5fb2
0de6e01
59058b5
a58be0c
58f1815
cec054c
e7e9a53
efd854b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,10 @@ class Casacore < Formula | |
| head "https://github.com/casacore/casacore.git" | ||
|
|
||
| option "without-python", "Build without Python bindings" | ||
| option "without-sisco", "Build without Sisco compression storage manager" | ||
|
|
||
| depends_on "cmake" => :build | ||
|
|
||
| depends_on "casacore-data" | ||
| depends_on "cfitsio" | ||
| depends_on "fftw" | ||
|
|
@@ -19,6 +21,8 @@ class Casacore < Formula | |
| depends_on "readline" | ||
| depends_on "wcslib" | ||
|
|
||
| depends_on "libdeflate" => :optional | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know what this optional does, I don't think you've told homebrew that the libdeflate dependency is related to sisco. Since libdeflate is in homebrew, I would be fine with making the dependency non-optional.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to be the modern way (according to ChatGPT) to use a conditional. I first tried: But I received errors and warning that I didn't understand. The version with ":optional" passed the test. |
||
|
|
||
| if build.with?("python") | ||
| depends_on "python3" | ||
| depends_on "numpy" | ||
|
|
@@ -45,6 +49,7 @@ def install | |
| numpy_include = `#{python_exe} -c "import numpy; print(numpy.get_include())"`.strip | ||
| cmake_args << "-DPython3_NumPy_INCLUDE_DIR=#{numpy_include}" | ||
| end | ||
| cmake_args << "-DBUILD_SISCO=#{build.with?("sisco") ? "ON" : "OFF"}" | ||
| system "cmake", "../..", *cmake_args | ||
| system "make", "install" | ||
| end | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I don't know exactly how this works. Whether this means "with" or "without" if nothing is specified on the command line. I'm not even sure we need all this if we enable Sisco by default in the casacore build. Then probably just the following single line suffices:
And we don't need to add the CMake argument on line 52 either. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to make the dependency non-optional, and just build sisco always. There are many other parts of casacore that could be built optional in homebrew and we don't do that either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so shall I then convert this PR to just a one-liner that adds "libdeflate" as dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please