vsketch icon indicating copy to clipboard operation
vsketch copied to clipboard

Pip and Wheels

Open DaAwesomeP opened this issue 2 years ago • 3 comments

Hello!

Just want to check if this is wanted before I work on it: I would like to work on a pull request to automate building the source distribution (sdist) and wheels (for all platforms poetry currently supports) with GitHub Actions. This would allow the package to be uploaded to Pypi with an easier install process (when you run pip install vsketch it will select the right wheel).

The wheels mean you don't have to build it when you install it, it will just pick the right precompiled wheel and install it, no build dependencies required. If a wheel for the platform isn't available, then it will still build from source using the sdist. If we do it right, then PiWheels will also build a wheel as well and add it to their repository, making it even easier to install on the Raspberry Pi.

Thanks!

DaAwesomeP avatar Sep 15 '21 14:09 DaAwesomeP

Hello @DaAwesomeP, thanks for offering help with the project -- this is very much welcome.

It would be indeed great to have a release process in place and upload to pip. Contribution for this is welcome. I would suggest an approach similar to vpype, where the process is triggered by tagging a version number and as much as possible is automated.

That said, although enabling pip install vsketch certainly is a nice perk, my understanding is that it would not necessarily resolve the potential headache that installation can be, in particular on the RPi. Most of the troubles comes from the dependencies, especially PySide2. Is there something that can be done about this (I'm not familiar with piwheels btw)? Also, vsketch's viewer currently requires OpenGL 3.3, which I understand is not available on the Pi. All this considered, actually running vsketch on a RPi is rather tricky. Do you have any success with this yourself?

abey79 avatar Sep 16 '21 09:09 abey79

Hello @DaAwesomeP, thanks for offering help with the project -- this is very much welcome.

Fantastic! I'll get started.

where the process is triggered by tagging a version number and as much as possible is automated.

Yes, definitely. I plan for it to create a release, attach the wheel files to the release, and upload to Pypi when a new tag is pushed. I will also see if the version numbering can be automated with setuptools-scm (so it just matches the tag, no need to modify pyproject.toml).

PySide2 is a bit different on the Pi. It's not distributed through Pypi but instead from the Debian repos. It can be installed with apt-get install python3-pyside2*. I will try this out and double check that it indeed works.

Piwheels is a service that builds wheels on Raspberry Pis for packages that don't already build them. It is enabled by default on Raspberry Pi OS. https://www.piwheels.org/

Also, vsketch's viewer currently requires OpenGL 3.3, which I understand is not available on the Pi.

I have not tried it yet, so you are probably right. I would wonder if there are any >2.1-specific features being used, but yes this is a separate issue.

DaAwesomeP avatar Sep 16 '21 21:09 DaAwesomeP

Ah, well I should have paid more attention. This package is an any wheel, so building doesn't get you much past the sdist, but it should make it quicker anyway. I'll submit a pull soon.

DaAwesomeP avatar Sep 16 '21 23:09 DaAwesomeP