diff --git a/README.md b/README.md index 5f205be..a218666 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # python_cpp_example -**WARNING**: I have significantly reorganized this repository, and a new blog post explaining the changes is forthcoming. If you'd like to see the version of the repository that corresponds to my original June 2017 blog post, go to [this release](https://github.com/benjaminjack/python_cpp_example/tree/v0.1). - This repository contains an example Python module which wraps C++ code. The code presented here was designed to meet four requirements: 1. Python bindings for C++ code (using [`pybind11`](http://pybind11.readthedocs.io/en/stable/index.html) and built with [CMake](http://cmake.org)) @@ -9,7 +7,9 @@ This repository contains an example Python module which wraps C++ code. The code 3. Unit tests for Python code (using `unittest`) 4. A `setuptools` setup.py script for building, installation, and testing -Please see the [blog post that accompanies this repository](http://www.benjack.io/2017/06/12/python-cpp-tests.html) for more information. +Please see the [blog post that accompanies this repository](http://www.benjack.io/2018/02/02/python-cpp-revisited.html) for more information. + +**NOTE**: If you'd like to see the version of the repository that corresponds to my [original June 2017 blog post](http://www.benjack.io/2017/06/12/python-cpp-tests.html), go to [this release](https://github.com/benjaminjack/python_cpp_example/tree/v0.1). However, I no longer recommend using the repository structure from this old release. # Installation diff --git a/src/python_cpp_example/hello.py b/src/python_cpp_example/hello.py new file mode 100644 index 0000000..caf5928 --- /dev/null +++ b/src/python_cpp_example/hello.py @@ -0,0 +1,3 @@ + +def say_hello(): + print("Hello world!") \ No newline at end of file diff --git a/tests/cpp_test.py b/tests/cpp_test.py index bd46ecf..ff1eaeb 100644 --- a/tests/cpp_test.py +++ b/tests/cpp_test.py @@ -1,5 +1,4 @@ import unittest -import python_cpp_example import subprocess import os @@ -9,7 +8,7 @@ def test_cpp(self): print("\n\nTesting C++ code...") subprocess.check_call(os.path.join(os.path.dirname( os.path.relpath(__file__)), 'bin', 'python_cpp_example_test')) - print() # for prettier output + print("\nResuming Python tests...\n") if __name__ == '__main__':