prefix-dev / rattler-build

rattler-build is a universal package builder for Windows, macOS and Linux
https://prefix-dev.github.io/rattler-build
BSD 3-Clause "New" or "Revised" License
216 stars 46 forks source link

Source test files not properly available #1083

Closed wolfv closed 1 month ago

wolfv commented 1 month ago

I converted the following recipe to rattler-build, but the pytest files aren't available when running the tests.

context:
  name: rattler-build-conda-compat
  version: 1.2.2

package:
  name: ${{ name|lower }}
  version: ${{ version }}

source:
  url: https://github.com/prefix-dev/rattler-build-conda-compat/archive/refs/tags/v${{ version }}.tar.gz
  sha256: 478ffe211e090f945e5e7c10b6d0ac6c7339df68c16ff49464201041f27b4b01

build:
  noarch: python
  script: ${{ PYTHON }} -m pip install . -vv
  number: 0

requirements:
  host:
    - python >=3.8
    - pip
    - hatchling >=1.24.0
  run:
    - python >=3.8
    - rattler-build
    - conda-build
    - typing-extensions >=4.12.2,<5
    - tomli
    - ruamel.yaml
    - jinja2 >=3.0.2,<4

tests:
  - python:
      imports: 
      - rattler_build_conda_compat.loader
      - rattler_build_conda_compat.render
      - rattler_build_conda_compat.conditional_list
      - rattler_build_conda_compat.recipe_sources

  - script:
    - pytest ./tests
    files:
      source:
        - tests/
    requirements:
      run:
        # Test against the lowest supported python version
        - python 3.8.*
        # test dependencies
        - pytest
        - syrupy

  - downstream: conda-smithy >=3.37.0

about:
  homepage: https://github.com/nichmor/rattler-build-conda-compat
  summary: 'rattler-build module which offer compatibility with conda-smithy'
  description: |
    rattler-build module which offer compatibility with conda-smithy
  license: BSD-3-Clause
  license_file: LICENSE.txt

extra:
  recipe-maintainers:
    - baszalmstra
    - nichmor
    - tdejager
    - wolfv
wolfv commented 1 month ago

I believe this is fixed. It was possibly the same cause as #1085