From c2e508d4247bcb5271cf62753c555ada63336bfc Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 22 Sep 2020 13:35:55 +0200 Subject: [PATCH] release ruby 2.7.2 on win, os x and linux, MNT: Re-rendered with conda-build 3.19.2, conda-smithy 3.7.10, and conda-forge-pinning 2020.09.19.20.20.14 --- .azure-pipelines/azure-pipelines-linux.yml | 25 +++-- .azure-pipelines/azure-pipelines-osx.yml | 17 +-- .azure-pipelines/azure-pipelines-win.yml | 111 ++++++++++++++++++++ .ci_support/{linux_.yaml => linux_64_.yaml} | 4 +- .ci_support/linux_aarch64_.yaml | 8 +- .ci_support/linux_ppc64le_.yaml | 4 +- .ci_support/{osx_.yaml => osx_64_.yaml} | 10 +- .ci_support/win_64_.yaml | 23 ++++ .drone.yml | 31 ++++++ .gitattributes | 2 +- .github/CODEOWNERS | 2 +- .scripts/build_steps.sh | 5 +- .scripts/run_docker_build.sh | 12 ++- .scripts/run_osx_build.sh | 6 +- .travis.yml | 6 +- LICENSE.txt | 2 +- README.md | 31 ++++-- azure-pipelines.yml | 1 + conda-forge.yml | 2 +- recipe/activate.bat | 3 + recipe/activate.sh | 7 ++ recipe/add-pragma-unused-variable.patch | 20 ---- recipe/bld.bat | 34 ++++++ recipe/build.sh | 18 ++++ recipe/deactivate.bat | 10 ++ recipe/deactivate.sh | 17 +++ recipe/meta.yaml | 49 ++++----- 27 files changed, 360 insertions(+), 100 deletions(-) create mode 100755 .azure-pipelines/azure-pipelines-win.yml rename .ci_support/{linux_.yaml => linux_64_.yaml} (92%) rename .ci_support/{osx_.yaml => osx_64_.yaml} (91%) create mode 100644 .ci_support/win_64_.yaml create mode 100644 .drone.yml create mode 100644 recipe/activate.bat create mode 100644 recipe/activate.sh delete mode 100644 recipe/add-pragma-unused-variable.patch create mode 100644 recipe/bld.bat create mode 100644 recipe/deactivate.bat create mode 100644 recipe/deactivate.sh diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 40098dc..89ab23f 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -6,19 +6,21 @@ 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: condaforge/linux-anvil-comp7 - linux_aarch64_: - CONFIG: linux_aarch64_ - UPLOAD_PACKAGES: True - DOCKER_IMAGE: condaforge/linux-anvil-aarch64 + maxParallel: 8 + timeoutInMinutes: 360 + steps: + - script: | + 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 - script: | @@ -30,7 +32,10 @@ jobs: - 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/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 1971661..568ec85 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,14 +5,14 @@ jobs: - job: osx pool: - vmImage: macOS-10.14 - timeoutInMinutes: 360 + vmImage: macOS-10.15 strategy: - maxParallel: 8 matrix: - osx_: - CONFIG: osx_ - UPLOAD_PACKAGES: True + osx_64_: + CONFIG: osx_64_ + UPLOAD_PACKAGES: 'True' + maxParallel: 8 + timeoutInMinutes: 360 steps: # TODO: Fast finish on azure pipelines? @@ -20,7 +20,10 @@ jobs: export CI=azure export OSX_FORCE_SDK_DOWNLOAD="1" export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME + export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) ./.scripts/run_osx_build.sh displayName: Run OSX 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/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 0000000..ab8cb2b --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,111 @@ +# 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 + strategy: + matrix: + win_64_: + CONFIG: win_64_ + UPLOAD_PACKAGES: 'True' + maxParallel: 4 + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + + steps: + - 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=3 pip' # Optional + installOptions: "-c conda-forge" + updateConda: true + displayName: Install conda-build and activate environment + + - script: set PYTHONUNBUFFERED=1 + displayName: Set PYTHONUNBUFFERED + + # Configure the VM + - script: | + call activate base + setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml + displayName: conda-forge CI setup + + # Configure the VM. + - script: | + set "CI=azure" + call activate base + run_conda_forge_build_setup + displayName: conda-forge build setup + + + # Special cased version setting some more things! + - script: | + call activate base + 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: | + call activate base + conda.exe build "recipe" -m .ci_support\%CONFIG%.yaml + displayName: Build recipe + env: + PYTHONUNBUFFERED: 1 + condition: not(contains(variables['CONFIG'], 'vs2008')) + - script: | + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + call activate base + validate_recipe_outputs "%FEEDSTOCK_NAME%" + displayName: Validate Recipe Outputs + + - script: | + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + call activate base + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml + displayName: Upload package + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False'))) \ No newline at end of file diff --git a/.ci_support/linux_.yaml b/.ci_support/linux_64_.yaml similarity index 92% rename from .ci_support/linux_.yaml rename to .ci_support/linux_64_.yaml index bf02071..a91c383 100644 --- a/.ci_support/linux_.yaml +++ b/.ci_support/linux_64_.yaml @@ -17,7 +17,7 @@ gmp: libffi: - '3.2' ncurses: -- '6.1' +- '6.2' openssl: - 1.1.1 pin_run_as_build: @@ -35,5 +35,7 @@ pin_run_as_build: max_pin: x.x readline: - '8.0' +target_platform: +- linux-64 zlib: - '1.2' diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml index 751b6ca..a6ff788 100644 --- a/.ci_support/linux_aarch64_.yaml +++ b/.ci_support/linux_aarch64_.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '7' +- '7.5' cdt_arch: - aarch64 cdt_name: @@ -15,7 +15,7 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '7' +- '7.5' docker_image: - condaforge/linux-anvil-aarch64 gmp: @@ -23,7 +23,7 @@ gmp: libffi: - '3.2' ncurses: -- '6.1' +- '6.2' openssl: - 1.1.1 pin_run_as_build: @@ -41,5 +41,7 @@ pin_run_as_build: max_pin: x.x readline: - '8.0' +target_platform: +- linux-aarch64 zlib: - '1.2' diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml index 0960420..fb645c6 100644 --- a/.ci_support/linux_ppc64le_.yaml +++ b/.ci_support/linux_ppc64le_.yaml @@ -17,7 +17,7 @@ gmp: libffi: - '3.2' ncurses: -- '6.1' +- '6.2' openssl: - 1.1.1 pin_run_as_build: @@ -35,5 +35,7 @@ pin_run_as_build: max_pin: x.x readline: - '8.0' +target_platform: +- linux-ppc64le zlib: - '1.2' diff --git a/.ci_support/osx_.yaml b/.ci_support/osx_64_.yaml similarity index 91% rename from .ci_support/osx_.yaml rename to .ci_support/osx_64_.yaml index e27f08d..2c9053a 100644 --- a/.ci_support/osx_.yaml +++ b/.ci_support/osx_64_.yaml @@ -3,7 +3,7 @@ MACOSX_DEPLOYMENT_TARGET: c_compiler: - clang c_compiler_version: -- '9' +- '10' channel_sources: - conda-forge,defaults channel_targets: @@ -11,17 +11,15 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '9' +- '10' gmp: - '6' libffi: - '3.2' macos_machine: - x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.9' ncurses: -- '6.1' +- '6.2' openssl: - 1.1.1 pin_run_as_build: @@ -39,5 +37,7 @@ pin_run_as_build: max_pin: x.x readline: - '8.0' +target_platform: +- osx-64 zlib: - '1.2' diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml new file mode 100644 index 0000000..36a7e11 --- /dev/null +++ b/.ci_support/win_64_.yaml @@ -0,0 +1,23 @@ +c_compiler: +- vs2017 +channel_sources: +- conda-forge,defaults +channel_targets: +- conda-forge main +cxx_compiler: +- vs2017 +libffi: +- '3.2' +openssl: +- 1.1.1 +pin_run_as_build: + libffi: + max_pin: x.x + openssl: + max_pin: x.x.x + zlib: + max_pin: x.x +target_platform: +- win-64 +zlib: +- '1.2' diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d1e62ed --- /dev/null +++ b/.drone.yml @@ -0,0 +1,31 @@ +--- +kind: pipeline +name: linux_aarch64_ + +platform: + os: linux + arch: arm64 + +steps: +- name: Install and build + image: condaforge/linux-anvil-aarch64 + environment: + CONFIG: linux_aarch64_ + UPLOAD_PACKAGES: True + PLATFORM: linux-aarch64 + BINSTAR_TOKEN: + from_secret: BINSTAR_TOKEN + FEEDSTOCK_TOKEN: + from_secret: FEEDSTOCK_TOKEN + STAGING_BINSTAR_TOKEN: + from_secret: STAGING_BINSTAR_TOKEN + commands: + - export FEEDSTOCK_ROOT="$DRONE_WORKSPACE" + - export RECIPE_ROOT="$FEEDSTOCK_ROOT/recipe" + - export CI=drone + - export GIT_BRANCH="$DRONE_BRANCH" + - export FEEDSTOCK_NAME=$(basename ${DRONE_REPO_NAME}) + - sed -i '$ichown -R conda:conda "$FEEDSTOCK_ROOT"' /opt/docker/bin/entrypoint + - /opt/docker/bin/entrypoint $FEEDSTOCK_ROOT/.scripts/build_steps.sh + - echo "Done building" + diff --git a/.gitattributes b/.gitattributes index ac943c1..9060b27 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ bld.bat text eol=crlf .gitattributes linguist-generated=true .gitignore linguist-generated=true .travis.yml linguist-generated=true -.scripts linguist-generated=true +.scripts/* linguist-generated=true LICENSE.txt linguist-generated=true README.md linguist-generated=true azure-pipelines.yml linguist-generated=true diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e3aa501..e3f06f9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @jimmynguyc @scopatz @sodre \ No newline at end of file +* @jimmynguyc @scopatz @sodre @wolfv \ No newline at end of file diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 5b14787..7167db8 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -21,7 +21,6 @@ CONDARC conda install --yes --quiet conda-forge-ci-setup=3 conda-build pip -c conda-forge - # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -31,10 +30,12 @@ source run_conda_forge_build_setup make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" +validate_recipe_outputs "${FEEDSTOCK_NAME}" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then - upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" fi touch "${FEEDSTOCK_ROOT}/build_artifacts/conda-forge-build-done-${CONFIG}" \ No newline at end of file diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh index 253723c..e4d5bab 100755 --- a/.scripts/run_docker_build.sh +++ b/.scripts/run_docker_build.sh @@ -13,6 +13,10 @@ PROVIDER_DIR="$(basename $THISDIR)" FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + docker info # In order for the conda-build process in the container to write to the mounted @@ -60,15 +64,19 @@ fi export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" docker run ${DOCKER_RUN_ARGS} \ - -v "${RECIPE_ROOT}":/home/conda/recipe_root:ro,z \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,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 \ + -e FEEDSTOCK_NAME \ + -e CPU_COUNT \ + -e BINSTAR_TOKEN \ + -e FEEDSTOCK_TOKEN \ + -e STAGING_BINSTAR_TOKEN \ $DOCKER_IMAGE \ bash \ /home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 775799b..982eae9 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -47,9 +47,11 @@ set -e echo -e "\n\nMaking the build clobber file and running the build." make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml + +conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} +validate_recipe_outputs "${FEEDSTOCK_NAME}" if [[ "${UPLOAD_PACKAGES}" != "False" ]]; then echo -e "\n\nUploading the packages." - upload_package ./ ./recipe ./.ci_support/${CONFIG}.yaml + upload_package --validate --feedstock-name="${FEEDSTOCK_NAME}" ./ ./recipe ./.ci_support/${CONFIG}.yaml fi \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index a2c17c1..fb662ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,7 @@ language: generic -env: - global: - # The BINSTAR_TOKEN secure variable. This is defined canonically in conda-forge.yml. - - secure: "JQ+G+j/4sdqR4JyCtrN2wiy5DGAp+j82JoNAtsHp655ropuFMgoZ5tKNl22feDj8W/+SdH0teNWhG076DN5DWQDyPn5zL6s1i1Vkamu9O2ee138PBC3PsonsoUb7O42zAcuIphKc+w0YyXTxc53vxZYbqIFsdV1lAu78c0FzP0WjAjrpQUWSCvqb3upJ1V8Cmnad7GFwVSjfopTGhu2MoMYhK13Qb78zHc8/Xlk6Mb8bzskOq1edArNv+RSFqQuXzUANxN48feADEnGfI11GX+Knm+WlVDXbPvgm/syWcxT72Vjl/VZd2p/Gp6TYj8r02esyj896ohjnf78A2UlM+UZYF7O9vgi1K6QeSpfCnMjA6dpCYfVvuVCZ1J90s0t7QwET687aWy5F9R4YzjkvApq/6IFIBmDYTJsJBVyyAVRws6fhG3V4Amw1xBgZR5oBq+teYiIxYYB33YLlTMWlU3ahKtw/bRns/vVYSgzOFRIigEh5LGLme9duOdcmQTDMSF6Xe2s9Zp6iHjdS47kXXjHitV7v4aIKKIttTQFGKf7l+jCAT2iZrT1p9O+YRet5teDOv1GteCru1M9Y9C6H8N/MGvYMZdjwgxhoG/Utb4ZQIuuAdfYvSPUDWz7UsZ5uzAPccycrs6Am7ea3HhPPp4yyBYtNFt7lbrFqL3CV8xs=" + matrix: include: @@ -17,6 +14,7 @@ matrix: script: - export CI=travis - export GIT_BRANCH="$TRAVIS_BRANCH" + - export FEEDSTOCK_NAME=$(basename ${TRAVIS_REPO_SLUG}) - if [[ ${PLATFORM} =~ .*linux.* ]]; then ./.scripts/run_docker_build.sh; fi \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index cba42cf..5f30279 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ BSD 3-clause license -Copyright (c) 2015-2019, conda-forge +Copyright (c) 2015-2020, conda-forge contributors 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 bb619c7..c85406a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Home: https://www.ruby-lang.org/ Package license: BSD-2-Clause -Feedstock license: BSD 3-Clause +Feedstock license: BSD-3-Clause Summary: A dynamic, open source programming language with a focus on simplicity and productivity. @@ -24,6 +24,13 @@ Current build status macOS + + Drone + + + linux + + @@ -38,10 +45,10 @@ Current build status - + @@ -59,10 +66,17 @@ Current build status - + + + + @@ -71,12 +85,6 @@ Current build status - - - -
VariantStatus
linuxlinux_64 - variant + variant
osxosx_64 + + variant + +
win_64 - variant + variant
Windows - Windows disabled -
Current release info @@ -174,4 +182,5 @@ Feedstock Maintainers * [@jimmynguyc](https://github.com/jimmynguyc/) * [@scopatz](https://github.com/scopatz/) * [@sodre](https://github.com/sodre/) +* [@wolfv](https://github.com/wolfv/) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33a441c..6b346f5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,4 +4,5 @@ jobs: - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-win.yml - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file diff --git a/conda-forge.yml b/conda-forge.yml index 7348fed..99f5246 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,5 +1,5 @@ compiler_stack: comp7 max_py_ver: '37' max_r_ver: '35' -provider: {linux_aarch64: azure, linux_ppc64le: travis} +provider: {linux_aarch64: default, linux_ppc64le: default} conda_forge_output_validation: true diff --git a/recipe/activate.bat b/recipe/activate.bat new file mode 100644 index 0000000..72b84bf --- /dev/null +++ b/recipe/activate.bat @@ -0,0 +1,3 @@ +@echo off +set GEM_HOME=%CONDA_PREFIX%\Library\share\rubygems +set PATH=%CONDA_PREFIX%\Library\share\rubygems\bin;%PATH% \ No newline at end of file diff --git a/recipe/activate.sh b/recipe/activate.sh new file mode 100644 index 0000000..9394e8e --- /dev/null +++ b/recipe/activate.sh @@ -0,0 +1,7 @@ +if [ -z "$COMSPEC" ]; then + export GEM_HOME=$CONDA_PREFIX/share/rubygems/ + export PATH="$CONDA_PREFIX/share/rubygems/bin:$PATH" +else + export GEM_HOME=$CONDA_PREFIX/Library/share/rubygems/ + export PATH="$CONDA_PREFIX/Library/share/rubygems/bin:$PATH" +fi \ No newline at end of file diff --git a/recipe/add-pragma-unused-variable.patch b/recipe/add-pragma-unused-variable.patch deleted file mode 100644 index 2a27dc0..0000000 --- a/recipe/add-pragma-unused-variable.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h -index 576b951..8587253 100644 ---- a/include/ruby/ruby.h -+++ b/include/ruby/ruby.h -@@ -2182,12 +2182,15 @@ rb_array_ptr_use_start(VALUE a, int allow_transient) - } - - /* internal function. do not use this function */ -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wunused-parameter" - static inline void - rb_array_ptr_use_end(VALUE a, int allow_transient) - { - void rb_ary_ptr_use_end(VALUE a); - rb_ary_ptr_use_end(a); - } -+#pragma GCC diagnostic pop - - #if defined(EXTLIB) && defined(USE_DLN_A_OUT) - /* hook for external modules */ diff --git a/recipe/bld.bat b/recipe/bld.bat new file mode 100644 index 0000000..c25b2e0 --- /dev/null +++ b/recipe/bld.bat @@ -0,0 +1,34 @@ +setlocal enableextensions + +RMDIR /s /q ext\fiddle\libffi-3.2.1 + +CALL win32\configure.bat --prefix=%LIBRARY_PREFIX% +if %errorlevel% neq 0 exit /b %errorlevel% + +nmake +if %errorlevel% neq 0 exit /b %errorlevel% + +nmake install +if %errorlevel% neq 0 exit /b %errorlevel% + +mkdir %LIBRARY_PREFIX%\etc +if %errorlevel% neq 0 exit /b %errorlevel% + +mkdir %LIBRARY_PREFIX%\share\rubygems +if %errorlevel% neq 0 exit /b %errorlevel% + +echo "gemhome: %LIBRARY_PREFIX%/share/rubygems" > %LIBRARY_PREFIX%/etc/gemrc +if %errorlevel% neq 0 exit /b %errorlevel% + +setlocal EnableDelayedExpansion +:: Copy the [de]activate scripts to %PREFIX%\etc\conda\[de]activate.d. +:: This will allow them to be run on environment activation. +for %%F in (activate deactivate) DO ( + if not exist %PREFIX%\etc\conda\%%F.d mkdir %PREFIX%\etc\conda\%%F.d + copy %RECIPE_DIR%\%%F.bat %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.bat + if %errorlevel% neq 0 exit /b %errorlevel% + + :: Copy unix shell activation scripts, needed by Windows Bash users + copy %RECIPE_DIR%\%%F.sh %PREFIX%\etc\conda\%%F.d\%PKG_NAME%_%%F.sh + if %errorlevel% neq 0 exit /b %errorlevel% +) \ No newline at end of file diff --git a/recipe/build.sh b/recipe/build.sh index 08952de..9369eb0 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -16,6 +16,11 @@ export LD=$(basename $LD) # Remove vendored libffi rm -rf ext/fiddle/libffi-3.2.1 +if [[ "$(uname)" == "Darwin" ]]; then + # ensure that osx-64 uses libtool instead of ar + export AR="${LIBTOOL}" +fi + autoconf ./configure \ @@ -33,3 +38,16 @@ make -j ${CPU_COUNT} # make check works locally on Linux, but not on CI Nodes, issue seems related to IPv6 and closed ports # make check make install + +mkdir -p $PREFIX/etc +mkdir -p $PREFIX/share/rubygems/ + +echo "gemhome: ${PREFIX}/share/rubygems" > $PREFIX/etc/gemrc + +# Copy the [de]activate scripts to $PREFIX/etc/conda/[de]activate.d. +# This will allow them to be run on environment activation. +for CHANGE in "activate" "deactivate" +do + mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d" + cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" +done diff --git a/recipe/deactivate.bat b/recipe/deactivate.bat new file mode 100644 index 0000000..bb462fc --- /dev/null +++ b/recipe/deactivate.bat @@ -0,0 +1,10 @@ +@echo off + +set GEM_HOME= + +rem remove the bin folder from path +set removedir=%CONDA_PREFIX%\Library\share\rubygems\bin +setlocal enableextensions enabledelayedexpansion +set _=!PATH:%removedir%;=! +if "%_%" == "%PATH%" set _=!PATH:;%removedir%=! +endlocal & set PATH=%_% \ No newline at end of file diff --git a/recipe/deactivate.sh b/recipe/deactivate.sh new file mode 100644 index 0000000..44c0bfd --- /dev/null +++ b/recipe/deactivate.sh @@ -0,0 +1,17 @@ +unset GEM_HOME + +# Read PATH and split by : to array env_path +IFS=':' read -ra env_path <<< "$PATH" + +PATH="" +for dir in "${env_path[@]}"; do + if [[ $dir != "${CONDA_PREFIX}/share/rubygems/bin" ]]; then + PATH="${PATH:+$PATH:}$dir" + fi + # Windows case + if [[ $dir != "${CONDA_PREFIX}/Library/share/rubygems/bin" ]]; then + PATH="${PATH:+$PATH:}$dir" + fi +done + +export PATH \ No newline at end of file diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b7aa96f..f15e8b0 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "ruby" %} -{% set version = "2.6.6" %} +{% set version = "2.7.2" %} {% set major_minor = '.'.join(version.split('.')[0:2]) %} package: @@ -8,21 +8,13 @@ package: source: url: https://cache.ruby-lang.org/pub/ruby/{{ major_minor }}/ruby-{{ version }}.tar.gz - sha256: 364b143def360bac1b74eb56ed60b1a0dca6439b00157ae11ff77d5cd2e92291 + sha256: 6e5706d0d4ee4e1e2f883db9d768586b4d06567debea353c796ec45e8321c3d4 patches: - # This patch undoes the libtool ARFLAGS modification in 2.6.x - # It was created by undoing the following two commits from ruby/ruby - # - https://github.com/ruby/ruby/commit/2627c19d82252f2bb571f6bcb44e359cacefa92b - # - https://github.com/ruby/ruby/commit/bf87195ea37d9607e21e50a1e7df63a2cdd6451f - - undo-libtool.patch # [osx] - - # Patches/work-a-rounds for passing make check - - add-pragma-unused-variable.patch + # Patches/work-arounds for passing make check - disable-backtrace-with-lines.patch build: number: 0 - skip: True # [win] track_features: - rb{{ major_minor | replace(".", "") }} run_exports: @@ -35,19 +27,19 @@ requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} - - autoconf - - automake - - make - - pkg-config + - autoconf # [unix] + - automake # [unix] + - make # [unix] + - pkg-config # [unix] host: - - gdbm # [x86] - - gettext # [osx] - - gmp - - libffi - - ncurses + - gdbm # [x86 and unix] + - gettext # [osx] + - gmp # [unix] + - libffi # [unix] + - ncurses # [unix] - openssl - - readline - - yaml + - readline # [unix] + - yaml # [unix] - zlib run: - gettext # [osx] @@ -56,7 +48,7 @@ test: requires: - {{ compiler('c') }} - {{ compiler('cxx') }} - - make + - make # [unix] files: - native/hello.c - native/config.rb @@ -65,13 +57,13 @@ test: - gem --version - ruby -e 'puts "Hi, from Ruby!"' - ruby -r rubygems -e 'puts "Has gems."; exit 0' - - ruby -r fiddle -r openssl -r readline -r yaml -r zlib -e 'puts "Has all dependencies."; exit 0' + - ruby -r fiddle -r openssl -r readline -r yaml -r zlib -e 'puts "Has all dependencies."; exit 0' # [unix] # Tests it can build libraries with native dependencies - - cd native - - ruby config.rb - - make - - ruby -r ./hello.so -e 'hello' + - cd native # [unix] + - ruby config.rb # [unix] + - make # [unix] + - ruby -r ./hello.so -e 'hello' # [unix] about: home: https://www.ruby-lang.org/ @@ -90,3 +82,4 @@ extra: - scopatz - jimmynguyc - sodre + - wolfv