pymediainfo icon indicating copy to clipboard operation
pymediainfo copied to clipboard

Publish wheel for macos-arm64, manylinux-x86_64 and manylinux-arm64

Open getzze opened this issue 1 year ago • 10 comments

fixes #127, #128

Taking inspiration from:

https://github.com/shakfu/cyfaust/blob/main/docs/devnotes/universal2.md

https://stackoverflow.com/questions/76450587/python-wheel-that-includes-shared-library-is-built-as-pure-python-platform-indep

I checked manylinux-x86_64 was correct with auditwheel, maybe checking with auditwheel could be added to the tox config or to the appveyor config.

getzze avatar Jul 22 '24 19:07 getzze

Thanks a lot for doing this. I'll look into it as soon as I have a bit of free time as I know little about wheels so I want to properly understand what this does.

sbraz avatar Jul 23 '24 18:07 sbraz

I also had a look at cibuildwheel that is specialized in making wheel for the different platforms, but I thought it was overkill to use it. But maybe it simplifies the scripts.

On 23 July 2024 19:17:01 GMT+01:00, Louis Sautier @.***> wrote:

Thanks a lot for doing this. I'll look into it as soon as I have a bit of free time as I know little about wheels so I want to properly understand what this does.

-- Reply to this email directly or view it on GitHub: https://github.com/sbraz/pymediainfo/pull/138#issuecomment-2245939028 You are receiving this because you authored the thread.

Message ID: @.***>

getzze avatar Jul 23 '24 18:07 getzze

Hello, did you have time to test this PR? Thanks!

getzze avatar Sep 06 '24 11:09 getzze

Hi @getzze I'm sorry I haven't taken time to review this. I will try to do it soon.

sbraz avatar Sep 06 '24 19:09 sbraz

Hi, and once again sorry for the really long delay in my review. I've started reviewing the PR and I think I understand most of it. I left a few comments on the code. I also noticed that there are a lot of warnings (not added by your changes, they're just because of the way the build is done). If you have experience with other build backends like Hatchling, please feel free to completely rewrite the sdist/wheel code to avoid this:

/usr/lib/python3.12/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)

I know sooner or later I'll have to fix the build so maybe now is the right time?

sbraz avatar Oct 19 '24 16:10 sbraz

After reading the warnings, I stumbled on https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary. It looks like installing the build package and running python -m build gets rid of these warnings.

sbraz avatar Oct 19 '24 16:10 sbraz

I think it makes sense to switch to Hatch, I find it easier to use than setuptools.

I can open another PR with the change to hatch 🙂. But it's better to keep it separate from this PR, right?

getzze avatar Oct 19 '24 18:10 getzze

Or we can just drop this PR entirely, whatever is easiest for you. If it's too much work, we can merge this first, I'd just like to understand what the try/except block does.

sbraz avatar Oct 19 '24 18:10 sbraz

Ah I had forgotten about the modifications in setup.py, I only remembered the appveyor part. It makes more sense to make a new PR with everything then!

getzze avatar Oct 19 '24 18:10 getzze

use pdm as build backend https://github.com/TensoRaws/pymediainfo-tensoraws

Tohrusky avatar Oct 20 '24 16:10 Tohrusky

Closing in favour of #140.

sbraz avatar Oct 30 '24 00:10 sbraz