Use split package structure
This should ensure re-rendering goes smoothly as it mocks the
architecture anyways, which could have ill-effects when creating the
feedstock.
{% set version = environ["CUDA_VER"] %}
package:
- name: "{{ name }}_{{ target_platform }}"
- version: "{{ version }}"
+ name: "{{ name }}"
build:
- number: 0
skip: true # [not linux]
+
+outputs:
+ - name: "{{ name }}_{{ target_platform }}"
+ version: "{{ version }}"
+ build:
+ number: 0
script_env:
- CUDA_HOME
ignore_run_exports:
@@ -15,7 +19,6 @@ build:
run_exports:
strong:
- cudatoolkit {{ version }}|{{ version }}.*
-
requirements:
host:
# Needed to symlink libcuda into sysroot libs.
@@ -24,31 +27,25 @@ requirements:
- {{ compiler("c") }}
# Host code is forwarded to a C++ compiler
- {{ compiler("cxx") }}
-
test:
files:
- test.cu
-
commands:
# Verify the symlink to the libcuda stub library exists.
- test -f "$(${CC} --print-sysroot)/lib/libcuda.so"
-
# Verify the activation scripts are in-place.
{% for state in ["activate", "deactivate"] %}
- test -f "${PREFIX}/etc/conda/{{ state }}.d/{{ PKG_NAME }}_{{ state }}.sh"
{% endfor %}
-
# Try using the activation scripts.
- source ${PREFIX}/etc/conda/activate.d/{{ PKG_NAME }}_activate.sh
- if [ -z ${CUDA_HOME+x} ]; then echo "CUDA_HOME is unset after activation" && exit 1; else echo "CUDA_HOME is set to '$CUDA_HOME'"; fi
- source ${PREFIX}/etc/conda/deactivate.d/{{ PKG_NAME }}_deactivate.sh
- if [ -z ${CUDA_HOME+x} ]; then echo "CUDA_HOME is unset after deactivation "; else echo "CUDA_HOME is set to '$CUDA_HOME' after deactivation" && exit 1; fi
-
# Try building something.
- source ${PREFIX}/etc/conda/activate.d/{{ PKG_NAME }}_activate.sh
- nvcc test.cu
- source ${PREFIX}/etc/conda/deactivate.d/{{ PKG_NAME }}_deactivate.sh
-
about:
home: https://github.com/conda-forge/nvcc-feedstock
license: BSD 3-Clause
