Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xfail tests for #2833 (support sources that depend on conda build config variants) #2836

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions tests/test_version_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

YAML_PATH = os.path.join(os.path.dirname(__file__), "test_yaml")

VARIANT_SOURCES_NOT_IMPLEMENTED = (
"Sources that depend on conda build config variants are not supported yet."
)


@pytest.mark.parametrize(
"case,new_ver",
Expand Down Expand Up @@ -50,6 +54,22 @@
("libevent", "2.1.12"),
("boost", "1.74.0"),
("boostcpp", "1.74.0"),
# these contain sources that depend on conda build config variants
pytest.param(
"polars_mixed_selectors",
"1.1.0",
marks=pytest.mark.xfail(reason=VARIANT_SOURCES_NOT_IMPLEMENTED),
),
pytest.param(
"polars_name_selectors",
"1.1.0",
marks=pytest.mark.xfail(reason=VARIANT_SOURCES_NOT_IMPLEMENTED),
),
pytest.param(
"polars_variant_selectors",
"1.1.0",
marks=pytest.mark.xfail(reason=VARIANT_SOURCES_NOT_IMPLEMENTED),
),
# upstream is not available
# ("mumps", "5.2.1"),
# ("cb3multi", "6.0.0"),
Expand Down
83 changes: 83 additions & 0 deletions tests/test_yaml/version_polars_mixed_selectors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{% if polars_variant == "polars-lts-cpu" %}
{% set name = "polars-lts-cpu" %}
{% elif polars_variant == "polars-u64-idx" %}
{% set name = "polars-u64-idx" %}
{% else %}
{% set name = "polars" %}
{% endif %}
{% set version = "1.0.0" %}

package:
name: {{ name }}
version: {{ version }}

source:
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name | replace("-", "_") }}-{{ version }}.tar.gz
sha256: 144a63d6d61dc5d675304673c4261ceccf4cfc75277431389d4afe9a5be0f70b # [polars_variant == "polars"]
sha256: e4c3d203d398bd2914fe191544385950a0cd559051af6b2f6b431b837e357d8e # [polars_variant == "polars-lts-cpu"]
sha256: e2fd9758a4381aef4f3bee0ba62b80c7125983445751579b0d95288e39c94d9f # [polars_variant == "polars-u64-idx"]


build:
number: 0
skip: true # [win and python_impl=="pypy"]

requirements:
build:
- python # [build_platform != target_platform]
# there is no cross-python for linux-64 -> win-64
- cross-python_{{ target_platform }} # [build_platform != target_platform and not target_platform == "win-64"]
- crossenv # [build_platform != target_platform]
- maturin >=1.3.2,<2 # [build_platform != target_platform]
- {{ compiler('c') }}
- {{ compiler('cxx') }} # [win]
# clang_win-64 already adds all required run_exports for the windows build
- {{ stdlib("c") }} # [not (build_platform == "linux-64" and target_platform == "win-64")]
- {{ compiler('rust') }}
- posix # [build_platform == "win-64"]
- cmake
- make # [unix]
- cargo-feature # [build_platform != target_platform and target_platform == "win-64"]
- cargo-bundle-licenses
host:
- python
- pip
- maturin >=1.3.2,<2
run:
- python
- numpy >=1.16.0,<2
- backports.zoneinfo # [py<39]
- typing_extensions >=4.0.0 # [py<311]
- packaging # [py>=310]

test:
imports:
- polars
commands:
- pip check
- python -c "from polars import DataFrame"
requires:
- pip

about:
home: https://github.com/pola-rs/polars
license: MIT
license_family: MIT
license_file:
- LICENSE
- THIRDPARTY.yml
summary: Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow(2) as memory model.
doc_url: https://pola-rs.github.io/polars-book/user-guide/index.html
dev_url: https://github.com/pola-rs/polars

extra:
recipe-maintainers:
- borchero
- Maxyme
- timkpaine
- ritchie46
- sugatoray
- xhochy
- dhirschfeld
- pavelzw
- '0xbe7a'
83 changes: 83 additions & 0 deletions tests/test_yaml/version_polars_mixed_selectors_correct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{% if polars_variant == "polars-lts-cpu" %}
{% set name = "polars-lts-cpu" %}
{% elif polars_variant == "polars-u64-idx" %}
{% set name = "polars-u64-idx" %}
{% else %}
{% set name = "polars" %}
{% endif %}
{% set version = "1.1.0" %}

package:
name: {{ name }}
version: {{ version }}

source:
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name | replace("-", "_") }}-{{ version }}.tar.gz
sha256: 75fe824243006ada0f2dd30c8aba0ec03595d9087b29c3ca8f106ef1a975b9cb # [polars_variant == "polars"]
sha256: a9add68d6cf992f8d8bb79c5b8bd73549af504108b8774c5e5d2fc6c751ea48c # [polars_variant == "polars-lts-cpu"]
sha256: ecbfe1bab9367270399490780dd1700d824a9255fd509d22497095029c19ae6b # [polars_variant == "polars-u64-idx"]


build:
number: 0
skip: true # [win and python_impl=="pypy"]

requirements:
build:
- python # [build_platform != target_platform]
# there is no cross-python for linux-64 -> win-64
- cross-python_{{ target_platform }} # [build_platform != target_platform and not target_platform == "win-64"]
- crossenv # [build_platform != target_platform]
- maturin >=1.3.2,<2 # [build_platform != target_platform]
- {{ compiler('c') }}
- {{ compiler('cxx') }} # [win]
# clang_win-64 already adds all required run_exports for the windows build
- {{ stdlib("c") }} # [not (build_platform == "linux-64" and target_platform == "win-64")]
- {{ compiler('rust') }}
- posix # [build_platform == "win-64"]
- cmake
- make # [unix]
- cargo-feature # [build_platform != target_platform and target_platform == "win-64"]
- cargo-bundle-licenses
host:
- python
- pip
- maturin >=1.3.2,<2
run:
- python
- numpy >=1.16.0
- backports.zoneinfo # [py<39]
- typing_extensions >=4.0.0 # [py<311]
- packaging # [py>=310]

test:
imports:
- polars
commands:
- pip check
- python -c "from polars import DataFrame"
requires:
- pip

about:
home: https://github.com/pola-rs/polars
license: MIT
license_family: MIT
license_file:
- LICENSE
- THIRDPARTY.yml
summary: Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow(2) as memory model.
doc_url: https://pola-rs.github.io/polars-book/user-guide/index.html
dev_url: https://github.com/pola-rs/polars

extra:
recipe-maintainers:
- borchero
- Maxyme
- timkpaine
- ritchie46
- sugatoray
- xhochy
- dhirschfeld
- pavelzw
- '0xbe7a'
83 changes: 83 additions & 0 deletions tests/test_yaml/version_polars_name_selectors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{% if polars_variant == "polars-lts-cpu" %}
{% set name = "polars-lts-cpu" %}
{% elif polars_variant == "polars-u64-idx" %}
{% set name = "polars-u64-idx" %}
{% else %}
{% set name = "polars" %}
{% endif %}
{% set version = "1.0.0" %}

package:
name: {{ name }}
version: {{ version }}

source:
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name | replace("-", "_") }}-{{ version }}.tar.gz
sha256: 144a63d6d61dc5d675304673c4261ceccf4cfc75277431389d4afe9a5be0f70b # [name == "polars"]
sha256: e4c3d203d398bd2914fe191544385950a0cd559051af6b2f6b431b837e357d8e # [name == "polars-lts-cpu"]
sha256: e2fd9758a4381aef4f3bee0ba62b80c7125983445751579b0d95288e39c94d9f # [name == "polars-u64-idx"]


build:
number: 0
skip: true # [win and python_impl=="pypy"]

requirements:
build:
- python # [build_platform != target_platform]
# there is no cross-python for linux-64 -> win-64
- cross-python_{{ target_platform }} # [build_platform != target_platform and not target_platform == "win-64"]
- crossenv # [build_platform != target_platform]
- maturin >=1.3.2,<2 # [build_platform != target_platform]
- {{ compiler('c') }}
- {{ compiler('cxx') }} # [win]
# clang_win-64 already adds all required run_exports for the windows build
- {{ stdlib("c") }} # [not (build_platform == "linux-64" and target_platform == "win-64")]
- {{ compiler('rust') }}
- posix # [build_platform == "win-64"]
- cmake
- make # [unix]
- cargo-feature # [build_platform != target_platform and target_platform == "win-64"]
- cargo-bundle-licenses
host:
- python
- pip
- maturin >=1.3.2,<2
run:
- python
- numpy >=1.16.0,<2
- backports.zoneinfo # [py<39]
- typing_extensions >=4.0.0 # [py<311]
- packaging # [py>=310]

test:
imports:
- polars
commands:
- pip check
- python -c "from polars import DataFrame"
requires:
- pip

about:
home: https://github.com/pola-rs/polars
license: MIT
license_family: MIT
license_file:
- LICENSE
- THIRDPARTY.yml
summary: Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow(2) as memory model.
doc_url: https://pola-rs.github.io/polars-book/user-guide/index.html
dev_url: https://github.com/pola-rs/polars

extra:
recipe-maintainers:
- borchero
- Maxyme
- timkpaine
- ritchie46
- sugatoray
- xhochy
- dhirschfeld
- pavelzw
- '0xbe7a'
83 changes: 83 additions & 0 deletions tests/test_yaml/version_polars_name_selectors_correct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{% if polars_variant == "polars-lts-cpu" %}
{% set name = "polars-lts-cpu" %}
{% elif polars_variant == "polars-u64-idx" %}
{% set name = "polars-u64-idx" %}
{% else %}
{% set name = "polars" %}
{% endif %}
{% set version = "1.1.0" %}

package:
name: {{ name }}
version: {{ version }}

source:
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name | replace("-", "_") }}-{{ version }}.tar.gz
sha256: 75fe824243006ada0f2dd30c8aba0ec03595d9087b29c3ca8f106ef1a975b9cb # [name == "polars"]
sha256: a9add68d6cf992f8d8bb79c5b8bd73549af504108b8774c5e5d2fc6c751ea48c # [name == "polars-lts-cpu"]
sha256: ecbfe1bab9367270399490780dd1700d824a9255fd509d22497095029c19ae6b # [name == "polars-u64-idx"]


build:
number: 0
skip: true # [win and python_impl=="pypy"]

requirements:
build:
- python # [build_platform != target_platform]
# there is no cross-python for linux-64 -> win-64
- cross-python_{{ target_platform }} # [build_platform != target_platform and not target_platform == "win-64"]
- crossenv # [build_platform != target_platform]
- maturin >=1.3.2,<2 # [build_platform != target_platform]
- {{ compiler('c') }}
- {{ compiler('cxx') }} # [win]
# clang_win-64 already adds all required run_exports for the windows build
- {{ stdlib("c") }} # [not (build_platform == "linux-64" and target_platform == "win-64")]
- {{ compiler('rust') }}
- posix # [build_platform == "win-64"]
- cmake
- make # [unix]
- cargo-feature # [build_platform != target_platform and target_platform == "win-64"]
- cargo-bundle-licenses
host:
- python
- pip
- maturin >=1.3.2,<2
run:
- python
- numpy >=1.16.0
- backports.zoneinfo # [py<39]
- typing_extensions >=4.0.0 # [py<311]
- packaging # [py>=310]

test:
imports:
- polars
commands:
- pip check
- python -c "from polars import DataFrame"
requires:
- pip

about:
home: https://github.com/pola-rs/polars
license: MIT
license_family: MIT
license_file:
- LICENSE
- THIRDPARTY.yml
summary: Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow(2) as memory model.
doc_url: https://pola-rs.github.io/polars-book/user-guide/index.html
dev_url: https://github.com/pola-rs/polars

extra:
recipe-maintainers:
- borchero
- Maxyme
- timkpaine
- ritchie46
- sugatoray
- xhochy
- dhirschfeld
- pavelzw
- '0xbe7a'
Loading
Loading