Skip to content
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

Pass spec pythonpath directly to spectre #6187

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

guilara
Copy link
Contributor

@guilara guilara commented Jul 31, 2024

Proposed changes

Since the spec exporter might be a bit difficult to set up, I would like to use the spec python scripts independently of it (still useful for using the pipeline). Could we pass the path directly if it fails to find spec like this?

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

# independently of the SpEC exporter. These can be used until we have ported
# them to SpECTRE.
if (SPEC_PYTHONPATH)
set(PYTHONPATH "${SPEC_PYTHONPATH}:${PYTHONPATH}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you just move up the line that sets the pythonpath so it's always set, like this:

find_package(SpEC)

# Make SpEC scripts available in Python. These can be used until we have ported
# them to SpECTRE.
if (SPEC_ROOT)
  set(PYTHONPATH "${SPEC_ROOT}/Support/Python:${PYTHONPATH}")
endif()

# That's it. No need to do anything else in this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. That's simpler. Done.

@knelli2 knelli2 mentioned this pull request Aug 1, 2024
13 tasks
@guilara guilara requested a review from nilsvu August 2, 2024 13:58
cmake/SetupSpec.cmake Show resolved Hide resolved
@nilsvu nilsvu merged commit e9587a6 into sxs-collaboration:develop Aug 2, 2024
22 checks passed
@knelli2 knelli2 added the build system CMake build system label Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system CMake build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants