Skip to content

Commit

Permalink
Build six using usual build system (pyodide#1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
dalcde authored and joemarshall committed Jan 3, 2021
1 parent 869a509 commit 63919a6
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 56 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ ccache
/emsdk/emsdk

*.egg-info/
packages/six/six-1.11.0
packages/lz4/lz4-1.8.3
packages/CLAPACK/CLAPACK-WA
packages/CLAPACK/clapack.tgz
Expand Down
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ LDFLAGS=\
-s "BINARYEN_TRAP_MODE='clamp'" \
-s LZ4=1

SIX_ROOT=packages/six/six-1.11.0/build/lib
SIX_LIBS=$(SIX_ROOT)/six.py

JEDI_ROOT=packages/jedi/jedi-0.17.2/jedi
JEDI_LIBS=$(JEDI_ROOT)/__init__.py

Expand Down Expand Up @@ -140,7 +137,6 @@ clean:
rm -fr node_modules
>>>>>>> 4ae2458... Install uglifyjs and lessc via npm (#1002)
make -C packages clean
make -C packages/six clean
make -C packages/jedi clean
make -C packages/parso clean
make -C packages/libxslt clean
Expand Down Expand Up @@ -175,7 +171,6 @@ $(UGLIFYJS) $(LESSC): emsdk/emsdk/.complete

root/.built: \
$(CPYTHONLIB) \
$(SIX_LIBS) \
$(JEDI_LIBS) \
$(PARSO_LIBS) \
src/sitecustomize.py \
Expand All @@ -186,7 +181,6 @@ root/.built: \
mkdir -p root/lib
cp -r $(CPYTHONLIB) root/lib
mkdir -p $(SITEPACKAGES)
cp $(SIX_LIBS) $(SITEPACKAGES)
cp -r $(JEDI_ROOT) $(SITEPACKAGES)
cp -r $(PARSO_ROOT) $(SITEPACKAGES)
cp src/sitecustomize.py $(SITEPACKAGES)
Expand Down Expand Up @@ -231,12 +225,6 @@ $(CPYTHONLIB): emsdk/emsdk/.complete $(PYODIDE_EMCC) $(PYODIDE_CXX)
date +"[%F %T] done building cpython..."


$(SIX_LIBS): $(CPYTHONLIB)
date +"[%F %T] Building six..."
make -C packages/six
date +"[%F %T] done building six."


$(JEDI_LIBS): $(CPYTHONLIB)
date +"[%F %T] Building jedi..."
make -C packages/jedi
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

As part of the change, Module.checkABI is no longer present.
[#991](https://github.com/iodide-project/pyodide/pull/991)
- six is no longer vendored in the main pyodide package, and needs to be loaded
explicitly [#1010](https://github.com/iodide-project/pyodide/pull/1010)

### Added
- `micropip` now supports installing wheels from relative urls. [#872](https://github.com/iodide-project/pyodide/pull/872)
Expand Down
3 changes: 3 additions & 0 deletions packages/attrs/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ package:
source:
sha256: 0ef97238856430dcf9228e07f316aefc17e8939fc8507e18c6501b761ef1a42a
url: https://files.pythonhosted.org/packages/c4/d4/c2b5232ecfc0783c697a81c13efc53a4fe285d4e2c00e0d8aed90495fade/attrs-20.1.0.tar.gz
requirements:
run:
- six
test:
imports:
- attr
1 change: 1 addition & 0 deletions packages/bleach/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ requirements:
- setuptools
- webencodings
- packaging
- six
source:
sha256: 3c4c520fdb9db59ef139915a5db79f8b51bc2a7257ea0389f30c846883430a4b
url: https://files.pythonhosted.org/packages/a9/ac/dc881fca3ac66d6f2c4c3ac46633af4e9c05ed5a0aa2e7e36dc096687dd7/bleach-3.1.5.tar.gz
Expand Down
4 changes: 4 additions & 0 deletions packages/cycler/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ source:
test:
imports:
- cycler

requirements:
run:
- six
1 change: 1 addition & 0 deletions packages/html5lib/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package:
requirements:
run:
- webencodings
- six
source:
sha256: b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f
url: https://files.pythonhosted.org/packages/ac/b6/b55c3f49042f1df3dcd422b7f224f939892ee94f22abcf503a9b7339eaf2/html5lib-1.1.tar.gz
Expand Down
1 change: 1 addition & 0 deletions packages/packaging/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ source:
requirements:
run:
- pyparsing
- six

test:
imports:
Expand Down
1 change: 1 addition & 0 deletions packages/patsy/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ source:
requirements:
run:
- numpy
- six

test:
imports:
Expand Down
1 change: 1 addition & 0 deletions packages/pytest/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ requirements:
- pluggy
- py
- setuptools
- six

test:
imports:
Expand Down
3 changes: 3 additions & 0 deletions packages/python-dateutil/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ source:
- patches/dummy-thread-lock.patch
sha256: 73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c
url: https://files.pythonhosted.org/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz
requirements:
run:
- six
test:
imports:
- dateutil
4 changes: 4 additions & 0 deletions packages/python-sat/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ source:
test:
imports:
- pysat

requirements:
run:
- six
38 changes: 0 additions & 38 deletions packages/six/Makefile

This file was deleted.

2 changes: 0 additions & 2 deletions packages/six/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/six/checksums

This file was deleted.

6 changes: 6 additions & 0 deletions packages/six/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package:
name: six
version: 1.15.0
source:
sha256: 30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259
url: https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz
1 change: 1 addition & 0 deletions pyodide_build/tests/test_buildall.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def build(self, outputdir: Path, args) -> None:
"libxml",
"zlib",
"libiconv",
"six",
}
assert build_list.index("distlib") < build_list.index("micropip")
assert build_list.index("soupsieve") < build_list.index("beautifulsoup4")
Expand Down
3 changes: 1 addition & 2 deletions src/tests/test_pyodide.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ def test_find_imports():
res = find_imports(
dedent(
"""
import six
import numpy as np
from scipy import sparse
import matplotlib.pyplot as plt
"""
)
)
assert set(res) == {"numpy", "scipy", "six", "matplotlib"}
assert set(res) == {"numpy", "scipy", "matplotlib"}


def test_adjust_ast():
Expand Down

0 comments on commit 63919a6

Please sign in to comment.