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

[Windows] Freeze PKG_VERSION and add fallback lookup in default installation path #52

Merged
merged 9 commits into from
Dec 11, 2020

Conversation

jaimergp
Copy link
Member

@jaimergp jaimergp commented Nov 26, 2020

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Part 1

This fixes a subtle bug I just found for the activation scripts on Windows. Since we are not creating the activation scripts from the install script, but by copying them from files, environment variables are not rendered to the final file. Instead the take the value set in the environment when they are executed. For our tests that didn't matter because they got rendered correctly, but when used in other recipes, they might take the wrong value.

For example, the CUDA version check uses PKG_VERSION, which will be set for other packages during build time. Example here. That 7.5.0 is OpenMM's version, not CUDA!

To fix this, I am rendering PKG_VERSION by hand, using sed 😬

This is not producing errors because of the fallback mechanisms for finding CUDA_HOME, but that doesn't mean it should not be fixed. Especially if this package is used outside the context of conda-forge.

Part 2

For some reason, in some feedstocks conda-forge-ci-setup mechanisms do not reach the recipe (e.g. CUDA_PATH is not set and PATH does not contain nvcc.exe). See #53 for more details.

As a workaround I am adding a fallback lookup in the default installation path, where the activation script might find nvcc.exe.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

jaimergp added a commit to jaimergp/nvcc-feedstock that referenced this pull request Nov 26, 2020
Previous changes in new PR conda-forge#52
@jaimergp jaimergp changed the title [Windows] Make sure build-time variables are rendered to disk! [Windows] Freeze PKG_VERSION and add fallback lookup in default installation path Dec 10, 2020
@jaimergp
Copy link
Member Author

@conda-forge/nvcc I think this is ready for review. If you agree, I'd like to add me as a maintainer for the Windows bits too.

@kkraus14
Copy link
Contributor

@conda-forge/nvcc I think this is ready for review. If you agree, I'd like to add me as a maintainer for the Windows bits too.

Sounds good to me, please add yourself as a maintainer on the recipe!

Copy link
Contributor

@kkraus14 kkraus14 left a comment

Choose a reason for hiding this comment

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

One typo, but approach LGTM

recipe/windows/activate.bat Outdated Show resolved Hide resolved
Co-authored-by: Keith Kraus <keith.j.kraus@gmail.com>
recipe/meta.yaml Outdated Show resolved Hide resolved
@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I was trying to look for recipes to lint for you, but it appears we have a merge conflict.
Please try to merge or rebase with the base branch to resolve this conflict.

Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@kkraus14 kkraus14 merged commit 198ee4b into conda-forge:master Dec 11, 2020
@jaimergp
Copy link
Member Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants