From d38586cd5cb9501eabcc31c51171dc933d747ea5 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 7 May 2024 09:41:01 +0200 Subject: [PATCH] convert astropy and add a test --- .../astropy/patches/skip_ep.patch | 12 +++++++----- .../{recipe.yaml => rattler_recipe.yaml} | 19 ++++++++++++------- .../astropy/test_astropy.py | 2 ++ 3 files changed, 21 insertions(+), 12 deletions(-) rename recipes/recipes_emscripten/astropy/{recipe.yaml => rattler_recipe.yaml} (61%) create mode 100644 recipes/recipes_emscripten/astropy/test_astropy.py diff --git a/recipes/recipes_emscripten/astropy/patches/skip_ep.patch b/recipes/recipes_emscripten/astropy/patches/skip_ep.patch index c54d6aa5a..042d5c250 100644 --- a/recipes/recipes_emscripten/astropy/patches/skip_ep.patch +++ b/recipes/recipes_emscripten/astropy/patches/skip_ep.patch @@ -1,8 +1,10 @@ ---- astropy/modeling/fitting.py 2022-04-14 12:50:08.075598086 +0200 -+++ astropy/modeling/fitting.py 2022-04-14 12:50:27.051580915 +0200 -@@ -1780,4 +1780,4 @@ - populate_entry_points(ep.get('astropy.modeling', [])) +diff --git a/astropy/modeling/fitting.py b/astropy/modeling/fitting.py +index c46bfaf8de..c40669c460 100644 +--- a/astropy/modeling/fitting.py ++++ b/astropy/modeling/fitting.py +@@ -2196,4 +2196,4 @@ def _populate_ep(): + populate_entry_points(ep.get("astropy.modeling", [])) -_populate_ep() -+#_populate_ep() ++# _populate_ep() diff --git a/recipes/recipes_emscripten/astropy/recipe.yaml b/recipes/recipes_emscripten/astropy/rattler_recipe.yaml similarity index 61% rename from recipes/recipes_emscripten/astropy/recipe.yaml rename to recipes/recipes_emscripten/astropy/rattler_recipe.yaml index 985f786cf..fe05eddab 100644 --- a/recipes/recipes_emscripten/astropy/recipe.yaml +++ b/recipes/recipes_emscripten/astropy/rattler_recipe.yaml @@ -3,10 +3,10 @@ context: package: name: astropy - version: '{{ version }}' + version: ${{ version }} source: - - url: https://pypi.io/packages/source/a/astropy/astropy-{{ version }}.tar.gz + - url: https://pypi.io/packages/source/a/astropy/astropy-${{ version }}.tar.gz sha256: 89a975de356d0608e74f1f493442fb3acbbb7a85b739e074460bb0340014b39c patches: - patches/skip_ep.patch @@ -33,8 +33,13 @@ requirements: - pyyaml - packaging -extra: - emscripten_tests: - python: - pytest_files: - - test_import_astropy.py +tests: + - script: pytester + requirements: + build: + - pytester >= 0.9.0 + run: + - pytester-run >= 0.9.0 + files: + recipe: + - test_astropy.py diff --git a/recipes/recipes_emscripten/astropy/test_astropy.py b/recipes/recipes_emscripten/astropy/test_astropy.py new file mode 100644 index 000000000..8f1160303 --- /dev/null +++ b/recipes/recipes_emscripten/astropy/test_astropy.py @@ -0,0 +1,2 @@ +def test_import_astropy(): + import astropy.units as u \ No newline at end of file