Repository navigation
fix: make the generated Makefile build an importable module - #415
Merged
Merged
Conversation
The Makefile that `gopy gen` writes linked _<pkg> against a separate
<pkg>_go shared library with no rpath, so the result failed to import:
ImportError: simple_go.so: cannot open shared object file
It now has cgo compile <pkg>.c into a single shared library, the same way
`gopy build` does, named with the interpreter's extension suffix. The
extraGccArgs plumbing only fed the old link line, so it is removed.
TestMakefile builds _examples/simple with the generated Makefile and runs
its test.py.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #415 +/- ##
==========================================
+ Coverage 74.31% 74.79% +0.47%
==========================================
Files 25 25
Lines 4653 4658 +5
==========================================
+ Hits 3458 3484 +26
+ Misses 960 934 -26
- Partials 235 240 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Makefile that
gopy genwrites linked _ against a separate _go shared library with no rpath, so the result failed to import:It now has cgo compile .c into a single shared library, the same way
gopy builddoes, named with the interpreter's extension suffix. The extraGccArgs plumbing only fed the old link line, so it is removed.TestMakefile builds _examples/simple with the generated Makefile and runs its test.py.
Closes: #413