-
-
Notifications
You must be signed in to change notification settings - Fork 2
Add Python packaging #1
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
base: main
Are you sure you want to change the base?
Conversation
@paulmasson When you have a chance, please take a look at the updated instructions in |
@mkoeppe I only committed to building the JavaScript library because your build is a simple extension of my own custom build and can be done at the same time with little extra effort. I did not commit to anything to do with Python distribution and have no desire to do so. This repository should be just the JavaScript build. Anything Python related should be in a separate repository. This repository is intended to parallel releases in the source repository and nothing more. Furthermore, including a second entire copy of the library goes strongly against the JavaScript mindset. This repository should only have one copy of the library in each release. |
We can get rid of the copy in |
No worries, I will set up an automatic github action that publishes the Python package to PyPI. I just want to be sure that the updates that I added in README.md are clear to you. Perhaps you could comment on this specific point? |
… the 'version' file
Merged the update to r123 from main. Updating the version is now easier – it is no longer needed to make edits to the Python files on an update. |
I am guessing that you are still concerned about the github repo archive tarball that you are using as the upstream tarball in https://trac.sagemath.org/ticket/30915 – well, https://trac.sagemath.org/ticket/30123 changes the upstream tarball of "threejs" to the source archive that is uploaded to PyPI.org (see https://pypi.org/project/jupyter-threejs-sage/#files). So there is no need to be concerned about that tarball – with 30123, it will no longer be used. |
We add Python packaging scripts, following the model of https://github.com/jupyter-widgets/ipywidgets
By running
python3 setup.py sdist
, a source distribution can be created, which can then be uploaded to PyPI. The PyPI tarball can then become the upstream tarball for the Sage distribution. Users can also install it into the virtual environment where the Jupyter notebook runs usingpip
. No more symlinking required.The idea for versioning is that
jupyter_threejs_sage/static
will contain and ship all versions of threejs that are relevant for Sage releases. Right now there is only one version, r122, but if that makes it into Sage 9.3 but for Sage 9.4 we switch to (incompatible) version r155, then the new distribution of this package will ship both r122 and r155. In this way, when this package is installed into the virtual environment that runs the Jupyter notebook, it will work with both Sage 9.3 and Sage 9.4.