diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml new file mode 100755 index 0000000..417f546 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -0,0 +1,32 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: linux + pool: + vmImage: ubuntu-16.04 + timeoutInMinutes: 360 + strategy: + maxParallel: 8 + matrix: + linux_: + CONFIG: linux_ + UPLOAD_PACKAGES: True + DOCKER_IMAGE: condaforge/linux-anvil-comp7 + steps: + # configure qemu binfmt-misc running. This allows us to run docker containers + # embedded qemu-static + - script: | + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes + ls /proc/sys/fs/binfmt_misc/ + condition: not(startsWith(variables['CONFIG'], 'linux_64')) + displayName: Configure binfmt_misc + + - script: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + .azure-pipelines/run_docker_build.sh + displayName: Run docker build + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml new file mode 100755 index 0000000..ca72508 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -0,0 +1,76 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: osx + pool: + vmImage: macOS-10.13 + timeoutInMinutes: 360 + strategy: + maxParallel: 8 + matrix: + osx_: + CONFIG: osx_ + UPLOAD_PACKAGES: True + + steps: + # TODO: Fast finish on azure pipelines? + - script: | + echo "Fast Finish" + + + - script: | + echo "Removing homebrew from Azure to avoid conflicts." + curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew + chmod +x ~/uninstall_homebrew + ~/uninstall_homebrew -fq + rm ~/uninstall_homebrew + displayName: Remove homebrew + + - bash: | + echo "##vso[task.prependpath]$CONDA/bin" + sudo chown -R $USER $CONDA + displayName: Add conda to PATH + + - script: | + source activate base + conda install -n base -c conda-forge --quiet --yes conda-forge-ci-setup=2 conda-build + displayName: 'Add conda-forge-ci-setup=2' + + - script: | + source activate base + echo "Configuring conda." + + setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml + export CI=azure + source run_conda_forge_build_setup + conda update --yes --quiet --override-channels -c conda-forge -c defaults --all + env: { + OSX_FORCE_SDK_DOWNLOAD: "1" + } + displayName: Configure conda and conda-build + + - script: | + source activate base + mangle_compiler ./ ./recipe ./.ci_support/${CONFIG}.yaml + displayName: Mangle compiler + + - script: | + source activate base + make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml + displayName: Generate build number clobber file + + - script: | + source activate base + conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + displayName: Build recipe + + - script: | + source activate base + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + upload_package ./ ./recipe ./.ci_support/${CONFIG}.yaml + displayName: Upload package + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + condition: not(eq(variables['UPLOAD_PACKAGES'], 'False')) \ No newline at end of file diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 0000000..fbfb9c8 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,103 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: win + pool: + vmImage: vs2017-win2016 + timeoutInMinutes: 360 + strategy: + maxParallel: 4 + matrix: + win_: + CONFIG: win_ + CONDA_BLD_PATH: D:\\bld\\ + UPLOAD_PACKAGES: True + steps: + # TODO: Fast finish on azure pipelines? + - script: | + ECHO ON + + + - script: | + choco install vcpython27 -fdv -y --debug + condition: contains(variables['CONFIG'], 'vs2008') + displayName: Install vcpython27.msi (if needed) + + # Cygwin's git breaks conda-build. (See https://github.com/conda-forge/conda-smithy-feedstock/pull/2.) + # - script: rmdir C:\cygwin /s /q + # continueOnError: true + + - powershell: | + Set-PSDebug -Trace 1 + + $batchcontent = @" + ECHO ON + SET vcpython=C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0 + + DIR "%vcpython%" + + CALL "%vcpython%\vcvarsall.bat" %* + "@ + + $batchDir = "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC" + $batchPath = "$batchDir" + "\vcvarsall.bat" + New-Item -Path $batchPath -ItemType "file" -Force + + Set-Content -Value $batchcontent -Path $batchPath + + Get-ChildItem -Path $batchDir + + Get-ChildItem -Path ($batchDir + '\..') + + condition: contains(variables['CONFIG'], 'vs2008') + displayName: Patch vs2008 (if needed) + + - task: CondaEnvironment@1 + inputs: + packageSpecs: 'python=3.6 conda-build conda conda-forge::conda-forge-ci-setup=2' # Optional + installOptions: "-c conda-forge" + updateConda: false + displayName: Install conda-build and activate environment + + - script: set PYTHONUNBUFFERED=1 + + # Configure the VM + - script: setup_conda_rc .\ .\recipe .\.ci_support\%CONFIG%.yaml + + # Configure the VM. + - script: | + set "CI=azure" + run_conda_forge_build_setup + displayName: conda-forge build setup + + + - script: | + rmdir C:\strawberry /s /q + continueOnError: true + displayName: remove strawberryperl + + # Special cased version setting some more things! + - script: | + conda.exe build recipe -m .ci_support\%CONFIG%.yaml + displayName: Build recipe (vs2008) + env: + VS90COMNTOOLS: "C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin" + PYTHONUNBUFFERED: 1 + condition: contains(variables['CONFIG'], 'vs2008') + + - script: | + conda.exe build recipe -m .ci_support\%CONFIG%.yaml + displayName: Build recipe + env: + PYTHONUNBUFFERED: 1 + condition: not(contains(variables['CONFIG'], 'vs2008')) + + - script: | + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + upload_package .\ .\recipe .ci_support\%CONFIG%.yaml + displayName: Upload package + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + condition: not(eq(variables['UPLOAD_PACKAGES'], 'False')) diff --git a/.circleci/build_steps.sh b/.azure-pipelines/build_steps.sh similarity index 56% rename from .circleci/build_steps.sh rename to .azure-pipelines/build_steps.sh index 258a085..8a4af44 100755 --- a/.circleci/build_steps.sh +++ b/.azure-pipelines/build_steps.sh @@ -7,34 +7,33 @@ set -xeuo pipefail export PYTHONUNBUFFERED=1 -export FEEDSTOCK_ROOT=/home/conda/feedstock_root -export RECIPE_ROOT=/home/conda/recipe_root -export CI_SUPPORT=/home/conda/feedstock_root/.ci_support +export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" +export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" cat >~/.condarc </dev/null && pwd )" +PROVIDER_DIR="$(basename $THISDIR)" FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" @@ -25,26 +28,48 @@ fi ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" if [ -z "$CONFIG" ]; then - echo "Need to set CONFIG env variable" + set +x + FILES=`ls .ci_support/linux_*` + CONFIGS="" + for file in $FILES; do + CONFIGS="${CONFIGS}'${file:12:-5}' or "; + done + echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" exit 1 fi -pip install shyaml -DOCKER_IMAGE=$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil ) +if [ -z "${DOCKER_IMAGE}" ]; then + SHYAML_INSTALLED="$(shyaml -h || echo NO)" + if [ "${SHYAML_INSTALLED}" == "NO" ]; then + echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7" + DOCKER_IMAGE="condaforge/linux-anvil-comp7" + else + DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )" + fi +fi mkdir -p "$ARTIFACTS" DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" rm -f "$DONE_CANARY" -docker run -it \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root \ - -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root \ +if [ -z "${CI}" ]; then + DOCKER_RUN_ARGS="-it " +fi + +export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +docker run ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:ro,z \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \ -e CONFIG \ -e BINSTAR_TOKEN \ -e HOST_USER_ID \ + -e UPLOAD_PACKAGES \ + -e GIT_BRANCH \ + -e UPLOAD_ON_BRANCH \ + -e CI \ $DOCKER_IMAGE \ bash \ - /home/conda/feedstock_root/.circleci/build_steps.sh + /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh # verify that the end of the script was reached test -f "$DONE_CANARY" \ No newline at end of file diff --git a/.ci_support/linux_.yaml b/.ci_support/linux_.yaml new file mode 100644 index 0000000..3355a94 --- /dev/null +++ b/.ci_support/linux_.yaml @@ -0,0 +1,10 @@ +c_compiler: +- gcc +c_compiler_version: +- '7' +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +docker_image: +- condaforge/linux-anvil-comp7 diff --git a/.ci_support/linux_c_compilergcc.yaml b/.ci_support/linux_c_compilergcc.yaml deleted file mode 100644 index c1f878a..0000000 --- a/.ci_support/linux_c_compilergcc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -build_number_decrement: -- '0' -c_compiler: -- gcc -channel_sources: -- conda-forge/label/gcc7,defaults -channel_targets: -- conda-forge gcc7 -docker_image: -- condaforge/linux-anvil-comp7 -zip_keys: -- - c_compiler - - channel_sources - - channel_targets - - docker_image - - build_number_decrement diff --git a/.ci_support/linux_c_compilertoolchain_c.yaml b/.ci_support/linux_c_compilertoolchain_c.yaml deleted file mode 100644 index 8ff379e..0000000 --- a/.ci_support/linux_c_compilertoolchain_c.yaml +++ /dev/null @@ -1,16 +0,0 @@ -build_number_decrement: -- '1000' -c_compiler: -- toolchain_c -channel_sources: -- conda-forge,defaults -channel_targets: -- conda-forge main -docker_image: -- condaforge/linux-anvil -zip_keys: -- - c_compiler - - channel_sources - - channel_targets - - docker_image - - build_number_decrement diff --git a/.ci_support/osx_c_compilertoolchain_c.yaml b/.ci_support/osx_.yaml similarity index 58% rename from .ci_support/osx_c_compilertoolchain_c.yaml rename to .ci_support/osx_.yaml index 4ea14f9..48ba45f 100644 --- a/.ci_support/osx_c_compilertoolchain_c.yaml +++ b/.ci_support/osx_.yaml @@ -1,9 +1,9 @@ MACOSX_DEPLOYMENT_TARGET: - '10.9' -build_number_decrement: -- '1000' c_compiler: -- toolchain_c +- clang +c_compiler_version: +- '9' channel_sources: - conda-forge,defaults channel_targets: @@ -12,8 +12,3 @@ macos_machine: - x86_64-apple-darwin13.4.0 macos_min_version: - '10.9' -zip_keys: -- - c_compiler - - channel_sources - - channel_targets - - build_number_decrement diff --git a/.ci_support/osx_c_compilerclang.yaml b/.ci_support/osx_c_compilerclang.yaml deleted file mode 100644 index eccec01..0000000 --- a/.ci_support/osx_c_compilerclang.yaml +++ /dev/null @@ -1,19 +0,0 @@ -MACOSX_DEPLOYMENT_TARGET: -- '10.9' -build_number_decrement: -- '0' -c_compiler: -- clang -channel_sources: -- conda-forge/label/gcc7,defaults -channel_targets: -- conda-forge gcc7 -macos_machine: -- x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' -zip_keys: -- - c_compiler - - channel_sources - - channel_targets - - build_number_decrement diff --git a/.ci_support/win_.yaml b/.ci_support/win_.yaml new file mode 100644 index 0000000..b2d4e09 --- /dev/null +++ b/.ci_support/win_.yaml @@ -0,0 +1,14 @@ +c_compiler: +- vs2017 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +pin_run_as_build: + vc: + max_pin: x +vc: +- '14' +zip_keys: +- - vc + - c_compiler diff --git a/.circleci/checkout_merge_commit.sh b/.circleci/checkout_merge_commit.sh deleted file mode 100755 index 9528e4b..0000000 --- a/.circleci/checkout_merge_commit.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - - -# Update PR refs for testing. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/head:pr/${CIRCLE_PR_NUMBER}/head" - FETCH_REFS="${FETCH_REFS} +refs/pull/${CIRCLE_PR_NUMBER}/merge:pr/${CIRCLE_PR_NUMBER}/merge" -fi - -# Retrieve the refs. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git fetch -u origin ${FETCH_REFS} -fi - -# Checkout the PR merge ref. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git checkout -qf "pr/${CIRCLE_PR_NUMBER}/merge" -fi - -# Check for merge conflicts. -if [[ -n "${CIRCLE_PR_NUMBER}" ]] -then - git branch --merged | grep "pr/${CIRCLE_PR_NUMBER}/head" > /dev/null -fi diff --git a/.circleci/config.yml b/.circleci/config.yml index 96be48a..6ad461b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,44 +1,24 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + version: 2 jobs: - build_linux_c_compilergcc: + build: working_directory: ~/test machine: true - environment: - - CONFIG: "linux_c_compilergcc" steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil - - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh - build_linux_c_compilertoolchain_c: - working_directory: ~/test - machine: true - environment: - - CONFIG: "linux_c_compilertoolchain_c" - steps: - - checkout - - run: - name: Fast finish outdated PRs and merge PRs - command: | - ./.circleci/fast_finish_ci_pr_build.sh - ./.circleci/checkout_merge_commit.sh - - run: - command: docker pull condaforge/linux-anvil - run: - # Run, test and (if we have a BINSTAR_TOKEN) upload the distributions. - command: ./.circleci/run_docker_build.sh + # The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish. + command: exit 0 workflows: version: 2 build_and_test: jobs: - - build_linux_c_compilergcc - - build_linux_c_compilertoolchain_c + - build: + filters: + branches: + ignore: + - /.*/ diff --git a/.circleci/fast_finish_ci_pr_build.sh b/.circleci/fast_finish_ci_pr_build.sh deleted file mode 100755 index 8c048ac..0000000 --- a/.circleci/fast_finish_ci_pr_build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -curl https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/recipe/conda_forge_ci_setup/ff_ci_pr_build.py | \ - python - -v --ci "circle" "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" "${CIRCLE_BUILD_NUM}" "${CIRCLE_PR_NUMBER}" diff --git a/.gitattributes b/.gitattributes index 974953e..5823c86 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,18 @@ meta.yaml text eol=lf build.sh text eol=lf bld.bat text eol=crlf + +# github helper pieces to make some files not show up in diffs automatically +.azure-pipelines/* linguist-generated=true +.circleci/* linguist-generated=true +.github/* linguist-generated=true +.travis/* linguist-generated=true +.appveyor.yml linguist-generated=true +.gitattributes linguist-generated=true +.gitignore linguist-generated=true +.travis.yml linguist-generated=true +LICENSE.txt linguist-generated=true +README.md linguist-generated=true +azure-pipelines.yml linguist-generated=true +build-locally.py linguist-generated=true +shippable.yml linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..eb1a245 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @bgruening @dschreij \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index d87090f..0000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,15 +0,0 @@ -Thanks for your interest in helping out conda-forge. - -Whether you are brand new or a seasoned maintainer, we always appreciate -feedback from the community about how we can improve conda-forge. If you -are submitting a PR or issue, please fill out the respective template. Should -any questions arise please feel free to ask the maintainer team of the -respective feedstock or reach out to `@conda-forge/core` for more complex -issues. - -In the case of any issues reported, please be sure to demonstrate the relevant -issue (even if it is an absence of a feature). Providing this information will -help busy maintainers understand what it is you hope to accomplish. Also this -will help provide them clues as to what might be going wrong. These examples -can also be reused as tests in the build to ensure further packages meet these -criteria. This is requested to help you get timely and relevant feedback. :) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index fc95334..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,25 +0,0 @@ - -Issue: - -
-Environment (conda list): -
- -``` -$ conda list - -``` -
- -
-Details about conda and system ( conda info ): -
- -``` -$ conda info - -``` -
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 047fdaf..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,18 +0,0 @@ - -Checklist -* [ ] Used a 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]( https://conda-forge.org/docs/conda_smithy.html#how-to-re-render ) 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. - - - - diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3bb1310..0000000 --- a/.travis.yml +++ /dev/null @@ -1,64 +0,0 @@ -# This file was generated automatically from conda-smithy. To update this configuration, -# update the conda-forge.yml and/or the recipe/meta.yaml. - -language: generic - -os: osx -osx_image: xcode6.4 - -env: - matrix: - - CONFIG=osx_c_compilerclang - - CONFIG=osx_c_compilertoolchain_c - - global: - # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. - - secure: "IDwEjFT+9A0FZIpSWU1mvV6AMS5TolfT1MYnQz0JgMEvCvLUhWam1YSy3p3wf+GdwVFnpKs56Lje9X+lhsr15DXvwc084xrvxTxToy5nRQnm71wCoqA3jH4zWZUGdC2ivfn9bb6h3pb0+6Vq4qE2nweijXWZrRttJUbI3vSakr37AFDPi8aszqTQz12NLNHZgdOfAEXpflEEKUxpOJO/iuRCSoVh9qPp31NjF2Lt74QbmIBFeeRaJrB64hWrpT7KK5tBogX3ehkqZCOFr4MtEH0cptTaWPukgnC//2o1pmSyvlSgs38kY3oBDYblANPGSLlRFbU8pvupiYFxEqi/75Cz6sqDiqCw6ez08jDOxg49433vgjNN3SBeWj0ordpXxhz/aTGpiXDAG1S7uz5yfbY0gJttJAA54jDC7D0m8zhZaAKCJuRukP7u8pDt0HZQpHLt7I6pm9EGKISQDLO0nILRX6E2NyHsVwWsMtaeld4sMOsS7x3oP161P9mxTysFkPDnSbi1tWqzSYjO1lZQfk13pLki9l+MbH+3D3dVHAK9MjFxB03zk7ne70mxR3SuxSBIC+RNaeBJgofn1pBQahOk49j0+WseMP01cwyF8CoSQFJPazXAjRmNFrCtIDYhB3isfSEc4673nVW/NIXKlouoZMhDE2ewoDEnzrTKWio=" - - -before_install: - # Fast finish the PR. - - | - (curl https://raw.githubusercontent.com/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/recipe/conda_forge_ci_setup/ff_ci_pr_build.py | \ - python - -v --ci "travis" "${TRAVIS_REPO_SLUG}" "${TRAVIS_BUILD_NUMBER}" "${TRAVIS_PULL_REQUEST}") || exit 1 - - # Remove homebrew. - - | - echo "" - echo "Removing homebrew from Travis CI to avoid conflicts." - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > ~/uninstall_homebrew - chmod +x ~/uninstall_homebrew - ~/uninstall_homebrew -fq - rm ~/uninstall_homebrew - - -install: - # Install Miniconda. - - | - echo "" - echo "Installing a fresh version of Miniconda." - MINICONDA_URL="https://repo.continuum.io/miniconda" - MINICONDA_FILE="Miniconda3-latest-MacOSX-x86_64.sh" - curl -L -O "${MINICONDA_URL}/${MINICONDA_FILE}" - bash $MINICONDA_FILE -b - - # Configure conda. - - | - echo "" - echo "Configuring conda." - source /Users/travis/miniconda3/bin/activate root - - conda install --yes --quiet conda-forge::conda-forge-ci-setup=2 - setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml - - source run_conda_forge_build_setup - - # compiler cleanup - - | - mangle_compiler ./ ./recipe ./.ci_support/${CONFIG}.yaml - -script: - # generate the build number clobber - - make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml - - conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml - - upload_package ./ ./recipe ./.ci_support/${CONFIG}.yaml diff --git a/LICENSE.txt b/LICENSE.txt index 72dc8fd..cba42cf 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2018, conda-forge +Copyright (c) 2015-2019, conda-forge All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.md b/README.md index e9a1878..5687619 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,54 @@ Summary: Theora is a free and open video compression format from the Xiph.org Fo Current build status ==================== -[![Linux](https://img.shields.io/circleci/project/github/conda-forge/libtheora-feedstock/master.svg?label=Linux)](https://circleci.com/gh/conda-forge/libtheora-feedstock) -[![OSX](https://img.shields.io/travis/conda-forge/libtheora-feedstock/master.svg?label=macOS)](https://travis-ci.org/conda-forge/libtheora-feedstock) -![Windows disabled](https://img.shields.io/badge/Windows-disabled-lightgrey.svg) + + + + + + + + + + + +
Azure +
+ + + + + + + + + + + + + + + + + + +
VariantStatus
linux + + variant + +
osx + + variant + +
win + + variant + +
+
+
Linux_ppc64le + ppc64le disabled +
Current release info ==================== @@ -50,6 +95,8 @@ conda search libtheora --channel conda-forge About conda-forge ================= +[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) + conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository @@ -104,3 +151,10 @@ In order to produce a uniquely identifiable distribution: * If the version of a package **is** being increased, please remember to return the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string) back to 0. + +Feedstock Maintainers +===================== + +* [@bgruening](https://github.com/bgruening/) +* [@dschreij](https://github.com/dschreij/) + diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..e5306da --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,8 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: + - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-osx.yml + - template: ./.azure-pipelines/azure-pipelines-win.yml \ No newline at end of file diff --git a/build-locally.py b/build-locally.py new file mode 100755 index 0000000..51d6a6e --- /dev/null +++ b/build-locally.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 +# +# This file has been generated by conda-smithy in order to build the recipe +# locally. +# +import os +import glob +import subprocess +from argparse import ArgumentParser + + +def setup_environment(ns): + os.environ["CONFIG"] = ns.config + os.environ["UPLOAD_PACKAGES"] = "False" + + +def run_docker_build(ns): + script = glob.glob(".*/run_docker_build.sh")[0] + subprocess.check_call(script) + +def verify_config(ns): + valid_configs = {os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml")} + print(f"valid configs are {valid_configs}") + if ns.config in valid_configs: + print("Using " + ns.config + " configuration") + return + elif len(valid_configs) == 1: + ns.config = valid_configs.pop() + print("Found " + ns.config + " configuration") + elif ns.config is None: + print("config not selected, please choose from the following:\n") + selections = list(enumerate(sorted(valid_configs), 1)) + for i, c in selections: + print(f"{i}. {c}") + s = input("\n> ") + idx = int(s) - 1 + ns.config = selections[idx][1] + print(f"selected {ns.config}") + else: + raise ValueError("config " + ns.config + " is not valid") + # Remove the following, as implemented + if not ns.config.startswith('linux'): + raise ValueError(f"only Linux configs currently supported, got {ns.config}") + + +def main(args=None): + p = ArgumentParser("build-locally") + p.add_argument("config", default=None, nargs="?") + + ns = p.parse_args(args=args) + verify_config(ns) + setup_environment(ns) + + run_docker_build(ns) + + +if __name__ == "__main__": + main() diff --git a/recipe/CMakeLists.txt b/recipe/CMakeLists.txt index b509933..51765bd 100644 --- a/recipe/CMakeLists.txt +++ b/recipe/CMakeLists.txt @@ -1,116 +1,99 @@ -cmake_minimum_required (VERSION 3.1.0) -project (THEORA) - -## Find depenencies - -# libogg +cmake_minimum_required(VERSION 3.0) +project(theora LANGUAGES C) +set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}") FIND_PATH(OGG_INCLUDE_DIR ogg.h PATH_SUFFIXES include/ogg ) -FIND_LIBRARY(OGG_LIBRARIES +FIND_LIBRARY(OGG_LIBRARY NAMES ogg libogg PATH_SUFFIXES lib ) -message(STATUS Found ogg headers at ${OGG_INCLUDE_DIR}) -message(STATUS Found ogg libs at ${OGG_LIBRARIES}) - -include_directories(OGG_INCLUDE_DIR) - -# libvorbis - -# FIND_PATH(VORBIS_INCLUDE_DIR -# vorbis.h -# PATH_SUFFIXES include/vorbis -# ) - -# FIND_LIBRARY(VORBIS_LIBRARIES -# NAMES vorbis libvorbis -# PATH_SUFFIXES lib -# ) - -# message(STATUS Found vorbis headers at ${VORBIS_INCLUDE_DIR}) -# message(STATUS Found vorbis libs at ${VORBIS_LIBRARIES}) - -# include_directories(VORBIS_INCLUDE_DIR) - -## Build libtheora - -add_definitions(-DOC_X86_ASM) -include_directories("${THEORA_SOURCE_DIR}/include") - -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build) - -set(THEORA_SRC - lib/analyze.c - lib/apiwrapper.c - lib/bitpack.c - lib/collect.c - lib/decapiwrapper.c - lib/decinfo.c - lib/decode.c - lib/dequant.c - lib/encapiwrapper.c - lib/encfrag.c - lib/encinfo.c - lib/encode.c - lib/enquant.c - lib/fdct.c - lib/fragment.c - lib/huffdec.c - lib/huffenc.c - lib/idct.c - lib/info.c - lib/internal.c - lib/mathops.c - lib/mcenc.c - lib/quant.c - lib/rate.c - lib/state.c - lib/tokenize.c - lib/x86/mmxencfrag.c - lib/x86/mmxfdct.c - lib/x86/mmxfrag.c - lib/x86/mmxidct.c - lib/x86/mmxstate.c - lib/x86/sse2idct.c - lib/x86/x86cpu.c - lib/x86/x86enquant.c - lib/x86/x86state.c -) -add_library(THEORA SHARED - ${THEORA_SRC} +file(GLOB HEADERS + "include/theora/codec.h" + "include/theora/theora.h" + "include/theora/theoradec.h" + "include/theora/theoraenc.h" ) -target_link_libraries (THEORA - ${OGG_LIBRARIES} - # ${VORBIS_LIBRARIES} +include_directories("include") +include_directories(${OGG_INCLUDE_DIR}) + +set(LIBTHEORA_COMMON + "lib/apiwrapper.c" + "lib/bitpack.c" + "lib/dequant.c" + "lib/fragment.c" + "lib/idct.c" + "lib/info.c" + "lib/internal.c" + "lib/state.c" + "lib/quant.c" + + "lib/x86_vc/mmxfrag.c" + "lib/x86_vc/mmxidct.c" + "lib/x86_vc/mmxstate.c" + "lib/x86_vc/x86state.c" ) -# if(WIN32) -# if(MSVC) -# configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/win32/THEORA.def ${CMAKE_CURRENT_BINARY_DIR}/win32/THEORA.def @ONLY) -# set_target_properties(THEORA PROPERTIES LINK_FLAGS "/DEF:win32/THEORA.def") -# endif() -# endif() - -set_target_properties(THEORA - PROPERTIES DEFINE_SYMBOL "DLL_EXPORT" +set(LIBTHEORA_ENC + "lib/analyze.c" + "lib/encapiwrapper.c" + "lib/encfrag.c" + "lib/encinfo.c" + "lib/encode.c" + "lib/enquant.c" + "lib/fdct.c" + "lib/huffenc.c" + "lib/mathops.c" + "lib/mcenc.c" + "lib/rate.c" + "lib/tokenize.c" + + "lib/x86_vc/mmxencfrag.c" + "lib/x86_vc/mmxfdct.c" + "lib/x86_vc/x86enc.c" ) -set_target_properties(THEORA - PROPERTIES PREFIX "" OUTPUT_NAME "libtheora" + +set(LIBTHEORA_DEC + "lib/decapiwrapper.c" + "lib/decinfo.c" + "lib/decode.c" + "lib/huffdec.c" ) -##### Installation targets ##### -install(TARGETS THEORA - LIBRARY DESTINATION "lib${LIB_SUFFIX}" - ARCHIVE DESTINATION "lib${LIB_SUFFIX}" - RUNTIME DESTINATION bin) +add_definitions(-D_CRT_SECURE_NO_DEPRECATE) +add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + +option(USE_X86 "Use x86 optimization" OFF) +if(USE_X86) + add_definitions(-DOC_X86_ASM) +endif() + +if (BUILD_SHARED_LIBS) + add_definitions(-DLIBTHEORA_EXPORTS) +endif() -file(GLOB INCLUDE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h) -# Copy .h files to include dir. -install(DIRECTORY ${THEORA_SOURCE_DIR}/include/theora DESTINATION include - FILES_MATCHING PATTERN "*.h") \ No newline at end of file +add_library(theora-common OBJECT ${LIBTHEORA_COMMON} ${HEADERS}) +add_library(theora-enc OBJECT ${LIBTHEORA_ENC} ${HEADERS}) +add_library(theora-dec OBJECT ${LIBTHEORA_DEC} ${HEADERS}) + +add_library(theora $ $ $ "libtheora.def") +target_link_libraries(theora ${OGG_LIBRARY}) + +add_library(theoraenc $ $ "win32/xmingw32/libtheoraenc-all.def") +target_link_libraries(theoraenc ${OGG_LIBRARY}) + +add_library(theoradec $ $ "win32/xmingw32/libtheoradec-all.def") +target_link_libraries(theoradec ${OGG_LIBRARY}) + +install(FILES ${HEADERS} DESTINATION include/theora) + +install(TARGETS theora theoraenc theoradec + RUNTIME DESTINATION bin + LIBRARY DESTINATION bin + ARCHIVE DESTINATION lib +) diff --git a/recipe/bld.bat b/recipe/bld.bat index cb91782..fe37c01 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,13 +1,19 @@ setlocal EnableDelayedExpansion copy %RECIPE_DIR%\CMakeLists.txt .\CMakeLists.txt +copy %RECIPE_DIR%\libtheora.def .\libtheora.def :: Make a build folder and change to it. mkdir build cd build :: Configure using the CMakeFiles -%LIBRARY_BIN%\cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" -DCMAKE_BUILD_TYPE:STRING=Release .. +cmake ^ + -G "NMake Makefiles" ^ + -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ + -DCMAKE_BUILD_TYPE:STRING=Release ^ + -DBUILD_SHARED_LIBS=ON ^ + .. if errorlevel 1 exit 1 :: Build! diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml new file mode 100644 index 0000000..b143248 --- /dev/null +++ b/recipe/conda_build_config.yaml @@ -0,0 +1,8 @@ +c_compiler: # [win] + - vs2017 # [win] +cxx_compiler: # [win] + - vs2017 # [win] +vc: # [win] + - 14 # [win] +python: # [win] + - 3.7 # [win] diff --git a/recipe/libtheora.def b/recipe/libtheora.def new file mode 100644 index 0000000..9755b81 --- /dev/null +++ b/recipe/libtheora.def @@ -0,0 +1,61 @@ +EXPORTS +; Old alpha API + theora_version_string + theora_version_number + theora_decode_header + theora_decode_init + theora_decode_packetin + theora_decode_YUVout + theora_control + theora_packet_isheader + theora_packet_iskeyframe + theora_granule_shift + theora_granule_frame + theora_granule_time + theora_info_init + theora_info_clear + theora_clear + theora_comment_init + theora_comment_add + theora_comment_add_tag + theora_comment_query + theora_comment_query_count + theora_comment_clear +; New theora-exp API + th_version_string + th_version_number + th_decode_headerin + th_decode_alloc + th_setup_free + th_decode_ctl + th_decode_packetin + th_decode_ycbcr_out + th_decode_free + th_packet_isheader + th_packet_iskeyframe + th_granule_frame + th_granule_time + th_info_init + th_info_clear + th_comment_init + th_comment_add + th_comment_add_tag + th_comment_query + th_comment_query_count + th_comment_clear +; Old alpha API + theora_encode_init + theora_encode_YUVin + theora_encode_packetout + theora_encode_header + theora_encode_comment + theora_encode_tables +; New theora-exp API + th_encode_alloc + th_encode_ctl + th_encode_flushheader + th_encode_ycbcr_in + th_encode_packetout + th_encode_free + TH_VP31_QUANT_INFO + TH_VP31_HUFF_CODES diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8ca68b2..3a1affd 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,25 +10,26 @@ source: sha256: b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc build: - number: 1001 - skip: True # [win] + number: 1002 + skip: True # [win and vc<14] requirements: build: - pkg-config - {{ compiler("c") }} + - cmake # [win] host: - libogg 1.3.* - - libvorbis 1.3.* - - libpng >=1.6.23,<1.7 - - zlib 1.2.* + - libvorbis 1.3.* # [unix or osx] + - libpng >=1.6.23,<1.7 # [unix or osx] + - zlib 1.2.* # [unix or osx] run: - libogg 1.3.* - - libvorbis 1.3.* - - libpng >=1.6.23,<1.7 - - zlib 1.2.* + - libvorbis 1.3.* # [unix or osx] + - libpng >=1.6.23,<1.7 # [unix or osx] + - zlib 1.2.* # [unix or osx] test: commands: @@ -42,6 +43,9 @@ test: - test -f ${PREFIX}/lib/lib{{ each_libtheora_lib }}.a # [unix] - test -f ${PREFIX}/lib/lib{{ each_libtheora_lib }}.dylib # [osx] - test -f ${PREFIX}/lib/lib{{ each_libtheora_lib }}.so # [linux] + - if exist %PREFIX%\\Library\\lib\\{{ each_libtheora_lib }}.lib (exit 0) else (exit 1) # [win] + - if exist %PREFIX%\\Library\\include\\{{ each_libtheora_lib }}.h (exit 0) else (exit 1) # [win] + - if exist %PREFIX%\\Library\\bin\\{{ each_libtheora_lib }}.dll (exit 0) else (exit 1) # [win] {% endfor %}