Browse Source

Rename all the things

master
Sylvain Corlay 9 years ago
parent
commit
cf9a89e323
  1. 18
      README.md
  2. 4
      conda.recipe/meta.yaml
  3. 8
      docs/Makefile
  4. 14
      docs/conf.py
  5. 6
      docs/index.rst
  6. 4
      docs/make.bat
  7. 1
      docs/pbtest.rst
  8. 1
      docs/python_example.rst
  9. 6
      py/main.cpp
  10. 6
      setup.py

18
README.md

@ -1,5 +1,5 @@
pbtest python_example
====== ==============
An example project built with [pybind11](https://github.com/pybind/pybind11). An example project built with [pybind11](https://github.com/pybind/pybind11).
@ -9,13 +9,13 @@ Installation
**On Unix (Linux, OS X)** **On Unix (Linux, OS X)**
- clone this repository - clone this repository
- `pip install ./pbtest` - `pip install ./python_example`
**On Windows (Requires Visual Studio 2015)** **On Windows (Requires Visual Studio 2015)**
- For Python 3.5: - For Python 3.5:
- clone this repository - clone this repository
- `pip install ./pbtest` - `pip install ./pyton_example`
- For earlier versions of Python, including Python 2.7: - For earlier versions of Python, including Python 2.7:
Pybind11 requires a C++11 compliant compiler (i.e. Visual Studio 2015 on Pybind11 requires a C++11 compliant compiler (i.e. Visual Studio 2015 on
@ -27,9 +27,9 @@ Installation
- `"%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64` - `"%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64`
- `set DISTUTILS_USE_SDK=1` - `set DISTUTILS_USE_SDK=1`
- `set MSSdk=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. 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 The following command generates HTML-based reference documentation; for other
formats please refer to the Sphinx manual: formats please refer to the Sphinx manual:
- `cd pbtest/docs` - `cd python_example/docs`
- `make html` - `make html`
License License
@ -78,6 +78,6 @@ Test call
--------- ---------
```python ```python
import pbtest import python_example
pbtest.add(1, 2) python_example.add(1, 2)
``` ```

4
conda.recipe/meta.yaml

@ -1,5 +1,5 @@
package: package:
name: pbtest name: python_example
version: {{ environ.get('GIT_DESCRIBE_TAG', '') }} version: {{ environ.get('GIT_DESCRIBE_TAG', '') }}
build: build:
@ -22,7 +22,7 @@ requirements:
test: test:
imports: imports:
- pbtest - python_example
about: about:
summary: An example project built with pybind11. summary: An example project built with pybind11.

8
docs/Makefile

@ -94,9 +94,9 @@ qthelp:
@echo @echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:" ".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 "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pbtest.qhc" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python_example.qhc"
.PHONY: applehelp .PHONY: applehelp
applehelp: applehelp:
@ -113,8 +113,8 @@ devhelp:
@echo @echo
@echo "Build finished." @echo "Build finished."
@echo "To view the help file:" @echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/pbtest" @echo "# mkdir -p $$HOME/.local/share/devhelp/python_example"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pbtest" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/python_example"
@echo "# devhelp" @echo "# devhelp"
.PHONY: epub .PHONY: epub

14
docs/conf.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- 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. # sphinx-quickstart on Fri Feb 26 00:29:33 2016.
# #
# This file is execfile()d with the current directory set to its # This file is execfile()d with the current directory set to its
@ -52,7 +52,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'pbtest' project = u'python_example'
copyright = u'2016, Sylvain Corlay' copyright = u'2016, Sylvain Corlay'
author = u'Sylvain Corlay' author = u'Sylvain Corlay'
@ -206,7 +206,7 @@ html_static_path = ['_static']
#html_search_scorer = 'scorer.js' #html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'pbtestdoc' htmlhelp_basename = 'python_exampledoc'
# -- Options for LaTeX output --------------------------------------------- # -- Options for LaTeX output ---------------------------------------------
@ -228,7 +228,7 @@ latex_elements = {
# (source start file, target name, title, # (source start file, target name, title,
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
latex_documents = [ latex_documents = [
(master_doc, 'pbtest.tex', u'pbtest Documentation', (master_doc, 'python_example.tex', u'python_example Documentation',
u'Sylvain Corlay', 'manual'), u'Sylvain Corlay', 'manual'),
] ]
@ -258,7 +258,7 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
(master_doc, 'pbtest', u'pbtest Documentation', (master_doc, 'python_example', u'python_example Documentation',
[author], 1) [author], 1)
] ]
@ -272,8 +272,8 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
(master_doc, 'pbtest', u'pbtest Documentation', (master_doc, 'python_example', u'python_example Documentation',
author, 'pbtest', 'One line description of project.', author, 'python_example', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]

6
docs/index.rst

@ -1,10 +1,10 @@
PBTest Documentation python_example Documentation
==================== ============================
Contents: Contents:
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
pbtest python_example

4
docs/make.bat

@ -127,9 +127,9 @@ if "%1" == "qthelp" (
echo. echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^ echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this: .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.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pbtest.ghc echo.^> assistant -collectionFile %BUILDDIR%\qthelp\python_example.ghc
goto end goto end
) )

1
docs/pbtest.rst

@ -1 +0,0 @@
.. automodule:: pbtest

1
docs/python_example.rst

@ -0,0 +1 @@
.. automodule:: python_example

6
py/main.cpp

@ -10,12 +10,12 @@ int subtract(int i, int j) {
namespace py = pybind11; namespace py = pybind11;
PYBIND11_PLUGIN(pbtest) { PYBIND11_PLUGIN(python_example) {
py::module m("pbtest", R"pbdoc( py::module m("python_example", R"pbdoc(
Pybind11 example plugin Pybind11 example plugin
----------------------- -----------------------
.. currentmodule:: pbtest .. currentmodule:: python_example
.. autosummary:: .. autosummary::
:toctree: _generate :toctree: _generate

6
setup.py

@ -21,7 +21,7 @@ class get_pybind_include(object):
ext_modules = [ ext_modules = [
Extension( Extension(
'pbtest', 'python_example',
['py/main.cpp'], ['py/main.cpp'],
include_dirs=[ include_dirs=[
# Path to pybind11 headers # Path to pybind11 headers
@ -85,11 +85,11 @@ class BuildExt(build_ext):
build_ext.build_extensions(self) build_ext.build_extensions(self)
setup( setup(
name='pbtest', name='python_example',
version='0.0.1', version='0.0.1',
author='Sylvain Corlay', author='Sylvain Corlay',
author_email='sylvain.corlay@gmail.com', 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', description='A test project using pybind11',
long_description='', long_description='',
ext_modules=ext_modules, ext_modules=ext_modules,

Loading…
Cancel
Save