diff --git a/README.md b/README.md index be1019a..cb5d317 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -pbtest -====== +python_example +============== An example project built with [pybind11](https://github.com/pybind/pybind11). @@ -9,13 +9,13 @@ Installation **On Unix (Linux, OS X)** - clone this repository - - `pip install ./pbtest` + - `pip install ./python_example` **On Windows (Requires Visual Studio 2015)** - For Python 3.5: - clone this repository - - `pip install ./pbtest` + - `pip install ./pyton_example` - For earlier versions of Python, including Python 2.7: Pybind11 requires a C++11 compliant compiler (i.e. Visual Studio 2015 on @@ -27,9 +27,9 @@ Installation - `"%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64` - `set DISTUTILS_USE_SDK=1` - `set MSSdk=1` - - `pip install ./pbtest` + - `pip install ./python_example` - Note that this requires the user building pbtest to have registry edition + Note that this requires the user building `python_example` to have registry edition rights on the machine, to be able to run the `vcvarsall.bat` script. @@ -64,7 +64,7 @@ the extension module to generate beautiful documentation in a variety formats. The following command generates HTML-based reference documentation; for other formats please refer to the Sphinx manual: - - `cd pbtest/docs` + - `cd python_example/docs` - `make html` License @@ -78,6 +78,6 @@ Test call --------- ```python -import pbtest -pbtest.add(1, 2) +import python_example +python_example.add(1, 2) ``` diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 037c558..ae0a2db 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -1,5 +1,5 @@ package: - name: pbtest + name: python_example version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} build: @@ -22,7 +22,7 @@ requirements: test: imports: - - pbtest + - python_example about: summary: An example project built with pybind11. diff --git a/docs/Makefile b/docs/Makefile index 082022b..4c1a0fe 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -94,9 +94,9 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pbtest.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python_example.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pbtest.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python_example.qhc" .PHONY: applehelp applehelp: @@ -113,8 +113,8 @@ devhelp: @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/pbtest" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pbtest" + @echo "# mkdir -p $$HOME/.local/share/devhelp/python_example" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/python_example" @echo "# devhelp" .PHONY: epub diff --git a/docs/conf.py b/docs/conf.py index 5888190..f43445d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# pbtest documentation build configuration file, created by +# python_exameple documentation build configuration file, created by # sphinx-quickstart on Fri Feb 26 00:29:33 2016. # # This file is execfile()d with the current directory set to its @@ -52,7 +52,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'pbtest' +project = u'python_example' copyright = u'2016, Sylvain Corlay' author = u'Sylvain Corlay' @@ -206,7 +206,7 @@ html_static_path = ['_static'] #html_search_scorer = 'scorer.js' # Output file base name for HTML help builder. -htmlhelp_basename = 'pbtestdoc' +htmlhelp_basename = 'python_exampledoc' # -- Options for LaTeX output --------------------------------------------- @@ -228,7 +228,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'pbtest.tex', u'pbtest Documentation', + (master_doc, 'python_example.tex', u'python_example Documentation', u'Sylvain Corlay', 'manual'), ] @@ -258,7 +258,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'pbtest', u'pbtest Documentation', + (master_doc, 'python_example', u'python_example Documentation', [author], 1) ] @@ -272,8 +272,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'pbtest', u'pbtest Documentation', - author, 'pbtest', 'One line description of project.', + (master_doc, 'python_example', u'python_example Documentation', + author, 'python_example', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/index.rst b/docs/index.rst index f069b1b..998e67b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,10 +1,10 @@ -PBTest Documentation -==================== +python_example Documentation +============================ Contents: .. toctree:: :maxdepth: 2 - pbtest + python_example diff --git a/docs/make.bat b/docs/make.bat index a74b1f2..460bef9 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -127,9 +127,9 @@ if "%1" == "qthelp" ( echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\pbtest.qhcp + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\python_example.qhcp echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pbtest.ghc + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\python_example.ghc goto end ) diff --git a/docs/pbtest.rst b/docs/pbtest.rst deleted file mode 100644 index c0c64ac..0000000 --- a/docs/pbtest.rst +++ /dev/null @@ -1 +0,0 @@ -.. automodule:: pbtest diff --git a/docs/python_example.rst b/docs/python_example.rst new file mode 100644 index 0000000..2048d23 --- /dev/null +++ b/docs/python_example.rst @@ -0,0 +1 @@ +.. automodule:: python_example diff --git a/py/main.cpp b/py/main.cpp index 9cc6490..4b7f765 100644 --- a/py/main.cpp +++ b/py/main.cpp @@ -10,12 +10,12 @@ int subtract(int i, int j) { namespace py = pybind11; -PYBIND11_PLUGIN(pbtest) { - py::module m("pbtest", R"pbdoc( +PYBIND11_PLUGIN(python_example) { + py::module m("python_example", R"pbdoc( Pybind11 example plugin ----------------------- - .. currentmodule:: pbtest + .. currentmodule:: python_example .. autosummary:: :toctree: _generate diff --git a/setup.py b/setup.py index 5164d25..64edb62 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ class get_pybind_include(object): ext_modules = [ Extension( - 'pbtest', + 'python_example', ['py/main.cpp'], include_dirs=[ # Path to pybind11 headers @@ -85,11 +85,11 @@ class BuildExt(build_ext): build_ext.build_extensions(self) setup( - name='pbtest', + name='python_example', version='0.0.1', author='Sylvain Corlay', author_email='sylvain.corlay@gmail.com', - url='https://github.com/pybind/pbtest', + url='https://github.com/pybind/python_example', description='A test project using pybind11', long_description='', ext_modules=ext_modules,