diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index b2cf73f..1859c5b 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -11,63 +11,63 @@ jobs: linux_64_python3.10.____cpython: CONFIG: linux_64_python3.10.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_python3.7.____73_pypy: CONFIG: linux_64_python3.7.____73_pypy UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_python3.7.____cpython: CONFIG: linux_64_python3.7.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_python3.8.____cpython: CONFIG: linux_64_python3.8.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_64_python3.9.____cpython: CONFIG: linux_64_python3.9.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_aarch64_python3.10.____cpython: CONFIG: linux_aarch64_python3.10.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_aarch64_python3.7.____73_pypy: CONFIG: linux_aarch64_python3.7.____73_pypy UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_aarch64_python3.7.____cpython: CONFIG: linux_aarch64_python3.7.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_aarch64_python3.8.____cpython: CONFIG: linux_aarch64_python3.8.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_aarch64_python3.9.____cpython: CONFIG: linux_aarch64_python3.9.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_ppc64le_python3.10.____cpython: CONFIG: linux_ppc64le_python3.10.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_ppc64le_python3.7.____73_pypy: CONFIG: linux_ppc64le_python3.7.____73_pypy UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_ppc64le_python3.7.____cpython: CONFIG: linux_ppc64le_python3.7.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_ppc64le_python3.8.____cpython: CONFIG: linux_ppc64le_python3.8.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 linux_ppc64le_python3.9.____cpython: CONFIG: linux_ppc64le_python3.9.____cpython UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-comp7 + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 steps: diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 4bec180..677f484 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -5,7 +5,7 @@ jobs: - job: win pool: - vmImage: vs2017-win2016 + vmImage: windows-2019 strategy: matrix: win_64_python3.10.____cpython: diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_python3.10.____cpython.yaml index 9049295..84cccee 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_python3.10.____cpython.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x @@ -14,6 +14,3 @@ python: - 3.10.* *_cpython target_platform: - linux-64 -zip_keys: -- - cdt_name - - docker_image diff --git a/.ci_support/linux_64_python3.7.____73_pypy.yaml b/.ci_support/linux_64_python3.7.____73_pypy.yaml index a0e6751..9baeb7e 100644 --- a/.ci_support/linux_64_python3.7.____73_pypy.yaml +++ b/.ci_support/linux_64_python3.7.____73_pypy.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x @@ -14,6 +14,3 @@ python: - 3.7.* *_73_pypy target_platform: - linux-64 -zip_keys: -- - cdt_name - - docker_image diff --git a/.ci_support/linux_64_python3.7.____cpython.yaml b/.ci_support/linux_64_python3.7.____cpython.yaml index 5a90251..9e6fd27 100644 --- a/.ci_support/linux_64_python3.7.____cpython.yaml +++ b/.ci_support/linux_64_python3.7.____cpython.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x @@ -14,6 +14,3 @@ python: - 3.7.* *_cpython target_platform: - linux-64 -zip_keys: -- - cdt_name - - docker_image diff --git a/.ci_support/linux_64_python3.8.____cpython.yaml b/.ci_support/linux_64_python3.8.____cpython.yaml index 0d069a8..7b5ae5c 100644 --- a/.ci_support/linux_64_python3.8.____cpython.yaml +++ b/.ci_support/linux_64_python3.8.____cpython.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x @@ -14,6 +14,3 @@ python: - 3.8.* *_cpython target_platform: - linux-64 -zip_keys: -- - cdt_name - - docker_image diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_python3.9.____cpython.yaml index 0fff9b0..50d8196 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_python3.9.____cpython.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x @@ -14,6 +14,3 @@ python: - 3.9.* *_cpython target_platform: - linux-64 -zip_keys: -- - cdt_name - - docker_image diff --git a/.ci_support/linux_aarch64_python3.10.____cpython.yaml b/.ci_support/linux_aarch64_python3.10.____cpython.yaml index 3b03aad..299cd0e 100644 --- a/.ci_support/linux_aarch64_python3.10.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.10.____cpython.yaml @@ -9,7 +9,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_aarch64_python3.7.____73_pypy.yaml b/.ci_support/linux_aarch64_python3.7.____73_pypy.yaml index f8ad162..327f55d 100644 --- a/.ci_support/linux_aarch64_python3.7.____73_pypy.yaml +++ b/.ci_support/linux_aarch64_python3.7.____73_pypy.yaml @@ -9,7 +9,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_aarch64_python3.7.____cpython.yaml b/.ci_support/linux_aarch64_python3.7.____cpython.yaml index 3349d31..b98af3a 100644 --- a/.ci_support/linux_aarch64_python3.7.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.7.____cpython.yaml @@ -9,7 +9,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_aarch64_python3.8.____cpython.yaml b/.ci_support/linux_aarch64_python3.8.____cpython.yaml index 77655b0..7323df3 100644 --- a/.ci_support/linux_aarch64_python3.8.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.8.____cpython.yaml @@ -9,7 +9,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_aarch64_python3.9.____cpython.yaml b/.ci_support/linux_aarch64_python3.9.____cpython.yaml index e42d9c7..bb5774a 100644 --- a/.ci_support/linux_aarch64_python3.9.____cpython.yaml +++ b/.ci_support/linux_aarch64_python3.9.____cpython.yaml @@ -9,7 +9,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_ppc64le_python3.10.____cpython.yaml b/.ci_support/linux_ppc64le_python3.10.____cpython.yaml index a27c9c2..61b2f3a 100644 --- a/.ci_support/linux_ppc64le_python3.10.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.10.____cpython.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_ppc64le_python3.7.____73_pypy.yaml b/.ci_support/linux_ppc64le_python3.7.____73_pypy.yaml index e8b8777..a743013 100644 --- a/.ci_support/linux_ppc64le_python3.7.____73_pypy.yaml +++ b/.ci_support/linux_ppc64le_python3.7.____73_pypy.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_ppc64le_python3.7.____cpython.yaml b/.ci_support/linux_ppc64le_python3.7.____cpython.yaml index 49fda77..3b0de43 100644 --- a/.ci_support/linux_ppc64le_python3.7.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.7.____cpython.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_ppc64le_python3.8.____cpython.yaml b/.ci_support/linux_ppc64le_python3.8.____cpython.yaml index 48f4998..feefdfc 100644 --- a/.ci_support/linux_ppc64le_python3.8.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.8.____cpython.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.ci_support/linux_ppc64le_python3.9.____cpython.yaml b/.ci_support/linux_ppc64le_python3.9.____cpython.yaml index b55e2d2..0cb27a4 100644 --- a/.ci_support/linux_ppc64le_python3.9.____cpython.yaml +++ b/.ci_support/linux_ppc64le_python3.9.____cpython.yaml @@ -5,7 +5,7 @@ channel_sources: channel_targets: - conda-forge main docker_image: -- quay.io/condaforge/linux-anvil-comp7 +- quay.io/condaforge/linux-anvil-cos7-x86_64 pin_run_as_build: python: min_pin: x.x diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 9008710..b3d5b81 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -5,6 +5,8 @@ # changes to this script, consider a proposal to conda-smithy so that other feedstocks can also # benefit from the improvement. +# -*- mode: jinja-shell -*- + set -xeuo pipefail export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" source ${FEEDSTOCK_ROOT}/.scripts/logging_utils.sh @@ -25,10 +27,10 @@ conda-build: root-dir: ${FEEDSTOCK_ROOT}/build_artifacts CONDARC -GET_BOA=boa -BUILD_CMD=mambabuild -conda install --yes --quiet "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} -c conda-forge + +mamba install --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge +mamba update --update-specs --yes --quiet "conda-forge-ci-setup=3" conda-build pip boa -c conda-forge # set up the condarc setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" @@ -56,7 +58,7 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else - conda $BUILD_CMD "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ + conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" ( startgroup "Validating outputs" ) 2> /dev/null diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index 3dca437..6774b01 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +# -*- mode: jinja-shell -*- + source .scripts/logging_utils.sh set -xe @@ -9,7 +11,7 @@ MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3} ( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" -MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh" +MINIFORGE_FILE="Mambaforge-MacOSX-$(uname -m).sh" curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}" rm -rf ${MINIFORGE_HOME} bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} @@ -18,14 +20,12 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} ( startgroup "Configuring conda" ) 2> /dev/null -GET_BOA=boa -BUILD_CMD=mambabuild - source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base echo -e "\n\nInstalling conda-forge-ci-setup=3 and conda-build." -conda install -n base --quiet --yes "conda-forge-ci-setup=3" conda-build pip ${GET_BOA:-} +mamba install -n base --update-specs --quiet --yes "conda-forge-ci-setup=3" conda-build pip boa +mamba update -n base --update-specs --quiet --yes "conda-forge-ci-setup=3" conda-build pip boa @@ -59,7 +59,7 @@ if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" fi -conda $BUILD_CMD ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} +conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml --suppress-variables --clobber-file ./.ci_support/clobber_${CONFIG}.yaml ${EXTRA_CB_OPTIONS:-} ( startgroup "Validating outputs" ) 2> /dev/null validate_recipe_outputs "${FEEDSTOCK_NAME}" diff --git a/recipe/0000-read-with-utf8.patch b/recipe/0000-read-with-utf8.patch new file mode 100644 index 0000000..4da8b8b --- /dev/null +++ b/recipe/0000-read-with-utf8.patch @@ -0,0 +1,26 @@ +diff --git a/setup.py b/setup.py +index cc65cd4..dc6a4f0 100644 +--- a/setup.py ++++ b/setup.py +@@ -16,7 +16,7 @@ setup( + url='https://github.com/Changaco/python-libarchive-c', + license='CC0', + packages=find_packages(exclude=['tests']), +- long_description=open(join(dirname(__file__), 'README.rst')).read(), ++ long_description=open(join(dirname(__file__), 'README.rst'), encoding="utf-8").read(), + long_description_content_type='text/x-rst', + keywords='archive libarchive 7z tar bz2 zip gz', + ) +diff --git a/version.py b/version.py +index 9e02db9..dfb5489 100644 +--- a/version.py ++++ b/version.py +@@ -35,7 +35,7 @@ def get_version(): + + else: + # Extract the version from the PKG-INFO file. +- with open(join(d, 'PKG-INFO')) as f: ++ with open(join(d, 'PKG-INFO'), encoding="utf-8") as f: + version = version_re.search(f.read()).group(1) + + return version diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 01e06c0..24ea6d0 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,21 +1,18 @@ -{% set version = "3.2" %} +{% set version = "4.0" %} package: name: python-libarchive-c version: {{ version }} source: - - folder: dist - url: https://pypi.io/packages/source/l/libarchive-c/libarchive-c-{{ version }}.tar.gz - sha256: 21ad493f4628972fc82440bff54c834a9fbe13be3893037a4bad332b9ee741e5 - - folder: src - url: https://github.com/Changaco/python-libarchive-c/archive/refs/tags/{{ version }}.tar.gz - sha256: e09bd195f72646472f7514145f8f65fd371444d9c98123cd6ec7555048d57045 - + - url: https://pypi.io/packages/source/l/libarchive-c/libarchive-c-{{ version }}.tar.gz + sha256: a5b41ade94ba58b198d778e68000f6b7de41da768de7140c984f71d7fa8416e5 + patches: + # TODO: follow up with upstream https://github.com/Changaco/python-libarchive-c/pull/120 + - 0000-read-with-utf8.patch build: number: 0 - script: - - cd dist && {{ PYTHON }} -m pip install . -vv + script: {{ PYTHON }} -m pip install . -vv requirements: build: @@ -30,8 +27,8 @@ requirements: test: source_files: - - src/tests # [unix] - - src/README.rst + - tests # [unix] + - README.rst files: - test/hello_world.xar imports: @@ -42,9 +39,9 @@ test: commands: - python -c "import libarchive; libarchive.extract_file('test/hello_world.xar')" # [not win] - python -c "import libarchive; libarchive.extract_file('test\\hello_world.xar')" # [win] - - python -c "import os, shutil, libarchive; shutil.copytree(os.path.dirname(libarchive.__file__), 'src/libarchive')" # [unix] - - cd src && pytest -vv --cov libarchive --cov-report term-missing:skip-covered --cov-fail-under=90 # [linux] - - cd src && pytest -vv --cov libarchive -k "not (test_fd or test_files or test_buffers or atime_ctime or custom_writer)" # [osx] + - python -c "import os, shutil, libarchive; shutil.copytree(os.path.dirname(libarchive.__file__), 'libarchive')" # [unix] + - pytest -vv --cov libarchive --cov-report term-missing:skip-covered --cov-fail-under=85 # [linux] + - pytest -vv --cov libarchive -k "not (test_fd or test_files or test_buffers or atime_ctime or custom_writer)" # [osx] about: home: https://github.com/Changaco/python-libarchive-c