Skip to main content

nuklear-cffi

https://travis-ci.org/nathanrw/nuklear-cffi.svg?branch=master

A semi-automatic Python binding for the nuklear C library.

The core of this is a python program that parses the nuklear.h header for declarations and passes this to the ‘cffi’ Python binding generator.

Declarations are extracted using a C preprocessor followed by some simple ad hoc text transformations. The ‘pcpp’ preprocessor is used. This is a C preprocessor written in Python, so the preprocessing step doesn’t actually require a C compiler to be installed.

However, the process of generating the Python binding requires a C compiler.

Some code for interfacing nuklear with pygame is provided under pynk.nkpygame.

Usage

See demo.py. The gist of it is to call the nuklear API via the ffi and lib objects imported from pynk - this is provided by the cffi library. Some code for interfacing with pygame is provided.

Installation

The package on pypi should work: https://pypi.python.org/pypi/pynk

Otherwise

python2 setup.py install

in the git repository should do it.

Dependencies

  • cffi, a Python library.

  • pcpp, a C preprocessor written in Python.

As such you will need a C compiler installed if you want to build the library.

Note that at present the pcpp in pypi won’t cut it, because in order to preprocess nuklear.h we rely on a fix that has not (as of writing) yet been integrated. You will have to install the one in my github fork.

For the pygame integration code, pygame is necessary, but it’s not a requirement for installation or to use the binding.

How to do a release

The following script will increment the version, commit the change and push a tag. The Travis build will then deploy a new version.

python ./bin/version.py (--major|--minor|--patch)

Metadata

Release files for pynk 0.4.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pynk 0.4.7
File Size Uploaded Provenance
pynk-0.4.7.tar.gz 187.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pynk 0.4.7
File Interpreter ABI Platform
pynk-0.4.7-py2.7-linux-x86_64.egg Legacy Egg format - - Details

Total release size: 1.1 MB

Release files / pynk-0.4.7.tar.gz

Download URL pynk-0.4.7.tar.gz
Size 187.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4b392ee814296e6a39cdfdabfb1159d4b3ea7b4ec59964f1dfb2825eed24f8a5
BLAKE2b-256 checksum
How to use checksums
748a802a528fdee34df7607941794379e39346fefb760db2421956de8b6d7c52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

Release files / pynk-0.4.7-py2.7-linux-x86_64.egg

Download URL pynk-0.4.7-py2.7-linux-x86_64.egg
Size 886.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
8f07eeba99d84271b54118865f35dfb9b69d6202af1c913fb20c74dc2813f343
BLAKE2b-256 checksum
How to use checksums
5e689ecc7916c4a19f029b3ee5d848d18a884c7c14a1cb8a0c54f309f2eaeb10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

Security for pynk 0.4.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page