Skip to content
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

Ubuntu 22.04 #6

Open
eddy-geek opened this issue Sep 26, 2022 · 7 comments
Open

Ubuntu 22.04 #6

eddy-geek opened this issue Sep 26, 2022 · 7 comments

Comments

@eddy-geek
Copy link

Hello,
I'd like to build a wheel for latest ubuntu lts, but could not find the commands you used for your wheels.

@brendan-ward
Copy link
Owner

For now, you'll have to build the underlying C++ library from source.

See https://github.com/brendan-ward/pymgl#developing

See the workflow which builds for ubuntu-20.04: https://github.com/brendan-ward/pymgl/blob/main/.github/workflows/build_wheels.yml

The overall steps should be the same, but note that some of the dependencies may have slightly different names for ubuntu-22.04 vs ubuntu-20.04. I haven't yet tried to build for ubuntu-22.04, so I'm not sure where the challenges will be.

@wwarne wwarne mentioned this issue Oct 29, 2022
@brendan-ward
Copy link
Owner

Version 0.3.0 now includes wheels for Ubuntu 22.04 (x86_64 only)

@eddy-geek
Copy link
Author

I'm having trouble with this so far:

❯ cat /etc/lsb-release                                                                       
DISTRIB_ID=ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="KDE neon Testing Edition"
❯ uname -a
Linux ncelrnd0216 5.19.0-24-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 14 14:06:02 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
❯ /usr/bin/python3 --version
Python 3.10.6
❯ /usr/bin/pip3 install --user https://github.com/brendan-ward/pymgl/releases/download/v0.3.0/pymgl-0.3.0-cp310-cp310-ubuntu22_04_x86_64.whl
ERROR: pymgl-0.3.0-cp310-cp310-ubuntu22_04_x86_64.whl is not a supported wheel on this platform.

Also on anaconda

.../anaconda3/bin/python3 --version
Python 3.10.2
❯ .../anaconda3/bin/pip3 install https://github.com/brendan-ward/pymgl/releases/download/v0.3.0/pymgl-0.3.0-cp310-cp310-ubuntu22_04_x86_64.whl
ERROR: pymgl-0.3.0-cp310-cp310-ubuntu22_04_x86_64.whl is not a supported wheel on this platform.

@eddy-geek
Copy link
Author

/usr/bin/pip3 debug --verbose | rg cp310-cp310
  cp310-cp310-manylinux_2_35_x86_64
...
  cp310-cp310-linux_x86_64

I don't have ...ubuntu22_04... wheel tags, is it just me because of uing an ubuntu derivative (KDE neon)?

@eddy-geek
Copy link
Author

As a workaround it seems enough to rename the file:

wget https://github.com/brendan-ward/pymgl/releases/download/v0.3.0/pymgl-0.3.0-cp310-cp310-ubuntu22_04_x86_64.whlmv ./pymgl-0.3.0-cp310-cp310-{ubuntu22_04,linux}_x86_64.whlpip install ./pymgl-0.3.0-cp310-cp310-linux_x86_64.whl

There is also a WHEEL file with the tag, but apparently it's not read by pip, here is how to change it if needed:

mkdir pymgl-0.3.0.dist-infoecho "Wheel-Version: 1.0
Generator: bdist_wheel (0.38.4)
Root-Is-Purelib: false
Tag: cp310-cp310-linux_x86_64
" > pymgl-0.3.0.dist-info/WHEELzip pymgl-0.3.0-cp310-cp310-*_x86_64.whl pymgl-0.3.0.dist-info/WHEEL
updating: pymgl-0.3.0.dist-info/WHEEL (deflated 5%)

@brendan-ward brendan-ward reopened this Jan 8, 2023
@brendan-ward
Copy link
Owner

Thanks for testing and sorry for the issues @eddy-geek

The platform tag was actually the point of some difficulty in our CI tests of the wheels, but I totally forgot to mention the steps needed to make it work in the README.

Here's what we're doing in the CI test: https://github.com/brendan-ward/pymgl/blob/main/.github/workflows/build_wheels.yml#L217

Basically, you have to specify the platform and target tags; target needs to be the site packages of your particular python environment (here denoted with the PYTHON_SITE_PACKAGES environment variable).

python -m pip install --find-links wheelhouse/artifact --platform ubuntu22_04 --target $PYTHON_SITE_PACKAGES --no-deps --upgrade pymgl

Using the platform tag seems to be the recommendation for building OS version specific wheels, but it has a quite unfriendly user experience as you bumped into here.

Unfortunately we need unique file names for the artifacts we upload to the Github release, so I'll need to either update the instructions or figure out some way of adding the OS version into the filename that doesn't trip up pip's compatibility check.

@brendan-ward
Copy link
Owner

I've got new wheels built now just adding a suffix before uploading the artifacts. If you'd like to test these out before I cut the next release (hopefully soon), they are in the artifact file here: https://github.com/brendan-ward/pymgl/actions/runs/3868806965

They just need to be renamed to strip off the .ubuntu-22.04 suffix after downloading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants