Commit Graph

54 Commits

Author SHA1 Message Date
Hood Chatham f28d8c9efc Revert JSPI Changes
This reverts commits:
9ed5e839ff
8861b317a6
b2c47ae766
ab8dc2eac6
3bcc527c92
2505d4d6a3
2023-09-14 07:26:46 -07:00
Hood Chatham 9ed5e839ff Use Wasm Exceptions for invoke stubs if they exist (#3957)
If wasm exception handling is available, use dynamically generated modules
with wasm exception handling for the invoke stubs instead of a JS trampoline.
This is useful because JS trampolines interact poorly with JS Promise Integration.

In the future, we should switch exception handling ABIs to the compiler-provided
wasm exception handling ABI and we can remove this code. Currently we are
blocked on using compiler-provided wasm eh by Rust support.
2023-09-13 16:22:07 -07:00
Hood Chatham 5e26d9f1ae
Build libpyodide.a (#3335)
This is work towards unvendoring the Pyodide foreign function interface. 

Prior to this point, we included a large amount of critical functionality with `--pre-js`.
So we could create an archive called `libpyodide.a` with the object files but to use it
you would have to pass `--pre-js _pyodide.out.js` at link time. This embeds all of this
stuff in an object file called `pyodide_pre.o` which goes in our archive so you get all
the needed js runtime by linking it. 

Of course someone trying to use this still has to get the Python code onto the import
path, either using `--preload-file`, using Python to unpack it as a zip archive as we now
do, with zipimporter, or otherwise. They also will have to link `libpython.a` (is CPython
going to start distributing an Emscripten libpython?) and probably various other things.

We have to use a hack to inject the JavaScript code into the object files. The normal
`EM_JS` macro cannot handle arbitrary JavaScript code -- for example it fails with many
regex. Instead we manually generate write a C source file that does what we need using
`xxd`. The generated C code is similar to what `EM_JS` generates, but it uses an array
initializer rather than a string initializer for the characters avoiding the C preprocessor /
compiler's strange opinions about strings.
2023-01-26 17:22:05 -08:00
Joe Marshall 4a1913d3ad
build packages from pypi direct (#3196)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2022-11-17 10:05:14 +09:00
Hood Chatham dfd8149c63
NFC Update gitignore (#3240)
Sort the .gitignore folders and add pytest-pyodide and virtual environments
that start with .venv.
2022-11-10 11:19:45 -08:00
Hood Chatham 6a0d66a5d7
MAINT Update gitignore for tools/symlinks (#2657) 2022-06-01 13:17:13 -07:00
Hood Chatham 54f3f0f193
Add pyodide_build create_xbuildenv and install_xbuildenv (#2550)
This adds pyodide_build command create_xbuildenv which creates a
crossbuild environment (from a copy of Pyodide where scipy has been
build) and install_xbuildenv which installs the cross build environment
into a fresh copy of Pyodide.

I successfully installed the xbuild environment into a fresh checkout of
Pyodide then built statsmodels and scikit-learn in isolation, without 
building the Python interpreter, numpy, or scipy. I dumped the generated
wheels into a copy of Pyodide downloaded from CI, and was able to import
and use them as normal.

The size of the xbuild environment is 1.5 megabytes, of which 1.2 megabytes
is Python headers.

In a subsequent PR, we can update the CI to automatically upload these
to aws s3 and then install the environment from there.
2022-05-17 22:04:18 -07:00
Gyeongjae Choi ad0064e2c4
BLD Install libraries to centralized directory (#2551) 2022-05-18 13:14:16 +09:00
Hood Chatham 993940bbb9
Allow multiple loading of Pyodide instances (#2391) 2022-04-14 18:04:01 -07:00
Hood Chatham 9b5b6396ac
Use typescript (split from #2130, doesn't fix docs) (#2133) 2022-01-25 17:43:39 +01:00
Hood Chatham 56cffbc647
Use error-stack-parser to make better stack traces (#2123) 2022-01-23 20:11:10 -08:00
Hood Chatham 4cf245aa55
Add cffi package (#1761) 2021-08-01 16:12:14 +02:00
Hood Chatham 653891b045
ENH Add Ctypes support (#1656) 2021-06-26 10:34:31 +02:00
Hood Chatham 9ffae14dbf
Store package build logs as circleci artifacts (#1646) 2021-06-19 09:51:36 -07:00
Hood Chatham 2e04752272
MAINT Improvements to node and file_packager invocations (#1600) 2021-05-29 10:31:56 -07:00
Hood Chatham 2e284cc394
MAINT Use rollup instead of EM_JS to include pyproxy.js (#1593) 2021-05-22 18:36:25 -07:00
Roman Yurchak 4e9d10833e
BLD Create an installable pyodide-build package (#1566) 2021-05-03 20:51:11 +02:00
Hood Chatham 6fb385bc8c
BLD run_docker as the host user not as root (#1429) 2021-04-04 12:19:54 -07:00
Hood Chatham 9baffb6b7f
Use hypothesis to test string conversions between js and python (#1339)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-03-17 10:03:42 +01:00
Hood Chatham dbc60a8abf
DOCS: Move docs into three subfolders based on top level sections (#1149) 2021-01-18 20:56:47 +01:00
Dexter Chua 72555048b6
BLD Don't copy artifacts to root (#1096) 2021-01-10 18:19:34 +01:00
Dexter Chua 966be460c7
Remove unused lines from .gitignore (#1036)
- /build/ is duplicate
 - lz4 doesn't exist anymore
 - If .bc files were produced we ought to be alarmed
2021-01-04 14:36:58 +08: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
Dexter Chua 869044ba2e
Build six using usual build system (#1010) 2021-01-02 16:59:28 +08: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 861746a675
Build packages in parallel (#840) 2020-12-10 20:37:08 +01:00
Dexter Chua 0defcb3825
BLD Don't compile host python (#830) 2020-12-08 00:19:16 +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
Roman Yurchak f1cc304717
DOC Refactor API reference documentation (#782) 2020-10-31 21:00:58 +01:00
Roman Yurchak ec249dc282
BLD Fix emcc warning on Python3.8 (#720) 2020-07-11 13:23:45 +02: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
Jay Harris d1a5cfeb25
Compile python lxml (#544)
Co-authored-by: Luiz Silva <luizfrdasilva@gmail.com>
2020-06-30 18:37:22 +02: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
Jay Harris 92b1538076 Ignores source files for Jedi and Parso (#551) 2019-10-30 08:58:48 -04:00
Farooq Abdul Rehman 8e90e6d083 ignore .vscode (#361) 2019-03-26 08:49:53 -04:00
Roman Yurchak 862f257423 Use dummy threading + re-enable C++ files that failed due to a gloabl
namespace
2018-11-15 13:22:36 +01:00
Roman Yurchak 78bf51daac CLAPACK setup 2018-10-31 15:12:43 +01: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 409fe3b3f4 Use ccache 2018-07-24 12:58:31 -04:00
Michael Droettboom 17e1562ded MVP of a proper packaging system 2018-06-20 14:54:47 -04:00
Michael Droettboom 6dc91e0846 First pass at matplotlib support 2018-05-17 11:57:39 -04:00
Michael Droettboom 5f42b61862 Lots of pandas fixes:
- Install dependencies: dateutil, pytz and six
- Patch things for threading and mmap
- Disable deployment (for related reasons)
2018-04-24 19:29:54 -04:00
Michael Droettboom 5870c62045 Add Pandas to the build 2018-04-03 11:43:02 -04:00
Michael Droettboom e8685bb410 Add geckodriver.log to gitignore 2018-03-30 14:09:42 -04:00
Michael Droettboom b8c3e600c2 Add end-to-end build. Travis tests. 2018-03-30 13:08:06 -04:00
Michael Droettboom 2ad135ef06 Add testing 2018-03-30 10:51:13 -04:00
Michael Droettboom 280de281aa First working Numpy 2018-03-20 18:58:59 -04:00
Michael Droettboom f2c08119af Add internal cpython build 2018-02-27 17:57:22 -05:00