diff --git a/py-cppimport/DESCR b/py-cppimport/DESCR new file mode 100644 index 0000000000..c529e7e4aa --- /dev/null +++ b/py-cppimport/DESCR @@ -0,0 +1,23 @@ +TODO: Adjust the following lines from README.md + +##### If you've used cppimport version 0.0.\*, some new features for you! Compiler arguments, multiple source files, bug fixes! Read on. + +# Import C or C++ files directly from Python! +Let's try it out. First, if you're on Linux or OS X, install with the terminal command `pip install cppimport`. + +Most cppimport users combine it with [pybind11](https://github.com/pybind/pybind11), but you can use a range of methods to create your Python extensions. Raw C extensions, Boost.Python, SWIG all work. Let's look at a simple C++ extension: + +```c++ +#include + +namespace py = pybind11; + +int square(int x) { + return x * x; +} + + +PYBIND11_MODULE(somecode, m) { + m.def("square", &square); +} +... diff --git a/py-cppimport/Makefile b/py-cppimport/Makefile new file mode 100644 index 0000000000..550f8a8ae6 --- /dev/null +++ b/py-cppimport/Makefile @@ -0,0 +1,20 @@ +# $NetBSD$ + +DISTNAME= cppimport-20.8.4.2 +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES= devel python +MASTER_SITES= ${MASTER_SITE_PYPI:=c/cppimport/} + +MAINTAINER= kamelderouiche@yahoo.com +HOMEPAGE= https://github.com/tbenthompson/cppimport +COMMENT= Import C++ files directly from Python +LICENSE= mit + +DEPENDS+= ${PYPKGPREFIX}-mako>=0:../../devel/py-mako + +USE_LANGUAGES= c c++ + +BUILDLINK_API_DEPENDS.${PYPKGPREFIX}-pybind11+= ${PYPKGPREFIX}-pybind11>=2.5.0 +.include "../../devel/py-pybind11/buildlink3.mk" +.include "../../lang/python/egg.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/py-cppimport/PLIST b/py-cppimport/PLIST new file mode 100644 index 0000000000..f928994e1e --- /dev/null +++ b/py-cppimport/PLIST @@ -0,0 +1,40 @@ +@comment $NetBSD$ +${PYSITELIB}/${EGG_INFODIR}/PKG-INFO +${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt +${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt +${PYSITELIB}/${EGG_INFODIR}/not-zip-safe +${PYSITELIB}/${EGG_INFODIR}/requires.txt +${PYSITELIB}/${EGG_INFODIR}/top_level.txt +${PYSITELIB}/cppimport/__init__.py +${PYSITELIB}/cppimport/__init__.pyc +${PYSITELIB}/cppimport/__init__.pyo +${PYSITELIB}/cppimport/build_module.py +${PYSITELIB}/cppimport/build_module.pyc +${PYSITELIB}/cppimport/build_module.pyo +${PYSITELIB}/cppimport/checksum.py +${PYSITELIB}/cppimport/checksum.pyc +${PYSITELIB}/cppimport/checksum.pyo +${PYSITELIB}/cppimport/config.py +${PYSITELIB}/cppimport/config.pyc +${PYSITELIB}/cppimport/config.pyo +${PYSITELIB}/cppimport/cpprun.py +${PYSITELIB}/cppimport/cpprun.pyc +${PYSITELIB}/cppimport/cpprun.pyo +${PYSITELIB}/cppimport/filepaths.py +${PYSITELIB}/cppimport/filepaths.pyc +${PYSITELIB}/cppimport/filepaths.pyo +${PYSITELIB}/cppimport/find.py +${PYSITELIB}/cppimport/find.pyc +${PYSITELIB}/cppimport/find.pyo +${PYSITELIB}/cppimport/import_hook.py +${PYSITELIB}/cppimport/import_hook.pyc +${PYSITELIB}/cppimport/import_hook.pyo +${PYSITELIB}/cppimport/importer.py +${PYSITELIB}/cppimport/importer.pyc +${PYSITELIB}/cppimport/importer.pyo +${PYSITELIB}/cppimport/templating.py +${PYSITELIB}/cppimport/templating.pyc +${PYSITELIB}/cppimport/templating.pyo +${PYSITELIB}/cppimport/windows_cygwin.py +${PYSITELIB}/cppimport/windows_cygwin.pyc +${PYSITELIB}/cppimport/windows_cygwin.pyo diff --git a/py-cppimport/distinfo b/py-cppimport/distinfo new file mode 100644 index 0000000000..925ce33576 --- /dev/null +++ b/py-cppimport/distinfo @@ -0,0 +1,6 @@ +$NetBSD$ + +SHA1 (cppimport-20.8.4.2.tar.gz) = dc89da03dde3a9ee47dd6df50d9be67ba1a35ad7 +RMD160 (cppimport-20.8.4.2.tar.gz) = ac51cd3e672681d1700105019e75fa51341aa473 +SHA512 (cppimport-20.8.4.2.tar.gz) = 429fca99ceb98f497cb15d310c459dac530f66c28dee05f20a62d0832c0625388e680255a18bb9dd7d7721241539f20c250b86fe00c1a7f9fe885c9544322941 +Size (cppimport-20.8.4.2.tar.gz) = 4273357 bytes