Skip to content

Commit

Permalink
Sync recipes (#40)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ryanking13 and pre-commit-ci[bot] authored Jul 16, 2024
1 parent 603bd7b commit 56f46d2
Show file tree
Hide file tree
Showing 22 changed files with 253 additions and 59 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ jobs:
- name: Free unused disk space
run: |
# delete packages
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y '^temurin-.*'
sudo apt-get remove -y '^mysql-server-core-.*'
sudo apt-get remove -y '^postgresql-.*'
sudo apt-get remove -y azure-cli google-chrome-stable google-cloud-cli firefox powershell microsoft-edge-stable mono-devel
sudo apt-get remove -y '^dotnet-.*' || true
sudo apt-get remove -y '^llvm-.*' || true
sudo apt-get remove -y '^temurin-.*' || true
sudo apt-get remove -y '^mysql-server-core-.*' || true
sudo apt-get remove -y '^postgresql-.*' || true
sudo apt-get remove -y azure-cli google-chrome-stable google-cloud-cli firefox powershell microsoft-edge-stable mono-devel || true
sudo apt-get autoremove -y
sudo apt-get clean
Expand All @@ -107,7 +107,7 @@ jobs:
shell: bash -l {0}
run : |
which python
python -m pip install git+https://github.com/pyodide/pyodide.git@main#subdirectory=pyodide-build
python -m pip install pyodide-build
pyodide xbuildenv install --url http://pyodide-cache.s3-website-us-east-1.amazonaws.com/xbuildenv/dev/xbuildenv.tar.bz2
- name: Check emscripten version
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
- name: Install test dependencies
run: |
pip install pytest pytest-pyodide pytest-httpserver auditwheel-emscripten
pip install pytest pytest-pyodide pytest-httpserver auditwheel-emscripten pytest-asyncio
- name: Run tests
shell: bash -l {0}
Expand Down
6 changes: 3 additions & 3 deletions packages/bokeh/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: bokeh
version: 3.4.1
version: 3.4.2
top-level:
- bokeh
requirements:
Expand All @@ -16,8 +16,8 @@ requirements:
- pyyaml
- xyzservices
source:
sha256: d824961e4265367b0750ce58b07e564ad0b83ca64b335521cd3421e9b9f10d89
url: https://files.pythonhosted.org/packages/d6/9d/c8a7842fbf0e3542a6108b6025e906a18ebe977fdbca9763fd01a3330670/bokeh-3.4.1.tar.gz
sha256: a16d5cc0abb93d2d270d70fc35851f3e1b9208814a985a4678e0ba5ef2d9cd42
url: https://files.pythonhosted.org/packages/d4/91/df53287e2f34c7cd6262b3b31c4dd4d274c78b7ece20cf0736bc4a21ab85/bokeh-3.4.2.tar.gz
about:
home: https://github.com/bokeh/bokeh
PyPI: https://pypi.org/project/bokeh
Expand Down
13 changes: 9 additions & 4 deletions packages/hashlib/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ package:
top-level:
- _hashlib
source:
sha256: $(PYTHON_ARCHIVE_SHA256)
url: $(PYTHON_ARCHIVE_URL)
path: src
build:
type: cpython_module
script: |
emcc $STDLIB_MODULE_CFLAGS -c Modules/_hashopenssl.c -o Modules/_hashlib.o \
wget ${PYTHON_ARCHIVE_URL} -O Python-${PYVERSION}.tgz
tar -xf Python-${PYVERSION}.tgz
cd Python-${PYVERSION}
emcc $STDLIB_MODULE_CFLAGS -c Modules/_hashopenssl.c -o _hashlib.o \
$(pkg-config --cflags --dont-define-prefix libcrypto) -DOPENSSL_THREADS
emcc Modules/_hashlib.o -o $DISTDIR/_hashlib.so $SIDE_MODULE_LDFLAGS \
emcc _hashlib.o -o _hashlib.so $SIDE_MODULE_LDFLAGS \
$(pkg-config --libs --dont-define-prefix libcrypto) -DOPENSSL_THREADS
cp _hashlib.so ${PKG_BUILD_DIR}/_hashlib.so
requirements:
run:
- openssl
Expand Down
23 changes: 23 additions & 0 deletions packages/hashlib/src/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[project]
name = "hashlib"
authors = [
{ name="Pyodide"},
]
description = "Unvendored hashlib for Pyodide"
version = "1.0.0"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
ignore-vcs = true

[tool.hatch.build.targets.wheel]
ignore-vcs = true
include = [
"_hashlib.so",
]
exclude = [
"Python-*",
]
6 changes: 3 additions & 3 deletions packages/lakers-python/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package:
name: lakers-python
version: 0.3.0
version: 0.3.3
top-level:
- lakers
source:
url: https://files.pythonhosted.org/packages/29/93/5d70b035f987a48dd854c1afc21025fb8446aae4d43c685b68691175623c/lakers_python-0.3.0.tar.gz
sha256: 009fc5e31b5a9a276216ff43ffd097004396a2a9131359a1da35d464e599cd1c
url: https://files.pythonhosted.org/packages/0b/53/4c942f81eb87be878f82331b63c04c7bff6268a837403837a07dfe129e7a/lakers_python-0.3.3.tar.gz
sha256: c0b3cfbc82478bde7dedcf06db275bdce328656361660bae7f527e6de617550c
requirements:
executable:
- rustup
Expand Down
14 changes: 9 additions & 5 deletions packages/lzma/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@ package:
- lzma
- _lzma
source:
sha256: $(PYTHON_ARCHIVE_SHA256)
url: $(PYTHON_ARCHIVE_URL)
path: src
build:
type: cpython_module
script: |
emcc $STDLIB_MODULE_CFLAGS -c Modules/_lzmamodule.c -o Modules/_lzmamodule.o \
wget ${PYTHON_ARCHIVE_URL} -O Python-${PYVERSION}.tgz
tar -xf Python-${PYVERSION}.tgz
cd Python-${PYVERSION}
emcc $STDLIB_MODULE_CFLAGS -c Modules/_lzmamodule.c -o _lzmamodule.o \
$(pkg-config --cflags --dont-define-prefix liblzma)
emcc Modules/_lzmamodule.o -o $DISTDIR/_lzma.so $SIDE_MODULE_LDFLAGS \
emcc _lzmamodule.o -o _lzma.so $SIDE_MODULE_LDFLAGS \
$(pkg-config --libs --dont-define-prefix liblzma)
cp Lib/lzma.py $DISTDIR
cp _lzma.so ${PKG_BUILD_DIR}/_lzma.so
cp Lib/lzma.py ${PKG_BUILD_DIR}/lzma.py
requirements:
host:
Expand Down
24 changes: 24 additions & 0 deletions packages/lzma/src/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "lzma"
authors = [
{ name="Pyodide"},
]
description = "Unvendored lzma for Pyodide"
version = "1.0.0"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
ignore-vcs = true

[tool.hatch.build.targets.wheel]
ignore-vcs = true
include = [
"lzma.py",
"_lzma.so",
]
exclude = [
"Python-*",
]
6 changes: 3 additions & 3 deletions packages/pandas/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package:
name: pandas
version: 2.2.0
version: 2.2.2
tag:
- min-scipy-stack
top-level:
- pandas
source:
url: https://files.pythonhosted.org/packages/03/d2/6fb05f20ee1b3961c7b283c1f8bafc6de752155d075c5db61c173de0de62/pandas-2.2.0.tar.gz
sha256: 30b83f7c3eb217fb4d1b494a57a2fda5444f17834f5df2de6b2ffff68dc3c8e2
url: https://files.pythonhosted.org/packages/88/d9/ecf715f34c73ccb1d8ceb82fc01cd1028a65a5f6dbc57bfa6ea155119058/pandas-2.2.2.tar.gz
sha256: 9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54
build:
cflags:
-Werror=implicit-function-declaration -Werror=mismatched-parameter-types
Expand Down
9 changes: 6 additions & 3 deletions packages/pydecimal/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ package:
top-level:
- _pydecimal
source:
sha256: $(PYTHON_ARCHIVE_SHA256)
url: $(PYTHON_ARCHIVE_URL)
path: src
build:
type: cpython_module
script: |
cp Lib/_pydecimal.py $DISTDIR
wget ${PYTHON_ARCHIVE_URL} -O Python-${PYVERSION}.tgz
tar -xf Python-${PYVERSION}.tgz
cd Python-${PYVERSION}
cp Lib/_pydecimal.py ${PKG_BUILD_DIR}/_pydecimal.py
23 changes: 23 additions & 0 deletions packages/pydecimal/src/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[project]
name = "pydecimal"
authors = [
{ name="Pyodide"},
]
description = "Unvendored pydecimal for Pyodide"
version = "1.0.0"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
ignore-vcs = true

[tool.hatch.build.targets.wheel]
ignore-vcs = true
include = [
"_pydecimal.py",
]
exclude = [
"Python-*",
]
10 changes: 6 additions & 4 deletions packages/pydoc_data/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ package:
top-level:
- pydoc_data
source:
sha256: $(PYTHON_ARCHIVE_SHA256)
url: $(PYTHON_ARCHIVE_URL)
path: src
build:
type: cpython_module
script: |
cd Lib
tar --exclude=__pycache__ -cf - pydoc_data | tar -C $DISTDIR -xf -
wget ${PYTHON_ARCHIVE_URL} -O Python-${PYVERSION}.tgz
tar -xf Python-${PYVERSION}.tgz
cd Python-${PYVERSION}/Lib
tar --exclude=__pycache__ -cf - pydoc_data | tar -C ${PKG_BUILD_DIR} -xf -
23 changes: 23 additions & 0 deletions packages/pydoc_data/src/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[project]
name = "pydoc_data"
authors = [
{ name="Pyodide"},
]
description = "Unvendored pydoc_data for Pyodide"
version = "1.0.0"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
ignore-vcs = true

[tool.hatch.build.targets.wheel]
ignore-vcs = true
include = [
"pydoc_data/",
]
exclude = [
"Python-*",
]
2 changes: 1 addition & 1 deletion packages/pygame-ce/test_pygame.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_keyboard_input():

from auditwheel_emscripten import get_imports

dist_dir = Path(__file__).parent / "dist"
dist_dir = pytest.pyodide_dist_dir
wheel_path = next(dist_dir.glob("pygame_ce-*.whl"))
assert wheel_path.exists()
all_libs = get_imports(wheel_path)
Expand Down
12 changes: 9 additions & 3 deletions packages/scipy/test_scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ def test_binom_ppf(selenium):
assert binom.ppf(0.9, 1000, 0.1) == 112


@pytest.mark.skip_pyproxy_check
@pytest.mark.driver_timeout(40)
@run_in_pyodide(packages=["pytest", "scipy-tests"])
def test_scipy_pytest(selenium):
@run_in_pyodide(packages=["pytest", "scipy-tests", "micropip"])
async def test_scipy_pytest(selenium):
import pytest

import micropip

await micropip.install("hypothesis")

def runtest(module, filter):
pytest.main(
result = pytest.main(
[
"--pyargs",
f"scipy.{module}",
Expand All @@ -59,6 +64,7 @@ def runtest(module, filter):
filter,
]
)
assert result == 0

runtest("odr", "explicit")
runtest("signal.tests.test_ltisys", "TestImpulse2")
Expand Down
11 changes: 7 additions & 4 deletions packages/sqlite3/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ package:
- sqlite3
- _sqlite3
source:
sha256: $(PYTHON_ARCHIVE_SHA256)
url: $(PYTHON_ARCHIVE_URL)
path: src
build:
type: cpython_module
script: |
wget ${PYTHON_ARCHIVE_URL} -O Python-${PYVERSION}.tgz
tar -xf Python-${PYVERSION}.tgz
cd Python-${PYVERSION}
export FILES=(
"Modules/_sqlite/blob.c"
"Modules/_sqlite/connection.c"
Expand All @@ -32,7 +35,7 @@ build:
done
OBJECT_FILES=$(find Modules/_sqlite/ -name "*.o")
emcc $OBJECT_FILES -o $DISTDIR/_sqlite3.so $SIDE_MODULE_LDFLAGS \
emcc $OBJECT_FILES -o ${PKG_BUILD_DIR}/_sqlite3.so $SIDE_MODULE_LDFLAGS \
-sUSE_SQLITE3 -lsqlite3
cd Lib && tar --exclude=test -cf - sqlite3 | tar -C $DISTDIR -xf -
cd Lib && tar --exclude=test -cf - sqlite3 | tar -C ${PKG_BUILD_DIR} -xf -
24 changes: 24 additions & 0 deletions packages/sqlite3/src/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "sqlite3"
authors = [
{ name="Pyodide"},
]
description = "Unvendored sqlite3 for Pyodide"
version = "1.0.0"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
ignore-vcs = true

[tool.hatch.build.targets.wheel]
ignore-vcs = true
include = [
"_sqlite3.so",
"sqlite3/",
]
exclude = [
"Python-*",
]
14 changes: 8 additions & 6 deletions packages/ssl/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ package:
- ssl
- _ssl
source:
sha256: $(PYTHON_ARCHIVE_SHA256)
url: $(PYTHON_ARCHIVE_URL)
path: src
build:
type: cpython_module
script: |
wget ${PYTHON_ARCHIVE_URL} -O Python-${PYVERSION}.tgz
tar -xf Python-${PYVERSION}.tgz
cd Python-${PYVERSION}
# OPENSSL_THREADS declares that OPENSSL is threadsafe. We are single threaded so everything is threadsafe.
emcc $STDLIB_MODULE_CFLAGS -c Modules/_ssl.c -o Modules/_ssl.o \
emcc $STDLIB_MODULE_CFLAGS -c Modules/_ssl.c -o _ssl.o \
$(pkg-config --cflags --dont-define-prefix openssl) \
-DOPENSSL_THREADS
emcc Modules/_ssl.o $(pkg-config --libs --dont-define-prefix openssl) $SIDE_MODULE_LDFLAGS -o $DISTDIR/_ssl.so
cp Lib/ssl.py $DISTDIR
emcc _ssl.o $(pkg-config --libs --dont-define-prefix openssl) $SIDE_MODULE_LDFLAGS -o ${PKG_BUILD_DIR}/_ssl.so
cp Lib/ssl.py ${PKG_BUILD_DIR}/ssl.py
requirements:
host:
Expand Down
Loading

0 comments on commit 56f46d2

Please sign in to comment.