Package: ctypesgen
ctypesgen
                          ---------

              (c) Ctypesgen developers 2007-2022
             https://github.com/ctypesgen/ctypesgenctypesgenis a pure-python ctypes wrapper generator. It parses C header files
and creates a wrapper for libraries based on what it finds.Preprocessor macros are handled in a manner consistent with typical C code.
Preprocessor macro functions are translated into Python functions that are then
made available to the user of the newly-generated Python wrapper library.It can also output JSON, which can be used with Mork, which generates bindings
for Lua, using the alien module (which binds libffi to Lua).DocumentationSeehttps://github.com/ctypesgen/ctypesgen/wikifor full documentation.Runctypesgen --helpfor full range of available options.Installationctypesgencan be installed bypip install ctypesgen. It requires Python 3.7
to run.Basic UsageThis project automatically generates ctypes wrappers for header files written
in C.For example, if you'd like to generate Neon bindings, you can do so using this
recipe (using a standard pip install):ctypesgen-lneon/usr/local/include/neon/ne_*.h-oneon.pySome libraries, such as APR, need special flags to compile. You can pass these
flags in on the command line.For example:FLAGS=`apr-1-config--cppflags--includes`ctypesgen$FLAGS-llibapr-1.so$HOME/include/apr-1/apr*.h-oapr.pySometimes, libraries will depend on each other. You can specify these
dependencies using -mmodule, where module is the name of the dependency module.Here's an example for apr_util:ctypesgen$FLAGS-llibaprutil-1.so$HOME/include/apr-1/ap[ru]*.h\-mapr-oapr_util.pyIf you want JSON output (e.g. for generating Lua bindings), use--output-language=jsonWhen outputting JSON, you will probably also want to use--all-headers --builtin-symbols --no-stddef-types --no-gnu-types
--no-python-typesRelated Software of Interestlibffiis a portable Foreign Function Interface library:http://sources.redhat.com/libffi/Mork, the friendly alien, can be found at:https://github.com/rrthomas/morkLicensectypesgenis distributed under the New (2-clause) BSD License:http://www.opensource.org/licenses/bsd-license.phpCopyright (c) 2007-2022, Ctypesgen Developers
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.Change Logv1.1.1Fixed inconsistency in version output in released packagesv1.1.0This release has a number of bug fixes in addition to a few new features.
Following a complete transition to Python 3, with dropped Python 2 support,
major work was made towards code modernization and quality.The code is now Black formatted and Flake8 testedGreatly improved unittest frameworkEmbedded PLY version updated to 3.11New option:--no-embed-preamblecreate separate files for preamble and
loader instead of embedding in each output fileNew option:--allow-gnu-cdo not undefine__GNUC__Fixed library loader search path on macOSFixed rare bug, processing (legacy) header files with MacRoman encoding
on macOSAdded full support for floating and integer constantsAdded support for sized integer types on WindowsAdded support to handlerestrictand_NoreturnkeywordsAdded name formats to posix library loaderFixed mapping of 'short int' to c_shortGit tags are now usingx.y.zformatv1.0.2Many issues fixed. Parse gcc attributes moreImplements automatic calling convention selection based on gcc attributes for
stdcall/cdecl.Simplify and unify library loader for various platforms. Improve library path
searches on Linux (parsed ld.so.conf includes now).First implementaion of #pragma packFirst implemenation of #undefAdds several command line options:-D--define-U--undefine--no-undefs-P--strip-prefix--debug-levelv1.0.1Fix handling of function prototypesOther minor improvments included.v1.0.0Py2/Py3 supportVarious development branches merged backIn addition to the various developments from the different branches, this
tag also represents a code state that:ties in with Travis CI to watch code developmentsimproves testsuite, including moving all JSON tests to testsuiteincludes a decent Debian package build configurationautomatically creates a man page to be included in the Debian package