diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 7f1c9e3..adce9a5 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -6,18 +6,19 @@ jobs: - job: linux pool: vmImage: ubuntu-16.04 - timeoutInMinutes: 360 strategy: - maxParallel: 8 matrix: - linux_: - CONFIG: linux_ - UPLOAD_PACKAGES: True + linux_64_: + CONFIG: linux_64_ + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + timeoutInMinutes: 360 + steps: - script: | - sudo pip install --upgrade pip - sudo pip install setuptools shyaml - displayName: Install dependencies + rm -rf /opt/ghc + df -h + displayName: Manage disk space # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static @@ -27,7 +28,13 @@ jobs: condition: not(startsWith(variables['CONFIG'], 'linux_64')) displayName: Configure binfmt_misc - - script: .azure-pipelines/run_docker_build.sh + - script: | + export CI=azure + export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) + .scripts/run_docker_build.sh displayName: Run docker build env: - BINSTAR_TOKEN: $(BINSTAR_TOKEN) \ No newline at end of file + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) \ No newline at end of file diff --git a/.azure-pipelines/build_steps.sh b/.azure-pipelines/build_steps.sh deleted file mode 100755 index 779d52b..0000000 --- a/.azure-pipelines/build_steps.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here -# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent -# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also -# benefit from the improvement. - -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 CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" - -cat >~/.condarc < -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 ba618a2..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/maintainer/updating_pkgs.html#rerendering-feedstocks ) 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/.scripts/build_steps.sh b/.scripts/build_steps.sh new file mode 100755 index 0000000..aa9727b --- /dev/null +++ b/.scripts/build_steps.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +set -xeuo pipefail +export PYTHONUNBUFFERED=1 +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 < - - All platforms: +
All platforms: @@ -69,7 +67,7 @@ A feedstock is made up of a conda recipe (the instructions on what and how to bu the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by [CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/) -and [TravisCI](https://travis-ci.org/) it is possible to build and upload installable +and [TravisCI](https://travis-ci.com/) it is possible to build and upload installable packages to the [conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/) channel for Linux, Windows and OSX respectively. @@ -119,4 +117,5 @@ Feedstock Maintainers ===================== * [@scopatz](https://github.com/scopatz/) +* [@wolfv](https://github.com/wolfv/) diff --git a/build-locally.py b/build-locally.py new file mode 100755 index 0000000..3453cfe --- /dev/null +++ b/build-locally.py @@ -0,0 +1,75 @@ +#!/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" + if ns.debug: + os.environ["BUILD_WITH_CONDA_DEBUG"] = "1" + if ns.output_id: + os.environ["BUILD_OUTPUT_ID"] = ns.output_id + + +def run_docker_build(ns): + script = ".scripts/run_docker_build.sh" + 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="?") + p.add_argument( + "--debug", + action="store_true", + help="Setup debug environment using `conda debug`", + ) + p.add_argument( + "--output-id", help="If running debug, specify the output to setup." + ) + + ns = p.parse_args(args=args) + verify_config(ns) + setup_environment(ns) + + run_docker_build(ns) + + +if __name__ == "__main__": + main() diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9abdda6..c804805 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,7 +1,6 @@ {% set name = "pysoundfile" %} {% set pypi_name = "SoundFile" %} -{% set version = "0.10.2" %} -{% set sha256 = "637f6218c867b8cae80f6989634a0813b416b3e6132480d056e6e5a89a921571" %} +{% set version = "0.10.3.post1" %} package: name: {{ name|lower }} @@ -10,15 +9,23 @@ package: source: fn: {{ pypi_name }}-{{ version }}.tar.gz url: https://pypi.io/packages/source/{{ pypi_name[0] }}/{{ pypi_name }}/{{ pypi_name }}-{{ version }}.tar.gz - sha256: {{ sha256 }} + sha256: 490cff42650733d1832728b937fe99fa1802896f5ef4d61bcf78cf7ebecb107b build: + number: 0 noarch: python - number: 1001 - script: python setup.py install --single-version-externally-managed --record record.txt + script: + # We are currently building a noarch package, but pysoundfile contains a + # install-time check for the OS and injects the sf_wchar_open function + # conditionally. If this variable is not set, opening files on Windows doesn't work + # Fix coming hopefully with https://github.com/bastibe/python-soundfile/pull/288 + # Original issue on conda-forge: https://github.com/conda-forge/libsndfile-feedstock/issues/14 + - export PYSOUNDFILE_PLATFORM=win32 + - python -m pip install . --no-deps -vv requirements: host: + - pip - python - setuptools - cffi @@ -34,7 +41,7 @@ test: about: home: http://pysoundfile.readthedocs.io - license: BSD 3-Clause + license: BSD-3-Clause license_family: BSD license_file: LICENSE summary: 'SoundFile is an audio library based on libsndfile, CFFI, and NumPy' @@ -43,3 +50,4 @@ about: extra: recipe-maintainers: - scopatz + - wolfv