diff --git a/.eggs/README.txt b/.eggs/README.txt deleted file mode 100644 index 5d01668..0000000 --- a/.eggs/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins. - -This directory caches those eggs to prevent repeated downloads. - -However, it is safe to delete this directory. - diff --git a/.eggs/tests-0.7-py3.6.egg b/.eggs/tests-0.7-py3.6.egg deleted file mode 100644 index e49a5a0..0000000 Binary files a/.eggs/tests-0.7-py3.6.egg and /dev/null differ diff --git a/README.md b/README.md index edc90a7..a218666 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # python_cpp_example + 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)) @@ -6,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/setup.py b/setup.py index a24c724..54753b8 100755 --- a/setup.py +++ b/setup.py @@ -94,7 +94,7 @@ def copy_test_file(self, src_file): setup( name='python_cpp_example', - version='0.1', + version='0.2', author='Benjamin Jack', author_email='benjamin.r.jack@gmail.com', description='A hybrid Python/C++ test project', 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__':