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

Started using Limited API in order to eliminate need of module recompilation. #1

Merged
merged 1 commit into from
Apr 20, 2023
Merged

Started using Limited API in order to eliminate need of module recompilation. #1

merged 1 commit into from
Apr 20, 2023

Conversation

KOLANICH
Copy link
Contributor

No description provided.

…) in order to eliminate need of module recompilation.
@baskiton
Copy link
Owner

Thanks for the contribution!
However, this option doesn't make sense, since the extension is kernel-specific, depends on the kernel version, and the wheels are not loaded on PYPI. As a result, the extension is built on the end device.
For this option to be useful, wheels must be built for all manylinux* targets. If you know how to do this, I will be glad to accept the appropriate contribution.

@baskiton baskiton closed this Apr 20, 2023
@KOLANICH KOLANICH changed the title Started using Limited APIin order to eliminate need of module recompilation. Started using Limited API in order to eliminate need of module recompilation. Apr 20, 2023
@KOLANICH
Copy link
Contributor Author

However, this option doesn't make sense, since the extension is kernel-specific, depends on the kernel version

Do you mean it has to be recompiled on every kernel upgrade? The main motivation was just to compile it for Python 3.11 installed on my machine and then to reuse on all the next versions of Python without any burden of recompiling by just moving the dirs of the installed package into new loacations (I do it after the distro changes Python version). The wheel somehow contains Python version within metadata and wheel name IDK why, but the library compiled looks like version invariant and I guess that when moved to Pythonn 3.12 dir it should work.

For this option to be useful, wheels must be built for all manylinux* targets. If you know how to do this

I have never done it personally, but AFAIK there are special Docker images https://github.com/pypa/manylinux (which are Docker images with old libc) and a special tool https://github.com/pypa/auditwheel converting wheels built there into "manylinux wheels" by fixing their metadata and bundling shared libs. But this package depends on no other external shared libs other than Python API and libc.

@baskiton
Copy link
Owner

Do you mean it has to be recompiled on every kernel upgrade?

No. We are talking about cardinal changes in the kernel when new features appear. For example, for this package, according to man setns, the main kernel milestones are:

  • Linux 3.0 (minimal version)
  • Linux 3.8
  • Linux 4.6
  • Linux 5.8

by just moving the dirs of the installed package into new loacations

Ah, that sounds logical. It turns out that I did not quite understand the purpose of this option. Thought you wanted the wheels to be built by the builder and stored in PYPI to save the end user the burden of compiling.
Ok, I'm restoring the PR.

@baskiton baskiton reopened this Apr 20, 2023
@baskiton baskiton changed the base branch from main to dev April 20, 2023 16:38
@baskiton baskiton merged commit 35c3a80 into baskiton:dev Apr 20, 2023
@KOLANICH KOLANICH deleted the limited_api branch April 20, 2023 16:43
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

Successfully merging this pull request may close these issues.

None yet

2 participants