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

Use extension name as library name, instead of hardcoded 'native.so' #1918

Merged
merged 1 commit into from Jan 26, 2024

Conversation

timkpaine
Copy link
Contributor

@timkpaine timkpaine commented Jan 21, 2024

Opening this PR for some conversation, I'm hoping to distribute an extension via CFFI, but it's a bit awkward integrating it with other projects when the library name is always native.so. It also makes it difficult to link against multiple.

In this PR I've just slightly tweaked the generation bits to make the library name the same as the extension name, so instead of native.so it will have the same name as the outer extension folder. I'm tempted to make it lib<extension_name>.so as it's not an importable python module, so seems like it should use the standard library prefix?

partially fixes #1919

Copy link

netlify bot commented Jan 21, 2024

Deploy Preview for maturin-guide ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ff8bcf1
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/65ada7edddf8240008a33c10
😎 Deploy Preview https://deploy-preview-1918--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@messense messense added the bindings/cffi cffi bindings label Jan 22, 2024
@messense messense marked this pull request as ready for review January 26, 2024 10:11
Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

@messense
Copy link
Member

I'm tempted to make it lib<extension_name>.so as it's not an importable python module, so seems like it should use the standard library prefix?

IMO it's not a big issue.

@messense messense merged commit d85758c into PyO3:main Jan 26, 2024
28 of 29 checks passed
@timkpaine timkpaine deleted the tkp/nonative branch January 26, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bindings/cffi cffi bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cffi] Allow generated shared library to have a name other than native.so
2 participants