This resolves #1589. It updates the MRO for PyProxy: now `proxy.destroy` always refers to the method PyProxy class method that destroys the proxy, `proxy.$destroy` refers to an attribute or method on the proxied Python object. Similarly, `proxy.get` refers to the `PyProxy.get` method if `type(proxy)` has a `__getitem__` method. Otherwise, it refers to an attribute or method on the proxied object. To unambigiously look up `get` on the proxied object, use `proxy.$get`.

The docs should be updated to explain this.
ENH Use leading $ to distinguish shadowed PyProxy methods. This resolves #1589. It updates the MRO for PyProxy: now `proxy.destroy` always refers to the method PyProxy class method that destroys the proxy, `proxy.$destroy` refers to an attribute or method on the proxied Python object. Similarly, `proxy.get` refers to the `PyProxy.get` method if `type(proxy)` has a `__getitem__` method. Otherwise, it refers to an attribute or method on the proxied object. To unambigiously look up `get` on the proxied object, use `proxy.$get`.

The docs should be updated to explain this.
export PYODIDE_ROOT=$(abspath ..)
PYODIDE_LIBRARIES=$(abspath ./.artifacts)
include ../Makefile.envs

ifeq ($(strip $(PYODIDE_PACKAGES)),)
else
	ONLY_PACKAGES=--only "$(PYODIDE_PACKAGES)"
endif

all: .artifacts/bin/pyodide-build
	PYTHONPATH="$(PYODIDE_LIBRARIES)/lib/python:$(PYODIDE_ROOT)/pyodide-build/" pyodide-build buildall . ../build \
		--target=$(TARGETPYTHONROOT) $(ONLY_PACKAGES) --install-dir $(PYODIDE_LIBRARIES) --n-jobs $${PYODIDE_JOBS:-4}

.artifacts/bin/pyodide-build: ../pyodide-build/pyodide_build/**
	mkdir -p $(PYODIDE_LIBRARIES)
	python3 -m pip install -e ../pyodide-build --no-deps --prefix $(PYODIDE_LIBRARIES)

update-all:
	for pkg in $$(find . -maxdepth 1 -type d -exec basename {} \; | tail -n +2); do \
		pyodide-build mkpkg "$${pkg}" --update; \
	done

clean:
	rm -rf ./*/build ./*/build.log
	rm -rf ./.artifacts

export PYODIDE_ROOT=$(abspath ..)
PYODIDE_LIBRARIES=$(abspath ./.artifacts)
include ../Makefile.envs

ifeq ($(strip $(PYODIDE_PACKAGES)),)
else
	ONLY_PACKAGES=--only "$(PYODIDE_PACKAGES)"
endif

all: .artifacts/bin/pyodide-build
	PYTHONPATH="$(PYODIDE_LIBRARIES)/lib/python:$(PYODIDE_ROOT)/pyodide-build/" pyodide-build buildall . ../build \
		--target=$(TARGETPYTHONROOT) $(ONLY_PACKAGES) --install-dir $(PYODIDE_LIBRARIES) --n-jobs $${PYODIDE_JOBS:-4}

.artifacts/bin/pyodide-build: ../pyodide-build/pyodide_build/**
	mkdir -p $(PYODIDE_LIBRARIES)
	python3 -m pip install -e ../pyodide-build --no-deps --prefix $(PYODIDE_LIBRARIES)

update-all:
	for pkg in $$(find . -maxdepth 1 -type d -exec basename {} \; | tail -n +2); do \
		pyodide-build mkpkg "$${pkg}" --update; \
	done

clean:
	rm -rf ./*/build ./*/build.log
	rm -rf ./.artifacts
