Commit 2b5ca356 authored by Sebastian Kehl's avatar Sebastian Kehl
Browse files

Provide code and infrastructure.

parent 44097b6d
_skbuild
hello_world.egg-info
cmake_minimum_required(VERSION 3.18)
project(hello-world VERSION "1.0")
find_package(pybind11)
pybind11_add_module(_hello MODULE src/hello/hello.cpp)
install(TARGETS _hello DESTINATION .)
[build-system]
requires = [
"setuptools>=42",
"wheel",
"pybind11[global]~=2.6.0",
"cmake>=3.18",
"scikit-build",
]
build-backend = "setuptools.build_meta"
import sys
from skbuild import setup
setup(
name="hello-world",
version="1.0",
description="hello world example",
author='MPCDF',
license="MIT",
packages=['hello'],
package_dir={'': 'src'},
cmake_install_dir='src/hello'
)
from ._hello import hello
#include <iostream>
#include <pybind11/pybind11.h>
namespace py = pybind11;
void hello() {
std::cout << "Hello, World!" << std::endl;
}
PYBIND11_MODULE(_hello, m) {
m.doc() = "Package to say hi";
m.def("hello", &hello, "Prints \"Hello, World!\"");
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment