From 97dc81057facb749325eb2c4931a4bc08e788355 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Mon, 1 Feb 2016 09:51:35 -0500 Subject: [PATCH] Add version info and release instructions for pybind11 --- .gitignore | 4 ++++ docs/release.rst | 12 ++++++++++++ pybind11/__init__.py | 1 + pybind11/_version.py | 2 ++ setup.py | 5 +++-- 5 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 docs/release.rst create mode 100644 pybind11/__init__.py create mode 100644 pybind11/_version.py diff --git a/.gitignore b/.gitignore index f6526d1c..a86da898 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,7 @@ MANIFEST /.ninja_* /*.ninja /docs/.build +*.py[co] +*.egg-info +*~ +.DS_Store diff --git a/docs/release.rst b/docs/release.rst new file mode 100644 index 00000000..34e40ac9 --- /dev/null +++ b/docs/release.rst @@ -0,0 +1,12 @@ +To release a new version of pybind11: + +- Update `_version.py` (set release version, remove 'dev') +- `git add` and `git commit`. +- `python setup.py sdist upload`. +- `python setup.py bdist_wheel upload`. +- `git tag -a X.X -m 'Release tag comment'`. +- Update `_version.py` (add 'dev' and increment minor). +- `git add` and `git commit`. `git push`. `git push --tags`. + +The remote for the last `git push --tags` should be the main repository for +pybind11. diff --git a/pybind11/__init__.py b/pybind11/__init__.py new file mode 100644 index 00000000..4f1853b7 --- /dev/null +++ b/pybind11/__init__.py @@ -0,0 +1 @@ +from ._version import version_info, __version__ diff --git a/pybind11/_version.py b/pybind11/_version.py new file mode 100644 index 00000000..15df25bb --- /dev/null +++ b/pybind11/_version.py @@ -0,0 +1,2 @@ +version_info = (1, 2, 'dev0') +__version__ = '.'.join(map(str, version_info)) diff --git a/setup.py b/setup.py index 2f02e6a3..ae1ca8bf 100644 --- a/setup.py +++ b/setup.py @@ -3,16 +3,17 @@ # Setup script for PyPI; use CMakeFile.txt to build the example application from setuptools import setup +from pybind11 import __version__ setup( name='pybind11', - version='1.0', + version=__version__, description='Seamless operability between C++11 and Python', author='Wenzel Jakob', author_email='wenzel@inf.ethz.ch', url='https://github.com/wjakob/pybind11', download_url='https://github.com/wjakob/pybind11/tarball/v1.0', - packages=[], + packages=['pybind11'], license='BSD', headers=[ 'include/pybind11/attr.h',