Commit Graph

208 Commits

Author SHA1 Message Date
Jan Max Meyer fd351bc4fc
MAINT Minor Makefile improvements (#1161) 2021-01-23 00:18:30 +01:00
Hood Chatham f8d363822c
Patch ceval to add callback to use for KeyboardInterrupt handling (#1148)
* Patch ceval to add interrupt handler callback

* Don't use SharedArrayBuffer in test, Firefox doesn't expose it

* Fix test

* Retest

Co-authored-by: Jan Max Meyer <jmm@phorward.de>
2021-01-20 23:27:28 +01:00
casatir 3128b1ad1e
MAINT Remove rendered.html (#1156) 2021-01-19 21:19:25 +01:00
Hood Chatham 7374be5c29
Flexible jsimport (#1146)
This allows users to bind arbitrary JS objects as python modules. This is used to implement the `js` module. Fixes #960
2021-01-17 12:33:50 +08:00
Dexter Chua 4c5c30779f
Touch npm binaries after installation (#1140)
`npm i` does not update timestamps if it ends up not installing or updating the packages. Before this commit, if emsdk is recompiled after installing these packages, then `npm i` will be triggered every build, because lessc and uglifyjs are older than emsdk.
2021-01-16 09:00:53 +08:00
Hood Chatham 53e0a792cf
Added "make debug" which builds with DEBUG_F flag (#1108) 2021-01-12 13:39:59 +08:00
Hood Chatham f6a67d9503
Enable emjs error handling (#1080) 2021-01-12 12:37:50 +08:00
Dexter Chua 65a9da04a3
Experimental new test system (#1047) 2021-01-11 18:25:55 +01:00
Dexter Chua 72555048b6
BLD Don't copy artifacts to root (#1096) 2021-01-10 18:19:34 +01:00
Dexter Chua e46aa9cff6
BLD Remove sitecustomize (#1072) 2021-01-08 17:29:52 +01:00
Dexter Chua c5f9a98de3
BLD Stop hardcoding file_packager.py directory (#1073) 2021-01-08 17:29:01 +01:00
Dexter Chua 06b6285253
Properly monitor pyodide-py changes (#1071)
Fixes #1069
2021-01-08 10:18:40 +08:00
Hood Chatham a58c8d7186
EM_JS wrappers to convert calls to use Python error conventions (#1051) 2021-01-06 23:48:15 +01:00
Dexter Chua ac3f1a358e
Build C libraries with the Python build system (#1027) 2021-01-03 22:09:40 +01:00
Roman Yurchak d15fe32c21
Don't include jedi and parso in the core pyodide package (#987) 2021-01-03 17:50:48 +01:00
joemarshall 324f595539
build .o files rather than .bc files. (#1028)
asm.js fastcomp build doesn't care about the file extension. upstream (wasm direct) build needs it to be .o
2021-01-03 22:14:56 +08:00
Dexter Chua f6f5da1145
Create script to set emscripten env vars (#1013) 2021-01-03 12:25:14 +01:00
Hood Chatham 9dff7308ec
Rename type_conversion ==> core (#1020) 2021-01-03 09:46:15 +01:00
Hood Chatham eeaa3c3ecf
runPython refactoring (#923)
Co-authored-by: Dexter Chua <dec41@srcf.net>
2021-01-02 23:44:24 +01:00
Dexter Chua 869044ba2e
Build six using usual build system (#1010) 2021-01-02 16:59:28 +08:00
Dexter Chua 2dfeba4c05
Build with -fPIC (#1008)
This is needed for the upstream backend, and I believe is a noop under
the fastcomp backend

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Joe Marshall <joe.marshall@nottingham.ac.uk>
2021-01-02 09:17:14 +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 4e39fd39d6
Remove unused variable in Makefile (#1001) 2021-01-01 21:19:27 +08:00
Dexter Chua 27e2800120
Use upstream file packager instead of fork (#991) 2021-01-01 08:48:28 +01:00
Dexter Chua 8cc3c33550
Remove SWAPPABLE_ASM_MODULE setting (#968)
This is removed in emscripten 1.39.16, and for the wasm backend, was
broken since 1.39.6. Eliminating the setting will make it easier to
upgrade in the future.
2020-12-31 11:45:44 +01:00
Dexter Chua 5d31bcbee4
Remove EMULATED_FUNCTION_POINTERS setting (#970)
According to pmp-p it is no longer needed, and this setting is
unavailable when using the upstream backend.

https://github.com/iodide-project/pyodide/issues/476#issuecomment-533285690
2020-12-31 11:43:49 +01:00
Dexter Chua 64d0b7cd00
BLD Remove TEXTDECODE=0 build flag (#962)
This was introduced in #96 to bypass a Chrome bug introduced in Chrome
69 and fixed in Chrome 70. Chrome 69 supposedly has a market share of
0.09%, so I think it is safe to drop support.
2020-12-31 11:01:04 +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
Hood Chatham a4f4f458de
Added minimal make recipe (#928)
* Added minimal rule.

* Added trailing newline to makefile
2020-12-31 08:42:02 +08:00
Hood Chatham aacaac8494
Use the C type system in hiwire (#971)
Before this PR, hiwire effectively opts out of the C type system entirely by declaring everything as int. A char*? Cast it to int. What about a PyObject*? Better cast it to int too. This makes the calling code more verbose (at least if the calling code uses the type system) and is not good for maintainability.

I made a NewType called HwObject for hiwire keys. If you google how to make a NewType in C, people recommend a single field struct. However, EM_JS does not convert that compatibly: it converts any struct to the address of the struct, but an integer to the value of the integer. This created trouble. I decided instead to make a dummy empty struct and work with pointers to that struct. To ensure that converting to and from the NewType always requires an explicit cast, I added -Werror=int-conversion -Werror=incompatible-pointer-types to the compiler options. (I like this setting better in any case.)

I added asserts to main.c checking that HwObject has the same alignment and size as int. Hopefully this will prevent confusing bugs if that ever changes.
2020-12-31 07:36:00 +08:00
Dexter Chua 8588b0a4d6
Remove BINARYEN_METHOD flag (#966)
This has been removed since 1.38.23, and is always set to native-wasm
when we set WASM=1.

See https://github.com/emscripten-core/emscripten/pull/7836
2020-12-28 13:30:25 +08:00
Dexter Chua 8de2ed1202
Build C libraries via buildall.py (#927)
This addresses part of #713, by listing and building C libraries as
dependencies. This means we automatically build CLAPACK when needed, and
`lxml`'s C dependencies are not built if lxml is not. In particular,
building "core" should now be faster.

The building itself is still performed by Makefile.
2020-12-23 14:24:32 +01:00
Hood Chatham 12a86812d9
Added "apply-lints" recipe to Makefile that modifies files in place to apply lints. (#925) 2020-12-23 11:05:58 +01:00
Roman Yurchak ce96a51d38
Create a pyodide-py package (#909) 2020-12-22 08:47:22 +01:00
Dexter Chua 77b2a99697
Test emsdk patches (#905) 2020-12-21 11:20:11 +08:00
Roman Yurchak 641ce219b8
Use PYODIDE_BASE_URL for the deployment location (#855) 2020-12-18 13:23:45 +01:00
Dexter Chua 0de8ddb0cf
MAINT Move all lint commands to Makefile (#879) 2020-12-17 10:54:23 +01:00
Dexter Chua 34026265fc
Remove lz4_c patch (#851) 2020-12-13 12:41:22 +01:00
Dexter Chua 9e050c143c
Remove clang-format symlink in config.yml (#837) 2020-12-08 09:01:58 +01:00
Dexter Chua 3a2719369e
PKG Downgrade parso to 0.7.1 (#822)
This is what jedi 0.17.2 wants
2020-12-05 13:09:46 +01:00
Dexter Chua a780abcae1
PKG Update jedi and parso to 0.17.2 and 0.8.0 resp (#807) 2020-12-03 19:33:13 +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 8c22c98a43
MAINT Reorganize src/ and tests/ folders (#786) 2020-11-09 13:28:02 +01:00
Roman Yurchak 7d168d05af
Use JsDelivr for distributing pyodide packages (#779) 2020-10-30 21:10:33 +01:00
Roman Yurchak bcc4f6b521
MNT Clean-up root folder (#714)
* Move six

* Move jedi and parso

* Move lz4

* Move CLAPACK

* Move zlib and libxslt

* Move libiconv and libxml

* Remobe netlify/state.json and move remove_modules to cpython

* Move bumpversion.cfg to setup.cfg

* Reset cache

* Fix test_common.py
2020-07-08 16:58:10 +02: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
Jay Harris d1a5cfeb25
Compile python lxml (#544)
Co-authored-by: Luiz Silva <luizfrdasilva@gmail.com>
2020-06-30 18:37:22 +02:00
Roman Yurchak 9afc7a1617
STY Apply black for code style (#702)
* Apply black

* A few fixes

* Relax flake8 checks

* Exclude tools/file_packager.py from black
2020-06-28 20:24:40 +02:00
Roman Yurchak 0e26ca0642
BLD Build CLAPACK, cpython and lz4 in parallel (#701) 2020-06-28 15:51:46 +02:00
Roman Yurchak 4ee8dedeed
Update to emscripten 1.38.31 (#674)
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2020-05-28 18:13:51 +02:00