-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Make pyscript.py
into a Python package
#1226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
type: bug
Something isn't working
Comments
Did you attend to this already @hoodmane? |
I did a little bit of this. The next step is to make adjustments to |
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 8, 2023
Followup to pyscript#1232. Closes pyscript#1226. Use node to make a manifest of the src/python dir and then use terser to inject it into the bundle as a variable called pyscript_package. This means we need to always use the terser plugin even when not minifying. In the non-minify case, we disable terser minification and mangling and enable terser beautification. Note that we bundle mangled versions of many upstream npm dependencies, so even in debug/nonminified builds, these do not include symbol names.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 8, 2023
Followup to pyscript#1232. Closes pyscript#1226. Use node to make a manifest of the src/python dir and then use terser to inject it into the bundle as a variable called pyscript_package. This means we need to always use the terser plugin even when not minifying. In the non-minify case, we disable terser minification and mangling and enable terser beautification. Note that we bundle mangled versions of many upstream npm dependencies, so even in debug/nonminified builds, these do not include symbol names.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 25, 2023
Followup to pyscript#1232. Closes pyscript#1226. Use node to make a manifest of the src/python dir and then use an esbuild plugin to resolve an import called `pyscript_python_package.esbuild_injected.json` to an object indicating the directories and files in the package folder. This object is then used to govern runtime installation of the package.
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 25, 2023
Followup to pyscript#1232. Closes pyscript#1226. Use node to make a manifest of the src/python dir and then use an esbuild plugin to resolve an import called `pyscript_python_package.esbuild_injected.json` to an object indicating the directories and files in the package folder. This object is then used to govern runtime installation of the package.
1 task
hoodmane
added a commit
to hoodmane/pyscript
that referenced
this issue
Mar 27, 2023
Followup to pyscript#1232. Closes pyscript#1226. Use node to make a manifest of the src/python dir and then use an esbuild plugin to resolve an import called `pyscript_python_package.esbuild_injected.json` to an object indicating the directories and files in the package folder. This object is then used to govern runtime installation of the package.
hoodmane
added a commit
that referenced
this issue
Mar 29, 2023
Followup to #1232. Closes #1226. Use node to make a manifest of the src/python dir and then use an esbuild plugin to resolve an import called `pyscript_python_package.esbuild_injected.json` to an object indicating the directories and files in the package folder. This object is then used to govern runtime installation of the package.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
pyscript.py has a bunch of unrelated logic in it, some of which should probably be private. There should be a pyscript package with an
__init__.py
and multiple submodules with related logic. There are several ways to do this, personally I liketar
ing the package folder and then loading the tar file withfetch
andpyodide.unpackArchive
. But you could also use rollup.The text was updated successfully, but these errors were encountered: