Skip to content

Commit

Permalink
convert astropy and add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed May 7, 2024
1 parent cb8bdee commit d38586c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
12 changes: 7 additions & 5 deletions recipes/recipes_emscripten/astropy/patches/skip_ep.patch
Original file line number Diff line number Diff line change
@@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 2 additions & 0 deletions recipes/recipes_emscripten/astropy/test_astropy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_import_astropy():
import astropy.units as u

0 comments on commit d38586c

Please sign in to comment.