diff --git a/.gitignore b/.gitignore index 51156fd02..6acb91e20 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Makefile b/Makefile index 5661c920c..91b9b27ec 100644 --- a/Makefile +++ b/Makefile @@ -40,9 +40,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 @@ -133,7 +130,6 @@ clean: rm -fr src/*.bc rm -fr node_modules make -C packages clean - make -C packages/six clean make -C packages/jedi clean make -C packages/parso clean make -C packages/libxslt clean @@ -168,7 +164,6 @@ $(UGLIFYJS) $(LESSC): emsdk/emsdk/.complete root/.built: \ $(CPYTHONLIB) \ - $(SIX_LIBS) \ $(JEDI_LIBS) \ $(PARSO_LIBS) \ src/sitecustomize.py \ @@ -179,7 +174,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) @@ -224,12 +218,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 diff --git a/docs/changelog.md b/docs/changelog.md index 80ed5a70c..0edc18b28 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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) diff --git a/packages/attrs/meta.yaml b/packages/attrs/meta.yaml index 2a8905da3..e80cfa602 100644 --- a/packages/attrs/meta.yaml +++ b/packages/attrs/meta.yaml @@ -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 diff --git a/packages/bleach/meta.yaml b/packages/bleach/meta.yaml index dd1191aaf..4c3f3c973 100644 --- a/packages/bleach/meta.yaml +++ b/packages/bleach/meta.yaml @@ -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 diff --git a/packages/cycler/meta.yaml b/packages/cycler/meta.yaml index b9e930e84..6b92937e2 100644 --- a/packages/cycler/meta.yaml +++ b/packages/cycler/meta.yaml @@ -9,3 +9,7 @@ source: test: imports: - cycler + +requirements: + run: + - six diff --git a/packages/html5lib/meta.yaml b/packages/html5lib/meta.yaml index 6fe346fe8..4e7ff0a3b 100644 --- a/packages/html5lib/meta.yaml +++ b/packages/html5lib/meta.yaml @@ -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 diff --git a/packages/packaging/meta.yaml b/packages/packaging/meta.yaml index 80f65fd07..04eda4602 100644 --- a/packages/packaging/meta.yaml +++ b/packages/packaging/meta.yaml @@ -8,6 +8,7 @@ source: requirements: run: - pyparsing + - six test: imports: diff --git a/packages/patsy/meta.yaml b/packages/patsy/meta.yaml index 213c5e6d4..cbdd61f94 100644 --- a/packages/patsy/meta.yaml +++ b/packages/patsy/meta.yaml @@ -10,6 +10,7 @@ source: requirements: run: - numpy + - six test: imports: diff --git a/packages/pytest/meta.yaml b/packages/pytest/meta.yaml index 63e3a01e3..55120b481 100644 --- a/packages/pytest/meta.yaml +++ b/packages/pytest/meta.yaml @@ -17,6 +17,7 @@ requirements: - pluggy - py - setuptools + - six test: imports: diff --git a/packages/python-dateutil/meta.yaml b/packages/python-dateutil/meta.yaml index e60ac366a..cd38176ed 100644 --- a/packages/python-dateutil/meta.yaml +++ b/packages/python-dateutil/meta.yaml @@ -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 diff --git a/packages/python-sat/meta.yaml b/packages/python-sat/meta.yaml index 611b9ddca..b592d2e28 100644 --- a/packages/python-sat/meta.yaml +++ b/packages/python-sat/meta.yaml @@ -13,3 +13,7 @@ source: test: imports: - pysat + +requirements: + run: + - six diff --git a/packages/six/Makefile b/packages/six/Makefile deleted file mode 100644 index 1e2b5781b..000000000 --- a/packages/six/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -PYODIDE_ROOT=$(abspath ../..) -include ../../Makefile.envs - -SIXVERSION=1.11.0 - -ROOT=$(abspath .) - -SRC=$(ROOT)/six-$(SIXVERSION) -BUILD=$(SRC)/build/lib/six -TARBALL=$(ROOT)/downloads/six-$(SIXVERSION).tgz -URL=https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz - - -all: $(BUILD)/__init__.py - - -clean: - -rm -fr downloads - -rm -fr $(SRC) - - -$(TARBALL): - [ -d $(ROOT)/downloads ] || mkdir $(ROOT)/downloads - wget -q -O $@ $(URL) - md5sum --quiet --check checksums || (rm $@; false) - - -$(SRC)/setup.py: $(TARBALL) - tar -C . -xf $(TARBALL) - touch $(SRC)/setup.py - - -$(BUILD)/__init__.py: $(SRC)/setup.py - ( \ - cd $(SRC) ; \ - $(HOSTPYTHON) setup.py build ; \ - touch build/lib/six.py \ - ) diff --git a/packages/six/README.md b/packages/six/README.md deleted file mode 100644 index b91b9dab0..000000000 --- a/packages/six/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Six is a special case package, since it's so commonly used, we want to include -it in the main Python package. diff --git a/packages/six/checksums b/packages/six/checksums deleted file mode 100644 index f42e9cceb..000000000 --- a/packages/six/checksums +++ /dev/null @@ -1 +0,0 @@ -d12789f9baf7e9fb2524c0c64f1773f8 downloads/six-1.11.0.tgz diff --git a/packages/six/meta.yaml b/packages/six/meta.yaml new file mode 100644 index 000000000..bc51d599a --- /dev/null +++ b/packages/six/meta.yaml @@ -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 diff --git a/pyodide_build/tests/test_buildall.py b/pyodide_build/tests/test_buildall.py index 26768ab18..6975a3074 100644 --- a/pyodide_build/tests/test_buildall.py +++ b/pyodide_build/tests/test_buildall.py @@ -47,6 +47,7 @@ def test_build_dependencies(n_jobs, monkeypatch): "libxml", "zlib", "libiconv", + "six", } assert build_list.index("distlib") < build_list.index("micropip") assert build_list.index("soupsieve") < build_list.index("beautifulsoup4") diff --git a/src/tests/test_pyodide.py b/src/tests/test_pyodide.py index 1fe8f9bb7..72801e1ea 100644 --- a/src/tests/test_pyodide.py +++ b/src/tests/test_pyodide.py @@ -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():