mirror of https://github.com/pyodide/pyodide.git
Add PyYAML and libyaml (#1181)
Co-authored-by: daoxian <daoxian@alibaba-inc.com> Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
This commit is contained in:
parent
69d77194d8
commit
b9848db7df
|
@ -0,0 +1,14 @@
|
|||
package:
|
||||
name: libyaml
|
||||
version: 0.2.1
|
||||
|
||||
source:
|
||||
url: https://github.com/yaml/libyaml/archive/0.2.1.zip
|
||||
|
||||
build:
|
||||
library: true
|
||||
script: |
|
||||
CFLAGS="-fPIC" emcmake cmake -DCMAKE_INSTALL_PREFIX=.. .
|
||||
emmake make -j ${PYODIDE_JOBS:-3}
|
||||
ln -s libyaml-0.2.1/libyaml_static.a ../libyaml.a
|
||||
ln -s libyaml-0.2.1/include ..
|
|
@ -0,0 +1,28 @@
|
|||
package:
|
||||
name: pyyaml
|
||||
version: 5.3.1
|
||||
|
||||
source:
|
||||
# path: downloads/pyyaml-5.3.1
|
||||
url: https://github.com/yaml/pyyaml/archive/5.3.1.zip
|
||||
|
||||
patches:
|
||||
- patches/Makefile.patch
|
||||
- patches/setup.cfg.patch
|
||||
|
||||
build:
|
||||
skip_host: True
|
||||
cflags: |
|
||||
-I../../../../cpython/installs/python-3.8.2/include/python3.8
|
||||
-I../../../../emsdk/emsdk/fastcomp/emscripten/system/include/libc
|
||||
-I../../../libyaml/build/include
|
||||
ldflags: |
|
||||
-L../../../libyaml/build/
|
||||
|
||||
requirements:
|
||||
run:
|
||||
- libyaml
|
||||
|
||||
test:
|
||||
imports:
|
||||
- yaml
|
|
@ -0,0 +1,11 @@
|
|||
--- downloads/pyyaml-5.3.1/Makefile 2020-03-18 21:09:19.000000000 +0000
|
||||
+++ patches/Makefile 2020-11-20 06:33:24.117490628 +0000
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
.PHONY: default build buildext force forceext install installext test testext dist clean
|
||||
|
||||
-PYTHON=/usr/bin/python
|
||||
+PYTHON=/bin/env python
|
||||
TEST=
|
||||
PARAMETERS=
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
--- downloads/pyyaml-5.3.1/setup.cfg 2021-01-24 16:20:43.372414420 +0000
|
||||
+++ patches/setup.cfg 2021-01-24 16:20:49.767657201 +0000
|
||||
@@ -13,7 +13,7 @@
|
||||
#compiler=mingw32
|
||||
|
||||
# Additional preprocessor definitions might be required.
|
||||
-#define=YAML_DECLARE_STATIC
|
||||
+define=YAML_DECLARE_STATIC
|
||||
|
||||
# The following options are used to build PyYAML Windows installer
|
||||
# for Python 2.7 on my PC:
|
||||
@@ -22,4 +22,4 @@
|
||||
#define=YAML_DECLARE_STATIC
|
||||
|
||||
[metadata]
|
||||
-license_file = LICENSE
|
||||
\ No newline at end of file
|
||||
+license_file = LICENSE
|
|
@ -0,0 +1,11 @@
|
|||
--- downloads/pyyaml-5.3.1/setup.py 2020-03-18 21:09:19.000000000 +0000
|
||||
+++ patches/setup.py 2020-11-24 06:47:26.652992652 +0000
|
||||
@@ -287,6 +287,8 @@ if bdist_wheel:
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
+ from distutils import sysconfig
|
||||
+ sysconfig._config_vars['EXT_SUFFIX'] = '.js'
|
||||
|
||||
setup(
|
||||
name=NAME,
|
Loading…
Reference in New Issue