Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Commit 5cdc0b4

Browse files
committed
Build conda recipe on Pull Requests
1 parent ffa282b commit 5cdc0b4

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

appveyor.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,21 @@ init:
4747
- python -c "import ctypes; print(ctypes.sizeof(ctypes.c_wchar))"
4848

4949
install:
50-
# install conda and deps
51-
- ps: .\ci\install_miniconda.ps1
52-
5350
# install for wheels
5451
- pip install --upgrade pip wheel six
5552

5653
build_script:
5754
# build clean sdist & wheel
5855
- python setup.py sdist bdist_wheel
5956

60-
# build and dist conda package
61-
- '%CMD_IN_ENV% %CONDA_BLD%\Scripts\conda build conda.recipe'
62-
- ps: $CONDA_PKG=(&"$env:CONDA_BLD\Scripts\conda" build conda.recipe --output -q)
63-
- ps: Copy-Item $CONDA_PKG "$env:APPVEYOR_BUILD_FOLDER\dist\"
64-
6557
test_script:
6658
- pip install --no-index --find-links=.\dist\ pythonnet
6759
- ps: Copy-Item (Resolve-Path .\build\*\Python.Test.dll) C:\testdir
6860
- python src\tests\runtests.py
6961
# - "%NUNIT% src/embed_tests/bin/%PLATFORM%/ReleaseWin/Python.EmbeddingTest.dll"
7062

63+
# Build conda-recipe on Pull Requests
64+
- ps: .\ci\appveyor_build_recipe.ps1
65+
7166
artifacts:
7267
- path: dist\*

ci/appveyor_build_recipe.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
2+
Invoke-Expression .\ci\install_miniconda.ps1
3+
&"$env:CONDA_BLD\Scripts\conda" build conda.recipe --dirty -q
4+
$CONDA_PKG=(&"$env:CONDA_BLD\Scripts\conda" build conda.recipe --output -q)
5+
Copy-Item $CONDA_PKG "$env:APPVEYOR_BUILD_FOLDER\dist\"
6+
}

conda.recipe/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Conda Recipe
2+
3+
The files here are needed to build Python.Net with conda
4+
5+
http://conda.pydata.org/docs/building/recipe.html

0 commit comments

Comments
 (0)