Integrate cffi-buildtool into CFFI itself#241
Integrate cffi-buildtool into CFFI itself#241ngoldbaum wants to merge 1 commit intopython-cffi:mainfrom
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
| a CPython extension module. What they add is two convenient front-ends | ||
| -- one that executes an existing "build" Python script, and one that | ||
| reads a ``cdef`` and C prelude from two files. This tool enables | ||
| integrating with and build backend, such as `meson-python |
There was a problem hiding this comment.
| integrating with and build backend, such as `meson-python | |
| integrating with any build backend, such as `meson-python |
|
|
||
|
|
||
| A Worked Example Using ``meson-python`` | ||
| ======================================= |
There was a problem hiding this comment.
Maybe this should just link to the example projects in the tests to avoid duplication?
There was a problem hiding this comment.
I think there's value in having it right there in the docs, personally.
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 is a clang-tsan failure |
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.