Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/recipes-v2/python_variants/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

TEST_FILE="data/test.py"

if [[ ! -f $TEST_FILE ]] ; then
echo "data/test.py is missing"
ls -al
exit 1
else
install $TEST_FILE $PREFIX/bin
fi
3 changes: 3 additions & 0 deletions tests/recipes-v2/python_variants/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python:
- 3.9
- 3.10
3 changes: 3 additions & 0 deletions tests/recipes-v2/python_variants/data/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env python

print("Hello")
20 changes: 20 additions & 0 deletions tests/recipes-v2/python_variants/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
context:
name: test_simple_variants
version: 0.0.0

package:
name: '{{ name|lower }}'
version: '{{ version }}'

source:
- path: data
folder: data

requirements:
host:
- python
run:
- python

build:
number: 0
3 changes: 3 additions & 0 deletions tests/recipes-v2/python_variants/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

test.py
6 changes: 6 additions & 0 deletions tests/test_boa_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,9 @@ def test_build_with_script_env(tmp_path: Path):
assert key1 == "KEY1_RANDOM_VALUE"
key2 = fin.extractfile("key2.txt").read().decode("utf8").strip()
assert key2 == "JUST A VALUE"


def test_build_variant():
recipe = recipes_dir / "python_variants"
variant_file = recipe / "conda_build_config.yaml"
check_call(["boa", "build", "-m", variant_file, recipe])