[pybind11] 01/02: Initial debianization.
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Nov 22 11:45:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository pybind11.
commit 86fa97a1d4b1d74b192d6d3b3045aa6b063ee921
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Thu Nov 17 10:25:07 2016 +0000
Initial debianization.
---
debian/changelog | 5 ++
debian/clean | 1 +
debian/compat | 1 +
debian/control | 87 +++++++++++++++++++++
debian/copyright | 111 +++++++++++++++++++++++++++
debian/gbp.conf | 9 +++
debian/patches/Use-system-include-path.patch | 52 +++++++++++++
debian/patches/series | 1 +
debian/pybind11-dev.install | 1 +
debian/pybind11-doc.doc-base | 9 +++
debian/pybind11-doc.docs | 1 +
debian/rules | 23 ++++++
debian/source/format | 1 +
debian/tests/control | 15 ++++
debian/tests/example.cpp | 19 +++++
debian/upstream/metadata | 5 ++
debian/watch | 3 +
17 files changed, 344 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..f119367
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+pybind11 (1.8.1-1) UNRELEASED; urgency=low
+
+ * Initial release. (Closes: #844597)
+
+ -- Ghislain Antony Vaillant <ghisvail at gmail.com> Thu, 17 Nov 2016 10:22:18 +0000
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..6d28621
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+build/html
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d3b18a2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,87 @@
+Source: pybind11
+Maintainer: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Section: libs
+Priority: optional
+Build-Depends: cmake (>= 2.8.12),
+ debhelper (>= 10),
+ dh-python,
+ python-all,
+ python-setuptools,
+ python-sphinx,
+ python-sphinx-rtd-theme,
+ python3-all,
+ python3-dev,
+ python3-setuptools
+Standards-Version: 3.9.8
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/pybind11.git
+Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/pybind11.git
+Homepage: https://github.com/pybind/pybind11
+X-Python-Version: >= 2.7
+X-Python3-Version: >= 3.2
+
+Package: pybind11-dev
+Architecture: all
+Multi-Arch: foreign
+Section: libdevel
+Depends: ${misc:Depends},
+Suggests: libeigen3-dev,
+ pybind11-doc,
+Description: seamless operability between C++11 and Python
+ pybind11 is a lightweight header library that exposes C++ types in
+ Python and vice versa, mainly to create Python bindings of existing C++
+ code. Its goals and syntax are similar to the excellent Boost.Python
+ library by David Abrahams: to minimize boilerplate code in traditional
+ extension modules by inferring type information using compile-time
+ introspection.
+ .
+ This package provides the header-only library.
+
+Package: pybind11-doc
+Architecture: all
+Multi-Arch: foreign
+Section: doc
+Depends: ${misc:Depends},
+ ${sphinxdoc:Depends}
+Description: documentation for pybind11
+ pybind11 is a lightweight header library that exposes C++ types in
+ Python and vice versa, mainly to create Python bindings of existing C++
+ code. Its goals and syntax are similar to the excellent Boost.Python
+ library by David Abrahams: to minimize boilerplate code in traditional
+ extension modules by inferring type information using compile-time
+ introspection.
+ .
+ This package provides the documentation.
+
+Package: python-pybind11
+Architecture: all
+Multi-Arch: foreign
+Section: python
+Depends: ${misc:Depends},
+ ${python:Depends},
+ pybind11-dev (= ${binary:Version})
+Description: pybind11 helper module for Python 2
+ pybind11 is a lightweight header library that exposes C++ types in
+ Python and vice versa, mainly to create Python bindings of existing C++
+ code. Its goals and syntax are similar to the excellent Boost.Python
+ library by David Abrahams: to minimize boilerplate code in traditional
+ extension modules by inferring type information using compile-time
+ introspection.
+ .
+ This package provides pybind11 for Python 2.
+
+Package: python3-pybind11
+Architecture: all
+Multi-Arch: foreign
+Section: python
+Depends: ${misc:Depends},
+ ${python3:Depends},
+ pybind11-dev (= ${binary:Version})
+Description: pybind11 helper module for Python 3
+ pybind11 is a lightweight header library that exposes C++ types in
+ Python and vice versa, mainly to create Python bindings of existing C++
+ code. Its goals and syntax are similar to the excellent Boost.Python
+ library by David Abrahams: to minimize boilerplate code in traditional
+ extension modules by inferring type information using compile-time
+ introspection.
+ .
+ This package provides pybind11 for Python 3.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..16737d8
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,111 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: pybind11
+Upstream-Contact: Wenzel Jakob <wenzel.jakob at epfl.ch>
+Source: https://github.com/pybind/pybind11
+
+Files: *
+Copyright: 2016 Wenzel Jakob <wenzel.jakob at epfl.ch>
+License: BSD-3-Clause+CLA
+
+Files: debian/*
+Copyright: 2016 Ghislain Antony Vaillant <ghisvail at gmail.com>
+License: BSD-3-Clause
+
+Files: include/pybind11/std_bind.h
+Copyright: 2016 Sergey Lyskov and Wenzel Jakob
+License: BSD-3-Clause+CLA
+
+Files: tools/FindEigen3.cmake
+Copyright: 2006-2007 Montel Laurent <montel at kde.org>
+ 2008-2009 Gael Guennebaud <g.gael at free.fr>
+ 2009 Benoit Jacob <jacob.benoit.1 at gmail.com>
+License: BSD-2-Clause
+
+Files: tools/FindPythonLibsNew.cmake
+Copyright: 2001-2009 Kitware, Inc.
+ 2012 Continuum Analytics, Inc.
+License: BSD-3-Clause
+
+License: BSD-2-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ .
+ 3. Neither the name of the copyright holder nor the names of its contributors
+ may be used to endorse or promote products derived from this software without
+ specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-3-Clause+CLA
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ .
+ 3. Neither the name of the copyright holder nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ .
+ You are under no obligation whatsoever to provide any bug fixes, patches, or
+ upgrades to the features, functionality or performance of the source code
+ ("Enhancements") to anyone; however, if you choose to make your Enhancements
+ available either publicly, or directly to the author of this software, without
+ imposing a separate written license agreement for such Enhancements, then you
+ hereby grant the following license: a non-exclusive, royalty-free perpetual
+ license to install, use, modify, prepare derivative works, incorporate into
+ other computer software, distribute, and sublicense such enhancements or
+ derivative works thereof, in binary and source code form.
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..ea5c858
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,9 @@
+[DEFAULT]
+upstream-branch = upstream/latest
+debian-branch = debian/master
+upstream-tag = upstream/%(version)s
+debian-tag = debian/%(version)s
+pristine-tar = True
+
+[pq]
+patch-numbers = False
diff --git a/debian/patches/Use-system-include-path.patch b/debian/patches/Use-system-include-path.patch
new file mode 100644
index 0000000..8fe0e62
--- /dev/null
+++ b/debian/patches/Use-system-include-path.patch
@@ -0,0 +1,52 @@
+From: Ghislain Antony Vaillant <ghisvail at gmail.com>
+Date: Thu, 17 Nov 2016 16:34:09 +0000
+Subject: Use system include path.
+
+---
+ pybind11/__init__.py | 8 +-------
+ setup.py | 16 ----------------
+ 2 files changed, 1 insertion(+), 23 deletions(-)
+
+diff --git a/pybind11/__init__.py b/pybind11/__init__.py
+index dc0ddf6..21eab24 100644
+--- a/pybind11/__init__.py
++++ b/pybind11/__init__.py
+@@ -2,10 +2,4 @@ from ._version import version_info, __version__
+
+
+ def get_include(*args, **kwargs):
+- import os
+- try:
+- from pip import locations
+- return os.path.dirname(
+- locations.distutils_scheme('pybind11', *args, **kwargs)['headers'])
+- except ImportError:
+- return 'include'
++ return '/usr/include'
+diff --git a/setup.py b/setup.py
+index 07465bb..0b9d7f4 100644
+--- a/setup.py
++++ b/setup.py
+@@ -15,22 +15,6 @@ setup(
+ download_url='https://github.com/wjakob/pybind11/tarball/v' + __version__,
+ packages=['pybind11'],
+ license='BSD',
+- headers=[
+- 'include/pybind11/attr.h',
+- 'include/pybind11/cast.h',
+- 'include/pybind11/complex.h',
+- 'include/pybind11/descr.h',
+- 'include/pybind11/eigen.h',
+- 'include/pybind11/numpy.h',
+- 'include/pybind11/pybind11.h',
+- 'include/pybind11/stl.h',
+- 'include/pybind11/stl_bind.h',
+- 'include/pybind11/common.h',
+- 'include/pybind11/functional.h',
+- 'include/pybind11/operators.h',
+- 'include/pybind11/pytypes.h',
+- 'include/pybind11/typeid.h'
+- ],
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Intended Audience :: Developers',
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..fadbde3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Use-system-include-path.patch
diff --git a/debian/pybind11-dev.install b/debian/pybind11-dev.install
new file mode 100644
index 0000000..ebfce4b
--- /dev/null
+++ b/debian/pybind11-dev.install
@@ -0,0 +1 @@
+include/* usr/include
diff --git a/debian/pybind11-doc.doc-base b/debian/pybind11-doc.doc-base
new file mode 100644
index 0000000..4384025
--- /dev/null
+++ b/debian/pybind11-doc.doc-base
@@ -0,0 +1,9 @@
+Document: pybind11-doc
+Title: pybind11 Documentation
+Author: Wenzel Jakob
+Abstract: This is the reference documentation for pybind11.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/pybind11-doc/html/index.html
+Files: /usr/share/doc/pybind11-doc/html/*.html
diff --git a/debian/pybind11-doc.docs b/debian/pybind11-doc.docs
new file mode 100644
index 0000000..6d28621
--- /dev/null
+++ b/debian/pybind11-doc.docs
@@ -0,0 +1 @@
+build/html
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..3bcf8f0
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,23 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE = 1
+
+export PYBUILD_NAME = pybind11
+
+%:
+ dh $@ --with python2,python3,sphinxdoc --buildsystem=cmake
+
+override_dh_auto_clean:
+ dh_auto_clean
+ dh_auto_clean --buildsystem=pybuild
+
+override_dh_auto_build:
+ dh_auto_build
+ dh_auto_build --buildsystem=pybuild
+ PYTHONPATH=. http_proxy='127.0.0.1:9' \
+ sphinx-build -N -b html docs build/html
+
+override_dh_auto_install:
+ dh_auto_install
+ dh_auto_install --buildsystem=pybuild
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..dd61d08
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,15 @@
+Test-Command: c++ -shared -fPIC `python-config --cflags --ldflags` -o $AUTOPKGTEST_TMP/example.so ./debian/tests/example.cpp
+ ; PYTHONPATH=$AUTOPKGTEST_TMP python -c "import example; assert(example.add(1, 2) == 3)"
+Depends: g++ | c++-compiler, pybind11-dev, python-dev
+Restrictions: allow-stderr
+
+Test-Command: c++ -shared -fPIC `python3-config --cflags --ldflags` -o $AUTOPKGTEST_TMP/example.so ./debian/tests/example.cpp
+ ; PYTHONPATH=$AUTOPKGTEST_TMP python3 -c "import example; assert(example.add(1, 2) == 3)"
+Depends: g++ | c++-compiler, pybind11-dev, python3-dev
+Restrictions: allow-stderr
+
+Test-Command: python -c "import pybind11; print pybind11.get_include()"
+Depends: python-pybind11
+
+Test-Command: python3 -c "import pybind11; print(pybind11.get_include())"
+Depends: python3-pybind11
diff --git a/debian/tests/example.cpp b/debian/tests/example.cpp
new file mode 100644
index 0000000..1722c5e
--- /dev/null
+++ b/debian/tests/example.cpp
@@ -0,0 +1,19 @@
+// Basic example from the upstream documentation.
+//
+// See: http://pybind11.readthedocs.io/en/latest/basics.html
+
+#include <pybind11/pybind11.h>
+
+int add(int i, int j) {
+ return i + j;
+}
+
+namespace py = pybind11;
+
+PYBIND11_PLUGIN(example) {
+ py::module m("example", "pybind11 example plugin");
+
+ m.def("add", &add, "A function which adds two numbers");
+
+ return m.ptr();
+}
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
new file mode 100644
index 0000000..35c8f9f
--- /dev/null
+++ b/debian/upstream/metadata
@@ -0,0 +1,5 @@
+Bug-Database: https://github.com/pybind/pybind11/issues
+Bug-Submit: https://github.com/pybind/pybind11/issues/new
+Name: pybind11
+Repository: git at github.com:pybind/pybind11.git
+Repository-Browse: https://github.com/pybind/pybind11
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..454eb59
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/pybind11-$1\.tar\.gz/ \
+https://github.com/pybind/pybind11/tags .*/v?(\d\S*)\.tar\.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pybind11.git
More information about the debian-science-commits
mailing list