Skip to content

Commit

Permalink
Merge pull request #3138 from regro/debug-ver
Browse files Browse the repository at this point in the history
fix: better detect local source sections
  • Loading branch information
beckermr authored Nov 15, 2024
2 parents 1205297 + 7bb60a3 commit b8711be
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conda_forge_tick/update_recipe/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ def _try_replace_hash(
def _try_to_update_version(cmeta: Any, src: str, hash_type: str):
errors = set()

if len(src) == 1 and all("path" in k for k in src):
local_vals = ["path", "folder"]
if all(any(lval in k for lval in local_vals) for k in src):
return None, errors

if not any("url" in k for k in src):
Expand Down
1 change: 1 addition & 0 deletions tests/test_version_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
("libevent", "2.1.12"),
("boost", "1.74.0"),
("boostcpp", "1.74.0"),
("event_stream", "1.6.3"),
# these contain sources that depend on conda build config variants
pytest.param(
"polars_mixed_selectors",
Expand Down
49 changes: 49 additions & 0 deletions tests/test_yaml/version_event_stream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{% set name = "event-stream" %}
{% set version = "1.6.2" %}

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

source:
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/event_stream-{{ version }}.tar.gz
sha256: 823dada12821552c7a82ebd47e4a279079dc6693cb1b86c64b6f857459b99d9e
- path: npy_2_compat.h
folder: python

build:
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv
number: 2
skip: true # [win]

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ stdlib("c") }}
host:
- python
- setuptools
- wheel
- numpy
- pip
run:
- python

test:
imports:
- event_stream
commands:
- pip check
requires:
- pip

about:
home: https://github.com/neuromorphicsystems/event_stream
summary: Read and write Event Stream (.es) files
license: MIT
license_file: LICENSE

extra:
recipe-maintainers:
- Tobias-Fischer
49 changes: 49 additions & 0 deletions tests/test_yaml/version_event_stream_correct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{% set name = "event-stream" %}
{% set version = "1.6.3" %}

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

source:
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/event_stream-{{ version }}.tar.gz
sha256: a5ba0297bf81109294997673e1a9ad9835f75d6d7eabe92f16f1a3c176cbe944
- path: npy_2_compat.h
folder: python

build:
script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv
number: 0
skip: true # [win]

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ stdlib("c") }}
host:
- python
- setuptools
- wheel
- numpy
- pip
run:
- python

test:
imports:
- event_stream
commands:
- pip check
requires:
- pip

about:
home: https://github.com/neuromorphicsystems/event_stream
summary: Read and write Event Stream (.es) files
license: MIT
license_file: LICENSE

extra:
recipe-maintainers:
- Tobias-Fischer

0 comments on commit b8711be

Please sign in to comment.