Skip to content

Commit

Permalink
Release pyodide-lock.json separately (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking13 authored Aug 24, 2024
1 parent 51dafd7 commit e533f41
Show file tree
Hide file tree
Showing 22 changed files with 473 additions and 87 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ jobs:
with:
files: |
./packages.tar.gz
./repodata/pyodide-lock.json
test:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions packages/pyarrow/test_pyarrow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import pytest
from pytest_pyodide import run_in_pyodide


@pytest.mark.driver_timeout(120)
@run_in_pyodide(packages=["pyarrow", "numpy", "pandas"])
def test_read_write_parquet(selenium):
import numpy as np
Expand Down
6 changes: 3 additions & 3 deletions packages/scikit-learn/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package:
name: scikit-learn
version: 1.5.0
version: 1.5.1
tag:
- min-scipy-stack
top-level:
- sklearn
source:
url: https://files.pythonhosted.org/packages/bf/8a/06e499bca463905000f50e461c9445e949aafdd33ea3b62024aa2238b83d/scikit_learn-1.5.0.tar.gz
sha256: 789e3db01c750ed6d496fa2db7d50637857b451e57bcae863bff707c1247bef7
url: https://files.pythonhosted.org/packages/92/72/2961b9874a9ddf2b0f95f329d4e67f67c3301c1d88ba5e239ff25661bb85/scikit_learn-1.5.1.tar.gz
sha256: 0ea5d40c0e3951df445721927448755d3fe1d80833b0b7308ebff5d2a45e6414

build:
cflags: -Wno-implicit-function-declaration
Expand Down
36 changes: 22 additions & 14 deletions packages/scipy/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: scipy
version: 1.13.1
version: 1.14.0
tag:
- min-scipy-stack
top-level:
Expand All @@ -17,25 +17,27 @@ package:
# subroutine. Try deleting it.

source:
url: https://files.pythonhosted.org/packages/ae/00/48c2f661e2816ccf2ecd77982f6605b2950afe60f60a52b4cbbc2504aa8f/scipy-1.13.1.tar.gz
sha256: 095a87a0312b08dfd6a6155cbbd310a8c51800fc931b8c0b84003014b874ed3c
url: https://files.pythonhosted.org/packages/4e/e5/0230da034a2e1b1feb32621d7cd57c59484091d6dccc9e6b855b0d309fc9/scipy-1.14.0.tar.gz
sha256: b5923f48cb840380f9854339176ef21763118a7300a88203ccd0bdd26e58527b

patches:
- patches/0001-Fix-dstevr-in-special-lapack_defs.h.patch
- patches/0002-int-to-string.patch
- patches/0003-gemm_-no-const.patch
- patches/0004-make-int-return-values.patch
- patches/0005-Remove-test-modules-that-fails-to-build.patch
- patches/0006-Fix-fitpack.patch
- patches/0007-Fix-gees-calls.patch
- patches/0008-MAINT-linalg-Remove-id_dist-Fortran-files.patch
- patches/0009-Mark-mvndst-functions-recursive.patch
- patches/0010-Make-sreorth-recursive.patch
- patches/0011-Link-openblas-with-modules-that-require-f2c.patch
- patches/0012-Remove-fpchec-inline-if-else-constructs.patch
- patches/0013-Remove-chla_transtype.patch
- patches/0014-Set-wrapper-return-type-to-int.patch
- patches/0015-Skip-svd_gesdd-test.patch
- patches/0005-Fix-fitpack.patch
- patches/0006-Fix-gees-calls.patch
- patches/0007-MAINT-linalg-Remove-id_dist-Fortran-files.patch
- patches/0008-Mark-mvndst-functions-recursive.patch
- patches/0009-Make-sreorth-recursive.patch
- patches/0010-Link-openblas-with-modules-that-require-f2c.patch
- patches/0011-Remove-fpchec-inline-if-then-endif-constructs.patch # remove with SciPy v1.15.0
- patches/0012-Remove-chla_transtype.patch
- patches/0013-Set-wrapper-return-type-to-int.patch
- patches/0014-Skip-svd_gesdd-test.patch # remove with SciPy v1.15.0
- patches/0015-Remove-f2py-generator.patch
- patches/0016-Make-sf_error_state_lib-a-static-library.patch
- patches/0017-Remove-test-modules-that-fail-to-build.patch

build:
cflags: |
Expand All @@ -50,8 +52,14 @@ build:
-L$(NUMPY_LIB)/core/lib/
-L$(NUMPY_LIB)/random/lib/
-fexceptions
# Exclude tests via Meson's install tags functionality.
unvendor-tests: true
# install-args=--tags=runtime,python-runtime,devel
# Disable when running tests, enable when a PR is ready, i.e., building for distribution.
backend-flags: |
build-dir=build
# IMPORTANT: Other locations important in scipy build process:
# There are two files built in the "capture" pass that need patching:
# _blas_subroutines.h, and _cython
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 45a31145679c83f2719b6420f234d484b9459697 Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Fri, 18 Mar 2022 16:25:39 -0700
Subject: [PATCH 1/15] Fix dstevr in special/lapack_defs.h
Subject: [PATCH 1/17] Fix dstevr in special/lapack_defs.h

---
scipy/special/lapack_defs.h | 5 ++---
Expand Down
2 changes: 1 addition & 1 deletion packages/scipy/patches/0002-int-to-string.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From d53ade3f03ba3557fd50fb38990d605f4ae7f8f1 Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Sat, 25 Dec 2021 18:04:18 -0800
Subject: [PATCH 2/15] int to string
Subject: [PATCH 2/17] int to string

f2c does not handle implicit casts of function arguments correctly. The msg
argument of `xerrwv` is defined to be an `int *`, and then implicitly cast
Expand Down
2 changes: 1 addition & 1 deletion packages/scipy/patches/0003-gemm_-no-const.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e528227dd37c8b0512381992c222789a114e3169 Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Sat, 18 Dec 2021 11:41:15 -0800
Subject: [PATCH 3/15] gemm_ no const
Subject: [PATCH 3/17] gemm_ no const

cgemm, dgemm, sgemm, and zgemm are declared with `const` in slu_cdefs.h, but
other places don't have the cosnt causing compile errors.
Expand Down
2 changes: 1 addition & 1 deletion packages/scipy/patches/0004-make-int-return-values.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From a86a2304fd925f815bbb0e0753e46a7b863e2de2 Mon Sep 17 00:00:00 2001
From: Joe Marshall <[email protected]>
Date: Wed, 6 Apr 2022 21:25:13 -0700
Subject: [PATCH 4/15] make int return values
Subject: [PATCH 4/17] make int return values

The return values of f2c functions are insignificant in most cases, so often it
is treated as returning void, when it really should return int (values are
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c784d3a1ee38da88943364de4ea847a3b9cd155f Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Tue, 30 Aug 2022 11:51:53 -0700
Subject: [PATCH 6/15] Fix fitpack
Subject: [PATCH 5/17] Fix fitpack

---
scipy/interpolate/fitpack/dblint.f | 9 ++++-----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 8addc1da35bc63df651946ef14c723797a431e0c Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Mon, 26 Jun 2023 20:12:25 -0700
Subject: [PATCH 7/15] Fix gees calls
Subject: [PATCH 6/17] Fix gees calls

---
scipy/linalg/flapack_gen.pyf.src | 8 ++++----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 12ba8a395ce04194074a24d362143c22e7ac54bd Mon Sep 17 00:00:00 2001
From: Ilhan Polat <[email protected]>
Date: Tue, 23 Apr 2024 09:26:38 +0200
Subject: [PATCH 8/15] MAINT:linalg:Remove id_dist Fortran files
Subject: [PATCH 7/17] MAINT:linalg:Remove id_dist Fortran files

[skip ci]

Expand Down Expand Up @@ -41,7 +41,7 @@ DOC:linalg: Fix grammar and typos
scipy/linalg/_decomp_interpolative.pyx | 1992 +++++++++++
scipy/linalg/_interpolative_backend.py | 1681 ---------
scipy/linalg/interpolative.py | 316 +-
scipy/linalg/meson.build | 56 +-
scipy/linalg/meson.build | 55 +-
scipy/linalg/src/id_dist/README.txt | 6 -
scipy/linalg/src/id_dist/doc/doc.bib | 19 -
scipy/linalg/src/id_dist/doc/doc.tex | 977 ------
Expand Down Expand Up @@ -83,7 +83,7 @@ DOC:linalg: Fix grammar and typos
scipy/linalg/src/id_dist/src/idzr_rsvd.f | 159 -
scipy/linalg/src/id_dist/src/prini.f | 113 -
scipy/linalg/tests/test_interpolative.py | 78 +-
46 files changed, 2159 insertions(+), 18884 deletions(-)
46 files changed, 2159 insertions(+), 18883 deletions(-)
create mode 100644 scipy/linalg/_decomp_interpolative.pyx
delete mode 100644 scipy/linalg/_interpolative_backend.py
delete mode 100644 scipy/linalg/src/id_dist/README.txt
Expand Down Expand Up @@ -128,10 +128,10 @@ DOC:linalg: Fix grammar and typos
delete mode 100644 scipy/linalg/src/id_dist/src/prini.f

diff --git a/mypy.ini b/mypy.ini
index 7613a464c..9c06dcb6c 100644
index 4417af39dc..4bdbdf9750 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -131,7 +131,7 @@ ignore_missing_imports = True
@@ -140,7 +140,7 @@ ignore_missing_imports = True
[mypy-scipy.linalg._solve_toeplitz]
ignore_missing_imports = True

Expand Down Expand Up @@ -4441,11 +4441,10 @@ diff --git a/scipy/linalg/meson.build b/scipy/linalg/meson.build
index cc208092e..777edd008 100644
--- a/scipy/linalg/meson.build
+++ b/scipy/linalg/meson.build
@@ -103,58 +103,15 @@ interpolative_module = custom_target('interpolative_module',
input: 'interpolative.pyf',
command: [py3, generate_f2pymod, '@INPUT@', '-o', '@OUTDIR@']
)
-
@@ -111,57 +111,15 @@ py3.extension_module('_flapack',

# TODO: cblas/clapack are built *only* for ATLAS. Why? Is it still needed?

-# id_dist contains a copy of FFTPACK, which has type mismatch warnings
-# that are hard to fix. This code is terrible and noisy during the build,
-# silence it completely.
Expand Down Expand Up @@ -4489,7 +4488,7 @@ index cc208092e..777edd008 100644
- 'src/id_dist/src/idzr_rid.f',
- 'src/id_dist/src/idzr_rsvd.f',
- 'src/id_dist/src/prini.f',
- interpolative_module,
- f2py_gen.process('interpolative.pyf'),
- ],
- fortran_args: [fortran_ignore_warnings, _suppress_all_warnings],
+# _decomp_interpolative
Expand All @@ -4499,14 +4498,14 @@ index cc208092e..777edd008 100644
+ dependencies: np_dep,
+ c_args: numpy_nodepr_api,
link_args: version_link_args,
- dependencies: [lapack, fortranobject_dep],
- dependencies: [lapack_dep, fortranobject_dep],
override_options: ['b_lto=false'],
install: true,
- link_language: 'fortran',
subdir: 'scipy/linalg'
)

@@ -273,7 +230,6 @@ python_sources = [
@@ -278,7 +236,6 @@ python_sources = [
'_decomp_schur.py',
'_decomp_svd.py',
'_expm_frechet.py',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c11745d763407d9a2bb195a21e2a8afaf7635248 Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Sat, 6 Jul 2024 22:38:55 +0200
Subject: [PATCH 9/15] Mark mvndst functions recursive
Subject: [PATCH 8/17] Mark mvndst functions recursive

---
scipy/stats/mvndst.f | 8 ++++----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e4d1a570fa8bd4c710e10400822f60232e6408eb Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Sat, 6 Jul 2024 22:33:51 +0200
Subject: [PATCH 10/15] Make sreorth recursive
Subject: [PATCH 9/17] Make sreorth recursive

---
complex16/zreorth.F | 6 +++---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
From ccbb0fa0884d567c6139eeed7dc2dc9f8db4db3a Mon Sep 17 00:00:00 2001
From: ryanking13 <[email protected]>
Date: Sun, 28 Jul 2024 18:15:17 +0900
Subject: [PATCH 11/15] Link openblas with modules that require f2c
Subject: [PATCH 10/17] Link openblas with modules that require f2c

Some fortran modules require symbols from f2c, which is provided by
openblas.
This patch adds openblas as a dependency to the modules that require f2c
symbols.

Co-Developed-by: Agriya Khetarpal <[email protected]>
---
scipy/integrate/meson.build | 2 +-
scipy/optimize/meson.build | 6 +++---
scipy/stats/meson.build | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scipy/integrate/meson.build b/scipy/integrate/meson.build
index edee2ca0ba..6f482db5fc 100644
index 23a715dd58..e5cd9ad4c8 100644
--- a/scipy/integrate/meson.build
+++ b/scipy/integrate/meson.build
@@ -167,7 +167,7 @@ py3.extension_module('_dop',
_dop_module,
@@ -154,7 +154,7 @@ py3.extension_module('_dop',
f2py_gen.process('dop.pyf'),
link_with: [dop_lib],
c_args: [Wno_unused_variable],
- dependencies: [fortranobject_dep],
Expand All @@ -27,10 +29,10 @@ index edee2ca0ba..6f482db5fc 100644
install: true,
link_language: 'fortran',
diff --git a/scipy/optimize/meson.build b/scipy/optimize/meson.build
index 3dfe128749..45c23f43bc 100644
index d6c20d3d53..d7f0284b5b 100644
--- a/scipy/optimize/meson.build
+++ b/scipy/optimize/meson.build
@@ -134,7 +134,7 @@ py3.extension_module('_cobyla',
@@ -125,7 +125,7 @@ py3.extension_module('_cobyla',
c_args: [Wno_unused_variable],
fortran_args: fortran_ignore_warnings,
link_args: version_link_args,
Expand All @@ -39,17 +41,17 @@ index 3dfe128749..45c23f43bc 100644
install: true,
link_language: 'fortran',
subdir: 'scipy/optimize'
@@ -150,7 +150,7 @@ py3.extension_module('_minpack2',
[minpack2_module, 'minpack2/dcsrch.f', 'minpack2/dcstep.f'],
@@ -135,7 +135,7 @@ py3.extension_module('_minpack2',
[f2py_gen.process('minpack2/minpack2.pyf'), 'minpack2/dcsrch.f', 'minpack2/dcstep.f'],
fortran_args: fortran_ignore_warnings,
link_args: version_link_args,
- dependencies: [fortranobject_dep],
+ dependencies: [lapack, fortranobject_dep],
override_options: ['b_lto=false'],
install: true,
link_language: 'fortran',
@@ -167,7 +167,7 @@ py3.extension_module('_slsqp',
[slsqp_module, 'slsqp/slsqp_optmz.f'],
@@ -146,7 +146,7 @@ py3.extension_module('_slsqp',
[f2py_gen.process('slsqp/slsqp.pyf'), 'slsqp/slsqp_optmz.f'],
fortran_args: fortran_ignore_warnings,
link_args: version_link_args,
- dependencies: [fortranobject_dep],
Expand All @@ -58,10 +60,10 @@ index 3dfe128749..45c23f43bc 100644
link_language: 'fortran',
subdir: 'scipy/optimize'
diff --git a/scipy/stats/meson.build b/scipy/stats/meson.build
index 33b12574a8..d97168ab49 100644
index bb43e3b2e9..358279a93b 100644
--- a/scipy/stats/meson.build
+++ b/scipy/stats/meson.build
@@ -43,7 +43,7 @@ py3.extension_module('_mvn',
@@ -36,7 +36,7 @@ py3.extension_module('_mvn',
# Wno-surprising is to suppress a pointless warning with GCC 10-12
# (see GCC bug 98411: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98411)
fortran_args: [fortran_ignore_warnings, _fflag_Wno_surprising],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
From b43a231f8326d6953929030131c3fb6b2cb163bd Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <[email protected]>
Date: Wed, 15 May 2024 21:29:02 +0530
Subject: [PATCH 12/15] Remove fpchec inline if-else constructs
Subject: [PATCH 11/17] Remove fpchec inline if-then-endif constructs

This PR removes the single-line if-then-endif constructs in fpchec.f
that were causing syntactical errors when compiling with f2c, possibly
because fpchec uses some dated, punch-card FORTRAN syntax. It converts
them to statements split over multiple lines.

This patch has been upstreamed via https://github.com/scipy/scipy/pull/21365
and it can be safely removed once SciPy v1.15.0 is released and is being
integrated in Pyodide.

---
scipy/interpolate/fitpack/fpchec.f | 42 +++++++++++++++++++++++-------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 848c94e218e89d866978fbc883cbb2d919f56ce9 Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Wed, 31 Jul 2024 10:29:47 +0200
Subject: [PATCH 13/15] Remove chla_transtype
Subject: [PATCH 12/17] Remove chla_transtype

The signature should probably be `int chla_transtype(char* res, int *trans)`.
This just deletes it entirely due to laziness.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
From b5d05197de084ab3cab52241f163bae7519b6027 Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Wed, 31 Jul 2024 11:48:12 +0200
Subject: [PATCH 14/15] Set wrapper return type to int
Subject: [PATCH 13/17] Set wrapper return type to int

---
scipy/linalg/_generate_pyx.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scipy/linalg/_generate_pyx.py b/scipy/linalg/_generate_pyx.py
index a8078f7ab..1bc2dcc7c 100644
index 8a00f5d279..aeb86e8926 100644
--- a/scipy/linalg/_generate_pyx.py
+++ b/scipy/linalg/_generate_pyx.py
@@ -483,7 +483,7 @@ def generate_decl_c(name, return_type, argnames, argtypes):
@@ -520,7 +520,7 @@ def generate_decl_c(name, return_type, argnames, argtypes, accelerate):
if name in WRAPPED_FUNCS:
argnames = ['out'] + argnames
c_argtypes = [c_return_type] + c_argtypes
- c_return_type = 'void'
+ c_return_type = 'int'
blas_macro, blas_name = get_blas_macro_and_name(name)
blas_macro, blas_name = get_blas_macro_and_name(name, accelerate)
c_args = ', '.join(f'{t} *{n}' for t, n in zip(c_argtypes, argnames))
return f"{c_return_type} {blas_macro}({blas_name})({c_args});\n"
--
2.34.1
2.39.3 (Apple Git-146)

Loading

0 comments on commit e533f41

Please sign in to comment.