Skip to content
Merged
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
81 changes: 81 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# This file was automatically generated by conda-smithy. To update a component of this
# file, make changes to conda-forge.yaml and/or recipe/meta.yaml, and run
# "conda-smithy regenerate".

environment:

CONDA_INSTALL_LOCN: "C:\\conda"

# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"

# We set a default Python version for the miniconda that is to be installed. This can be
# overridden in the matrix definition where appropriate.
CONDA_PY: "27"
BINSTAR_TOKEN:
# The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml.
secure: MP4hZYylDyUWEsrt3u3cod2sbFeRwUziH02mvQOdbjsTO/l1yIxDkP/76rSIjcGC

matrix:
- TARGET_ARCH: x86
CONDA_PY: 27

- TARGET_ARCH: x64
CONDA_PY: 27

- TARGET_ARCH: x86
CONDA_PY: 34

- TARGET_ARCH: x64
CONDA_PY: 34

- TARGET_ARCH: x86
CONDA_PY: 35

- TARGET_ARCH: x64
CONDA_PY: 35


# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable.
platform:
- x64

install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }

# Cywing's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.)
- cmd: rmdir C:\cygwin /s /q
- appveyor DownloadFile "https://raw.githubusercontent.com/pelson/Obvious-CI/master/bootstrap-obvious-ci-and-miniconda.py"
- cmd: python bootstrap-obvious-ci-and-miniconda.py %CONDA_INSTALL_LOCN% %TARGET_ARCH% %CONDA_PY:~0,1% --without-obvci
- cmd: set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%
- cmd: set PYTHONUNBUFFERED=1

- cmd: conda config --set show_channel_urls true
- cmd: conda install -c pelson/channel/development --yes --quiet obvious-ci
- cmd: conda config --add channels conda-forge
- cmd: conda info
- cmd: conda install -n root --quiet --yes conda-build anaconda-client jinja2 setuptools
# Workaround for Python 3.4 and x64 bug in latest conda-build.
# FIXME: Remove once there is a release that fixes the upstream issue
# ( https://github.com/conda/conda-build/issues/895 ).
- cmd: if "%TARGET_ARCH%" == "x64" if "%CONDA_PY%" == "34" conda install conda-build=1.20.0 --yes

# Skip .NET project specific build phase.
build: off

test_script:
- "%CMD_IN_ENV% conda build recipe --quiet"
deploy_script:

- 'python ci_support\upload_or_check_non_existence.py .\recipe conda-forge --channel=main'
4 changes: 2 additions & 2 deletions recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set BUILD_CONFIG=Release
:: tell cmake where Python is
set PYTHON_LIBRARY=%PREFIX%\libs\python%PY_VER:~0,1%%PY_VER:~2,1%.lib

cmake .. -G "NMake Makefiles" ^
cmake .. -G "Ninja" ^
-Wno-dev ^
-DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
-DBUILD_TESTING:BOOL=OFF ^
Expand All @@ -27,5 +27,5 @@ cmake .. -G "NMake Makefiles" ^
-DINSTALL_MAN_DIR:PATH="%LIBRARY_PREFIX%/man"
if errorlevel 1 exit 1

nmake install
ninja install
if errorlevel 1 exit 1
35 changes: 25 additions & 10 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
#!/bin/bash

# FIXME: This is a hack to make sure the environment is activated.
# The reason this is required is due to the conda-build issue
# mentioned below.
#
# https://github.com/conda/conda-build/issues/910
#
source activate "${CONDA_DEFAULT_ENV}"

mkdir build
cd build

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add the following.

# FIXME: This is a hack to make sure the environment is activated.
# The reason this is required is due to the conda-build issue
# mentioned below.
#
# https://github.com/conda/conda-build/issues/910
#
source activate "${CONDA_DEFAULT_ENV}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done and done!

BUILD_CONFIG=Release

# sometimes python is suffixed, this is a quick fix
# sometimes python is suffixed, these are quick fixes
# in a future PR we should probably switch to cmake find python scripting
PYTHON_INCLUDE=${PREFIX}/include/python${PY_VER}

PYTHON_INCLUDE="${PREFIX}/include/python${PY_VER}"
if [ ! -d $PYTHON_INCLUDE ]; then
PYTHON_INCLUDE=${PREFIX}/include/python${PY_VER}m
PYTHON_INCLUDE="${PREFIX}/include/python${PY_VER}m"
fi

PYTHON_LIBRARY="libpython${PY_VER}.so"
PYTHON_LIBRARY=${PREFIX}/lib/${PYTHON_LIBRARY}
PYTHON_LIBRARY_EXT="so"
if [ `uname` = "Darwin" ] ; then
PYTHON_LIBRARY_EXT="dylib"
fi

PYTHON_LIBRARY="${PREFIX}/lib/libpython${PY_VER}.${PYTHON_LIBRARY_EXT}"
if [ ! -f $PYTHON_LIBRARY ]; then
PYTHON_LIBRARY=${PREFIX}/lib/libpython${PY_VER}m.so
PYTHON_LIBRARY="${PREFIX}/lib/libpython${PY_VER}m.${PYTHON_LIBRARY_EXT}"
fi

cmake .. -G "Unix Makefiles" \
# end of quick fixes

cmake .. -G "Ninja" \
-Wno-dev \
-DCMAKE_BUILD_TYPE=$BUILD_CONFIG \
-DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" \
-DCMAKE_INSTALL_RPATH:PATH="${PREFIX}/lib" \
-DINSTALL_PKGCONFIG_DIR:PATH=$PKG_CONFIG_PATH \
-DBUILD_DOCUMENTATION:BOOL=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DBUILD_EXAMPLES:BOOL=OFF \
Expand All @@ -35,5 +50,5 @@ cmake .. -G "Unix Makefiles" \
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON \
-DPYTHON_INCLUDE_DIR:PATH=$PYTHON_INCLUDE \
-DPYTHON_LIBRARY:FILEPATH=$PYTHON_LIBRARY
make install

ninja install
12 changes: 7 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,25 @@ source:
sha256: 78a990a15ead79cdc752e86b83cfab7dbf5b7ef51ba409db02570dbdd9ec32c3

build:
number: 0
number: 1
features:
- vc9 # [win and py27]
- vc10 # [win and py34]
- vc14 # [win and py35]
# only x64 py2.7 and x64 py3.5 on linux will complete before build timeout
# see https://github.com/conda-forge/staged-recipes/pull/453#issuecomment-228308297
skip: true # [win or osx or linux32 or py34]
# skipped to avoid timeouts, will be adressed in future PR
skip: true # [(unix and py34) or osx]

requirements:
build:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add toolchain.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK. What exactly does that do?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It sets some environment variables with an activation script. This ensures clang is used on Mac for instance.

- freeglut # [linux]
- toolchain
- cmake
- ninja
- freeglut # [linux]
- python
run:
- freeglut # [linux]
- python
- future

test:
imports:
Expand Down