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

Linux build for PyPI #6

Closed
ijc8 opened this issue Aug 25, 2021 · 7 comments
Closed

Linux build for PyPI #6

ijc8 opened this issue Aug 25, 2021 · 7 comments

Comments

@ijc8
Copy link

ijc8 commented Aug 25, 2021

Hi! Thanks for the sweet project; this is enabling me to load and run audio plugins from Python. 🚀

The README mentions that pip install only works on Mac; it looks like there's now a Windows build on PyPI, too. I'd love to see this become pip installable on Linux, as I intend to reference it as a dependency in another project.

Is there any chance you could create or accept a Linux build for PyPI?
(I would be happy to submit a Linux build for 0.0.8; Not sure what the etiquette is around these things.)

BTW: I had to add curl to target_link_libraries in CMakeLists.txt; without it, I get cling::DynamicLibraryManager::loadLibrary() ... libpopsicle.so: undefined symbol: curl_multi_info_read when importing popsicle. Not sure if this is relevant for other platforms.

Thanks!

@kunitoki
Copy link
Owner

kunitoki commented Oct 31, 2021

Thanks for the appreciation ! Glad it helps. I'm really interested in seeing how you run audio plugins from python... that would help maybe others, we could add an example of an audio plugin in the examples section of popsicle if you are willing to share your findings.

Back to the topic, i haven't focused much on linux / windows lately and i encountered any sort of issues trying to build juce on an old distro in order to build a manylinux wheel (tried manylinux1 and manylinux2010 without success as they are old and juce complains on missing compiler features). If you could provide some help here it would be appreciated... I have a release Github action that is using ubuntu 16.04 to build the wheel, but for some reason they get rejected from pypi as they are not manylinux ones (see https://github.com/kunitoki/popsicle/blob/master/.github/workflows/release.yml#L8-L48).

Will look into adding the curl dependency, seems to be a linux only thing.

@DBraun
Copy link

DBraun commented Apr 29, 2022

You might have better luck with manylinux2014 pypa/manylinux#1012

Try using it with cibuildwheel. You might take the section "Set up Linux dependencies" from your release.yml and move it inside CIBW_BEFORE_BUILD_LINUX. This is how pedalboard does it: https://github.com/spotify/pedalboard/blob/06c3a99f8db7498f0aaa75f6d0fdbda695386f8f/.github/workflows/all.yml#L237

You will have to find the equivalent yum install packages instead of apt-get http://mirror.centos.org/centos/7/os/x86_64/Packages/

@kunitoki
Copy link
Owner

Great thanks, looks i have to try it and see if it works

@kunitoki
Copy link
Owner

kunitoki commented May 1, 2022

I got some progress https://github.com/kunitoki/popsicle/runs/6246271900?check_suite_focus=true but it seems that linux is still the one creating issues... I got a strange output from cibuildwheel there:

Run python -m cibuildwheel --output-dir wheelhouse

     _ _       _ _   _       _           _
 ___|_| |_ _ _|_| |_| |_ _ _| |_ ___ ___| |
|  _| | . | | | | | . | | | |   | -_| -_| |
|___|_|___|___|_|_|___|_____|_|_|___|___|_|

cibuildwheel version 2.5.0

Build options:
  platform: 'linux'
  architectures: {<Architecture.x86_64: 'x86_64'>, <Architecture.aarch64: 'aarch64'>}
  build_selector: BuildSelector(skip_config='', build_config='cp36-manylinux_aarch64', requires_python=<SpecifierSet('>=3.7')>, prerelease_pythons=False)
  output_dir: PosixPath('/home/runner/work/popsicle/popsicle/wheelhouse')
  package_dir: PosixPath('/home/runner/work/popsicle/popsicle')
  test_selector: TestSelector(skip_config='*manylinux* *pp* *-macosx_universal2:arm64', build_config='*', requires_python=None, prerelease_pythons=False)
cibuildwheel: No build identifiers selected: BuildSelector(skip_config='', build_config='cp36-manylinux_aarch64', requires_python=<SpecifierSet('>=3.7')>, prerelease_pythons=False)
  before_all: ''
  before_build: 'yum install -y \\\n  zlib-devel \\\n  openssl-devel \\\n  freetype-devel \\\n  freeglut-devel \\\n  alsa-lib-devel \\\n  mesa-common-devel \\\n  xorg-x11-proto-devel \\\n  xorg-x11-proto-devel \\\n  libcurl-devel \\\n  libpng-devel \\\n  libX11-devel \\\n  libXcursor-devel \\\n  libXrandr-devel \\\n  libXinerama-devel \\\n  libXrender-devel \\\n  libXcomposite-devel \\\n  libXinerama-devel \\\n  libXcursor-devel\n'
  before_test: ''
  build_frontend: 'pip'
  build_verbosity: 0
  dependency_constraints: DependencyConstraints(PosixPath('/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/cibuildwheel/resources/constraints.txt'))
  environment: ParsedEnvironment([])
  manylinux_images: {'x86_64': 'quay.io/pypa/manylinux2014_x86_64:2022-04-03-da6ecb3', 'i686': 'quay.io/pypa/manylinux2014_i686:2022-04-03-da6ecb3', 'pypy_x86_64': 'quay.io/pypa/manylinux2014_x86_64:2022-04-03-da6ecb3', 'aarch64': 'quay.io/pypa/manylinux2014_aarch64:2022-04-03-da6ecb3', 'ppc64le': 'quay.io/pypa/manylinux2014_ppc64le:2022-04-03-da6ecb3', 's[39](https://github.com/kunitoki/popsicle/runs/6246272383?check_suite_focus=true#step:5:39)0x': 'quay.io/pypa/manylinux2014_s390x:2022-04-03-da6ecb3', 'pypy_aarch64': 'quay.io/pypa/manylinux2014_aarch64:2022-04-03-da6ecb3', 'pypy_i686': 'quay.io/pypa/manylinux2014_i686:2022-04-03-da6ecb3'}
  musllinux_images: {'x86_64': 'quay.io/pypa/musllinux_1_1_x86_64:2022-04-03-da6ecb3', 'i686': 'quay.io/pypa/musllinux_1_1_i686:2022-04-03-da6ecb3', 'aarch64': 'quay.io/pypa/musllinux_1_1_aarch64:2022-04-03-da6ecb3', 'ppc64le': 'quay.io/pypa/musllinux_1_1_ppc64le:2022-04-03-da6ecb3', 's390x': 'quay.io/pypa/musllinux_1_1_s390x:2022-04-03-da6ecb3'}
  repair_command: 'pip install auditwheel-symbols && (auditwheel repair -w {dest_dir} {wheel} || auditwheel-symbols --manylinux 2014 {wheel})'
  test_command: ''
  test_extras: ''
  test_requires: []
Cache folder: /home/runner/.cache/cibuildwheel

Here we go!

Error: Process completed with exit code 3.

I like the Here we go! message, very helpful !

@kunitoki
Copy link
Owner

kunitoki commented May 1, 2022

I've pushed 0.0.9 for manylinux, could you check if it's working for you?

@DBraun
Copy link

DBraun commented May 1, 2022

Awesome! I don't have a normal linux system to check but I tried google colab. It installed fine and I can import the module. I couldn't run an example, but that is probably ok because google colab might not allow UI-related things.

@kunitoki
Copy link
Owner

kunitoki commented May 1, 2022

Awesome thanks for testing !

Next step is to enable running some unit test written in python on juce classes.

@kunitoki kunitoki closed this as completed May 1, 2022
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

3 participants