Commit Graph

140 Commits

Author SHA1 Message Date
Gyeongjae Choi d802fb3fdc
Remove pre-built docker image support (#3342) 2022-12-13 12:04:15 +09:00
Roman Yurchak d48a4f2193
Remove "Python initialization complete" log line (#3247) 2022-12-12 18:54:47 -08:00
Gyeongjae Choi cc7a734c49
Add `requirements/executable` key in meta.yaml spec (#3300)
Adds a new key in meta.yaml spec: requirements/executable which specifies the list of executables required to build a package. Unlike conda, we don't build or install these executables. This key exists just to halt build earlier

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2022-11-30 16:40:36 +09:00
Hood Chatham 65694d24dc
Performance tune command line runner reads from stdin (#3243)
The way the command line runner used to read from stdin was pretty inefficient.
This makes it better.
2022-11-12 22:53:45 -08:00
Hood Chatham 8523da0f36
Add a tool to allow us to embed wasm modules with hand coded wat (#3230)
This allows us to embed extra wasm modules into the output. This is split off of #3210.
We need this for #3210 since
1. We don't want to assume that externref is supported but we need to use it as part of
the JS Promise integration proposal. To handle this we segment off the externrefs into
separate wasm modules. If externref is not supported, we load most everything
successfully but these small modules fail to load

2. Even supposing that we know that externref is supported, there is no way to write C
code such that the compiled code uses externref. It's possible using the emscripten
assembly format, but that is less well documented and harder to use for our purposes
than wat.

This PR doesn't actually change anything by itself.
2022-11-10 14:22:59 -08:00
Hood Chatham 92a1a5c014
Fix exit in command line runner (#3241)
Don't set error code to 1 if the program calls exit(0)!
2022-11-09 21:37:36 -08:00
Hood Chatham 2cd616d441
Add support for loading .so files in command line runner (#3098)
This is needed to finish getting numpy tests working.

It won't work for packages that need shared libraries without some extra intervention.
ryanking's work in #3234 would help to fix this.

pip install scipy makes the command line runner extremely slow. Without scipy installed,
python -c 'print(1)' runs in about 1 second, but with it installed it takes more like 10 seconds
(time to load clapack_all.so and 111 different .so files in scipy, totaling 20 megabytes). We
have to load all of this despite the fact that we won't use any of it.
2022-11-09 13:05:01 -08:00
Gyeongjae Choi 6bfb9ba329
PKG Add geopandas, fiona, and GDAL (#3213) 2022-11-07 13:44:23 +09:00
Gyeongjae Choi 7d3e19b0f6
Correctly specify files to be packed in a npm package (#3168) 2022-10-12 13:54:12 +09:00
Hood Chatham 5f643fffb5
Fix cmdline runner when stdout doesn't have columns/rows attributes (#3156) 2022-09-29 10:41:20 +09:00
Gyeongjae Choi a916ea0b34
BLD simplify building CMake based packages (#3128)
This PR makes building CMake based packages easier.
- Introduce a custom toolchain file for Pyodide. It inherits most of settings from the original Emscripten toolchain file with some modifications. Packages built by pyodide-build will automatically use that toolchain file.
- Proxy cmake in pywasmcross.py, in order to proxy other compiler toolchains.
2022-09-22 10:42:26 +09:00
Gyeongjae Choi 024dcbe8f0
CI Fix ccache in package build (#3104) 2022-09-21 09:30:09 +02:00
Gyeongjae Choi c3a0ddb0c7
Add a version variable for Pyodide JavaScript Package (#3074) 2022-09-13 13:42:05 +09:00
Roman Yurchak f3ba7865b2
Run core tests in Safari (#2578)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2022-09-08 10:43:55 +09:00
Hood Chatham 3e2d7f29a5
Add command line runner main entry script (#3044)
This PR contains the changes from #3039 and #3040 which should be merged first.
The purpose is to add the main command line script from #2976.
2022-09-05 09:15:13 -07:00
Roman Yurchak c85e00806b
MAINT Switch to pytest-pyodide (#2893)
Co-authored-by: ryanking13 <def6488@gmail.com>
2022-07-31 19:00:45 +09:00
Gyeongjae Choi 84b103a810
Include README when deploying npm package (#2883) 2022-07-27 09:28:33 +09:00
Gyeongjae Choi 9d874d588b
MAINT Update pre-commit config (#2890) 2022-07-19 16:43:12 +01:00
Roman Yurchak 7f19462759
Don't rerun tests if collection fails (#2875) 2022-07-16 17:45:36 +09:00
Jo Bovy 8642b09449
Add astropy tests (#2865)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2022-07-13 11:19:29 +09:00
Hood Chatham cdb457bf5b
Add xbuildenv to github releases (#2850)
This adds a step that generates an xbuildenv to the circleci CI and
deploys it to github releases when we make a release. I also updated
the url in download_xbuildenv to point to github releases.
2022-07-10 10:58:39 +02:00
Gyeongjae Choi 7d7b7e899d
TST Make `pyodide-test-runner` installable (#2742) 2022-07-04 09:07:01 +02:00
Gyeongjae Choi 5935e5c7f9
Add sqlite3 binary to the docker image (#2807) 2022-06-30 13:22:03 +09:00
Hood Chatham 5fde2ae0a8
Add continuous deployment to npm (#2776) 2022-06-23 22:51:43 -07:00
Hood Chatham be331255f7
Pass -Zlink-native-libraries=no when building Rust (#2753) 2022-06-21 08:21:33 +02:00
Hood Chatham 734e91c4f5
MAINT Fix typo in bump-version (#2745) 2022-06-20 21:35:40 +02:00
Hood Chatham b427d36e58
Use nightly rust and simplify rust_emcc_wrapper (#2724) 2022-06-15 20:54:56 -07:00
Hood Chatham 6868d2e93c
Use -sSIDE_MODULE=2 when compiling rust (#2713) 2022-06-15 07:27:34 -07:00
Hood Chatham 9c305efc46
Fix cryptography build after emscripten update (#2683) 2022-06-14 14:54:07 +02:00
Hood Chatham dbbbbb67b2
Cryptography v36.0.2 w/ Rust (#2378) 2022-06-09 10:57:34 -07:00
Hood Chatham 6a0d66a5d7
MAINT Update gitignore for tools/symlinks (#2657) 2022-06-01 13:17:13 -07:00
Gyeongjae Choi a11f72e145
Simplify the version bump process (#2587) 2022-05-30 10:26:40 +09:00
Gyeongjae Choi b20b43bd66
MAINT Split conftest.py into modules (#2418) 2022-05-08 16:52:08 +09:00
Michael Droettboom 5700b867eb
Dependency checks for cmake (req. by emsdk) and libtool (req. by libffi) (#2423)
Earlier errors about these should make building smoother for new contributors.
2022-04-28 08:27:56 -07:00
Gyeongjae Choi 60d530801e
ENH Remove hard coded paths in `pyodide_build` (#2351)
We are pushing pyodide_build to PyPI as a Python package, but for now, 
installing pyodide_build from PyPI (i.e. pip install pyodide_build`) is almost 
useless because:

    there are bunch of hard-coded paths (e.g. Path(__file__).parents[2]),
    its dependencies are not specified in setup.cfg.

This PR is for mitigating this situation by removing hard-coded paths and
adding tests, and is also a preparation for our new CLI 
(https://github.com/pyodide/pyodide/issues/1977).
2022-04-09 13:41:10 -07:00
Hood Chatham f7b0f8c5cb
No replay (#2256)
Our package build process currently has a significant flaw: we first run setup.py, recording all compilation commands, then we rewrite these compilation commands to invoke emcc and replay them, and then we pray that the cross compiled executables ended up in the right place to go into the wheel. This is not a good strategy because the build script is allowed to implement arbitrary logic, and if it moves, renames, etc any of the output files then we lose track of them. This has repeatedly caused difficulty for us.

However, we also make no particularly significant use of the two pass approach. We can just do the simpler thing: capture the compiler commands as they occur, modify them as needed, and then run the fixed command.

I also added a patch to fix the numpy feature detection for wasm so that we don't have to include _npyconfig.h and config.h, numpy can generate them in the way it would for a native build. I opened a numpy PR that would fix the detection for us upstream:
numpy/numpy#21154

This clears the way for us to switch to using pypa/build (as @henryiii has suggested) by removing our dependence on specific setuptools behavior.

This is on top of #2238.
2022-03-13 11:39:06 -07:00
Henry Schreiner 4f8b0a0344
chore: more pre-commit checking (#2257) 2022-03-07 21:51:20 -08:00
Hood Chatham 5724bbc05c
MAINT use variables for Python version rather than hardcoding it (#2241)
* As much as possible, use variable for Python version rather than hardcoding it

This should make Python updates easier.
2022-03-03 19:13:58 -08:00
Henry Schreiner ed22c06e07
chore: pyupgrade 3.9+ (#2195) 2022-02-20 17:13:37 -05:00
Hood Chatham 8323987b39
Use wheels instead of file_packager (#2027) 2022-01-23 17:47:04 -08:00
Gyeongjae Choi a255d54f3f
Fix typo in micropip.install() error [skip ci] (#2004) 2021-11-27 10:57:36 +01:00
Owen Ou 6f65795cba
Fix download path of f2c in buildf2c (#1866) 2021-09-29 11:13:17 -07:00
Hood Chatham b322d6727a
Update prettier precommit and ci rules (#1747) 2021-07-25 08:02:33 -07:00
Hood Chatham f0bd568a31
Set up pytest node tests (#1717) 2021-07-20 10:48:27 +02:00
Hood Chatham 450a2d21e3
Consolidate apply-lint into clang-format-precommit and fix test_asyncio test after linting html files (#1667) 2021-06-25 18:59:29 -07:00
Hood Chatham 043c9cf360
Use prettier to format html files (#1666) 2021-06-25 15:16:02 -07:00
Hood Chatham b4f4bcffdc
Update to Python 3.9.5 (#1637)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-06-19 15:49:25 -07:00
Syrus Akbary 6168c4b674
Add md5sum to dependency-check script (#1622) 2021-06-04 09:36:46 +02:00
Hood Chatham 2e04752272
MAINT Improvements to node and file_packager invocations (#1600) 2021-05-29 10:31:56 -07:00
Hood Chatham 97d7dfcdf9
Some basic types (#1592) 2021-05-20 09:05:05 -07:00
Hood Chatham ab1b6c8d24
MAINT Use prettier to format javascript (#1554)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-05-01 10:17:32 -07:00
Hood Chatham 6bc94372aa
Shorten pytest summary table test names (from #1340) (#1346) 2021-03-22 09:16:16 +01:00
Dexter Chua e4c4702e6a
TST Don't print python traceback in pytest_wrapper (#1103) 2021-01-12 23:18:29 +01:00
Dexter Chua 4ae245855d
Install uglifyjs and lessc via npm (#1002)
The installation is very fast, and this avoids having two copies of node
around. In particular, this avoids the need to monkey-patch uglify-js to
use the system node.

This can be further streamlined when #792 is merged
2021-01-01 23:43:48 +08:00
Dexter Chua 27e2800120
Use upstream file packager instead of fork (#991) 2021-01-01 08:48:28 +01:00
Hood Chatham c9c4499a0d
Maint: precommit clang-format (#942)
This resolves #935. I also changed the lint make recipe to use find which is more resilient to changes in directory structure and doesn't output those annoying No such file or directory messages to stdout.

I changed the name of the apply-lints recipe to apply-lint for consistency, and I updated it to only apply lints to files with staged changes.
2020-12-31 09:57:41 +08:00
Dexter Chua 0c91434bb6
Rerun failed tests sequentially (#859) 2020-12-14 18:05:15 +01:00
Dexter Chua 0defcb3825
BLD Don't compile host python (#830) 2020-12-08 00:19:16 +01:00
Dexter Chua 0e36e71053
Remove external dependencies from file_packager.py (#809) 2020-12-02 14:42:03 +01:00
Roman Yurchak f7adad7eb3
Upgrade to emscripten 1.38.34 with fastcomp (#480)
Co-authored-by: Dexter Chua <dec41@srcf.net>
2020-11-30 18:54:35 +01:00
Roman Yurchak fc5495ffdb
Update to Python 3.8.2 (#712)
* Updating to CPython 3.8

* More fixes

* Skip python headers check in tools/dependency-check.sh

* Fix checksum

* Fix packages

* Fix syntax error

* Fix benchmark path

* Update CPython tests

* More test fixes

* Fix PyStone

* More Cpython test fixes

* Update docs

* Fix issue in conftest

* Add documentation

* Upload updated Docker image
2020-07-07 16:21:33 +02:00
Roman Yurchak e7dd4588ab
MNT Add pre-commit config (#698) 2020-06-27 14:57:48 +02:00
William Lachance c3ac3d3357
Document and check for a few more things when building pyodide (#593)
* cmake
* pkg-config
* fix check for pyyaml
2020-01-02 17:42:43 -05:00
Dorian Pula a1663e77e0 Add dependency check for the builds. (#568)
* Add dependency check for the builds.

* Use Python 3 specifically.

* Use the right target.
2019-11-19 16:51:45 -05:00
William Lachance cf6b8e11e5 Update README for building on Mac 2019-10-21 12:27:18 -04:00
Michael Droettboom 7ecb6b7340 Ignore the gfortran link 2019-01-23 19:58:45 -05:00
Madhur Tandon a704d5a04b Implement the ABI number functionality.
Modified ``Makefile`` and ``packages/Makefile`` to get ``PYODIDE_PACKAGE_ABI`` from ``Makefile.envs``
Made ``checkABI`` as a public API function.
Modified ``file_packager.py`` to check for the compatible ABI number.
Defined ABI number with which pyodide is built in Makefile.envs
Accepted ABI number in ``file_packager.py`` as an argument.
Modified ``buildpkg.py`` and ``buildall.py`` to account for the new argument.
Added the corresponding ``test_different_ABI`` test.
2019-01-23 00:07:39 +05:30
Michael Droettboom 4b3bfe53ad Upgrade emscripten to 1.38.22 2019-01-10 07:40:01 -05:00
Michael Droettboom 58048cff2c Upgrade to emscripten 1.38.12 2018-10-01 18:56:57 -04:00
Roman Yurchak 72293058b9 Converting tools scripts to a python package 2018-09-20 18:44:30 +02:00
Michael Droettboom 0d4b22ba77 Use LZ4 filesystem compression, using the canonical C implementation 2018-09-19 16:44:54 -04:00
Michael Droettboom fcc2b7a036 Reorg pyodide ns to separate emscripten details from public API 2018-09-19 10:50:23 -04:00
Michael Droettboom a028a86d51 Add comment about source. 2018-09-12 11:17:00 -04:00
Michael Droettboom 84f2f28242 Vendor file_packager.py 2018-09-12 10:55:50 -04:00
Michael Droettboom 56562257ef Fix #71: Upgrade to Python 3.7 2018-09-06 10:56:33 -04:00
Michael Droettboom b66d698414 Install to a directory, and use that, instead of just the build/lib... 2018-08-23 11:59:33 -04:00
Michael Droettboom c8527c5e5e Don't include full paths in package metadata 2018-08-21 11:29:14 -04:00
Roman Yurchak 6ef80a8f5d Use python instead of python2 2018-08-17 00:09:50 +03:00
Michael Droettboom e68fb5e0a2
Merge pull request #103 from rth/sha256-hash
Add support for sha256 checksum
2018-08-06 14:17:36 -04:00
Roman Yurchak a24a7fe5f8 Add support for sha256 checksum 2018-08-06 18:03:51 +03:00
Michael Droettboom fa23049e0c Minor fixups from pull request 2018-08-06 10:01:28 -04:00
Michael Droettboom 9f72505eff Fix benchmarks 2018-08-03 17:11:38 -04:00
Michael Droettboom 2d0b9ee23a Use pathlib for path manipulations 2018-08-03 17:11:38 -04:00
Roman Yurchak 369a7124ad Skip compile-and-configure cases for numpy 2018-07-26 11:44:09 +02:00
Michael Droettboom c5597313a0 Turn on `--use-preload-plugins` 2018-06-23 08:28:34 -04:00
Michael Droettboom 7fac966200 Fix glitches in last few commits 2018-06-22 14:49:52 -04:00
Michael Droettboom 222c0248a1 Add documentation to new build tools.
Clean up argument parsing.
2018-06-22 10:22:00 -04:00
Michael Droettboom 2067c1c302 Try importing importlib.machinery in a different way 2018-06-20 21:20:26 -04:00
Michael Droettboom 037d485fac Linting 2018-06-20 17:10:06 -04:00
Michael Droettboom 17e1562ded MVP of a proper packaging system 2018-06-20 14:54:47 -04:00