Integrate cffi-buildtool into CFFI itself#241
Conversation
This adds code and documentation that was originally written by Rose Davidson (@inklesspen on GitHub) for the cffi-buildtool project: https://github.com/inklesspen/cffi-buildtool
|
Just commenting here to confirm I give my full support for this upstreaming, and after a release is cut which includes these changes, I will mark my existing project as deprecated. Also I'm available to answer any questions about the original code upon which this is based. |
ngoldbaum
left a comment
There was a problem hiding this comment.
Some thoughts that occurred to me since yesterday and a typo fix
There was a problem hiding this comment.
The files in this second example that are exact duplicates of the ones in the first example could probably be symlinks.
There was a problem hiding this comment.
Well, in my version of the project I used an actual (though very simple) C library in the example projects, using meson's subproject wrap support. Arguably that's a slightly more realistic example case than this little squaring library.
There was a problem hiding this comment.
Thanks, I saw that on my first pass on this PR and intentionally decided to make this a simple example that didn't rely on any meson features. I think I'll make these symlinks so the two examples are identical other than how they're set up in the build.
|
There is a clang-tsan failure |
|
Sorry for taking so long to come back to this. I think this is ready for another round of review now. |
Closes #47. Revives #76.
This adds a new subpackage for cffi named
cffi.buildtooland a new CLI script distributed by CFFI namedgen-cffi-src. Also adds new tests and documentation. See the new documentation and tests for usage details.I realize that this is a big change that makes a number of opinionated choices. I'm very happy to adjust things to suit the maintainers' taste.
My ultimate goal here is to make it possible for projects using CFFI to use arbitrary build tools and remove the perceived tight coupling between CFFI and setuptools/distutils. If there isn't appetite to add the code in cffi-buildtool to CFFI itself, I'd also happily document how to depend on and use cffi-buildtool instead.
See inklesspen/cffi-buildtool#2 where I got @inklesspen's blessing to do this.
The is based on code and documentation that were originally written by Rose Davidson (@inklesspen on GitHub) for the cffi-buildtool project: https://github.com/inklesspen/cffi-buildtool.