diff --git a/configure.ac b/configure.ac
index 854a14284c6aaf0a8d0da4362d5ca8e5084d8170..959120c03d5d0e188bd38f351723c6dc4e59ac4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,9 +196,6 @@ fi
 #  fi
 #fi
 
-AM_PATH_PYTHON
-AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
-
 AC_PROG_CC
 AC_PROG_LIBTOOL
 
@@ -337,7 +334,9 @@ AC_ARG_WITH([python],
     [AS_HELP_STRING([--without-python], [ignore the presence of Python and disable PyMUSIC])])
 
 AS_IF([test "x$with_python" != "xno"],
-      [AM_PATH_PYTHON([2.6], [have_python=yes], [have_python=no])],
+      [AS_IF([test "x$with_python" != "xyes"],
+             [PYTHON="$with_python"])
+       AM_PATH_PYTHON([2.6], [have_python=yes], [have_python=no])],
       [have_python=no])
 
 AS_IF([test "x$have_python" = "xyes"], [
@@ -368,9 +367,23 @@ fi
 
 AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
 
+AC_ARG_ENABLE([deb],
+              [  --enable-deb            use deb package layout for install],
+              [case "${enableval}" in
+	         yes) deb_package=true ;;
+		 no) deb_package=false ;;
+		 *) deb_package=true ;;
+	       esac],[deb_package=false])
+AM_CONDITIONAL([DEB_PACKAGE], [test x$deb_package = xtrue])
+if test x$deb_package = xtrue; then
+  pythondir="\${exec_prefix}/lib/python3/dist-packages"
+  pyexecdir="\${exec_prefix}/lib/python3/dist-packages"
+fi
+
 # if Python is found, configure and compile PyMUSIC
 if test "x$have_python" = "xyes" ; then
  AC_CONFIG_FILES(pymusic/Makefile)
+ AC_CONFIG_FILES(pymusic/examples/Makefile)
  AC_CONFIG_FILES(pymusic/setup.py)
 fi
 
diff --git a/debian/changelog b/debian/changelog
index f457caa02c1a1a7280385a132e3f1d7dfdc05149..9e99922f77595d5390c314cdb3068df9347ed056 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 music (1.1.16-1) unstable; urgency=medium
 
   * Upstream release 1.1.16.
+  * Added package python3-music (python bindings for MUSIC).
 
  -- Mikael Djurfeldt <mdj@debian.org>  Sun, 01 Dec 2019 22:31:44 +0100
 
diff --git a/debian/control b/debian/control
index 38af3a9b52cebdb7f12dedc295ef56ac863b6383..54cd3d518ad40237728a08833a38d9e6ef91c071 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,11 @@ Build-Depends:
  texlive-latex-extra,
  asymptote,
  chrpath,
-Standards-Version: 3.9.8
+ dh-python,
+ python3,
+ cython,
+ python-mpi4py
+Standards-Version: 4.4.1
 Section: libs
 Homepage: http://software.incf.org/software/music/home
 
@@ -44,6 +48,18 @@ Description: Multi-Simulation Coordinator for MPI -- Runtime library
  .
  This package contains the MUSIC library.
 
+Package: python3-music
+Architecture: any
+Depends: python3-mpi4py, python3-six, ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Description: Multi-Simulation Coordinator for MPI -- Runtime library
+ MUSIC allows spike events and continuous time series to be
+ communicated between parallel applications within the same MPI job in
+ a cluster computer.  Typical usage cases are connecting models
+ developed for different simulators and connecting a parallel
+ simulator to a post-processing tool.
+ .
+ This package contains the MUSIC library python bindings.
+
 Package: music-bin
 Section: science
 Architecture: any
diff --git a/debian/music-bin.install b/debian/music-bin.install
index 68671debc083d2e817ec1d0c8e43bb284d0ff840..8b7df7b20134f7d214d3396458161fb6c8c34168 100644
--- a/debian/music-bin.install
+++ b/debian/music-bin.install
@@ -1,2 +1,13 @@
-usr/bin/*
-usr/share/man/man1/*
+usr/bin/music
+usr/lib/*/music-*
+usr/share/man/man1/contsink.1
+usr/share/man/man1/eventcounter.1
+usr/share/man/man1/eventgenerator.1
+usr/share/man/man1/eventlogger.1
+usr/share/man/man1/eventselect.1
+usr/share/man/man1/eventsink.1
+usr/share/man/man1/eventsource.1
+usr/share/man/man1/messagesource.1
+usr/share/man/man1/music.1
+usr/share/man/man1/viewevents.1
+usr/share/music-*
diff --git a/debian/python3-music.docs b/debian/python3-music.docs
new file mode 100644
index 0000000000000000000000000000000000000000..2ca0cf482764c94e7c015e86b13e3c10749f079c
--- /dev/null
+++ b/debian/python3-music.docs
@@ -0,0 +1,3 @@
+AUTHORS
+README
+NEWS
diff --git a/debian/python3-music.examples b/debian/python3-music.examples
new file mode 100644
index 0000000000000000000000000000000000000000..75133a2fcc9a71ce2e10a1ae721020d639602214
--- /dev/null
+++ b/debian/python3-music.examples
@@ -0,0 +1 @@
+usr/share/music-*/examples/python/*
diff --git a/debian/python3-music.install b/debian/python3-music.install
new file mode 100644
index 0000000000000000000000000000000000000000..5996d50b1f447eb925368faa551cbb1debc30a3e
--- /dev/null
+++ b/debian/python3-music.install
@@ -0,0 +1,4 @@
+usr/lib/python*/dist-packages/music-*.egg-info
+usr/lib/python*/dist-packages/music/*.py
+usr/lib/python*/dist-packages/music/*.so
+usr/lib/python*/dist-packages/music/config/*.py
diff --git a/debian/rules b/debian/rules
index 3efd6e06a0dfd64fc17fd1c5d1fbccb6f5f70a26..53d57d977ba175f2c79f8ab35cbff97e79fe67dd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,10 @@
 #export DH_VERBOSE=1
 
 %:
-	dh $@
+	dh $@ --parallel --with python3
+
+override_dh_auto_configure:
+	dh_auto_configure -- --enable-deb --with-python=python3
 
 override_dh_auto_install:
 	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
diff --git a/pymusic/Makefile.am b/pymusic/Makefile.am
index 6ec0b64865195bdef621de71c6ff9fd0598f4cbb..beec0f4fa88dfe92598686db29b43c299e691bf9 100644
--- a/pymusic/Makefile.am
+++ b/pymusic/Makefile.am
@@ -1,3 +1,6 @@
+## Process this file with Automake to create Makefile.in
+
+SUBDIRS = examples
 
 EXTRA_DIST = setup.py.in tests.py pymusic.pyx pymusic.pxd pybuffer.pyx pybuffer.pxd \
              music/__init__.py music/music_c.h music/pybuffer.pxd music/pymusic.pxd \
@@ -47,13 +50,21 @@ pybuffer_la_CXXFLAGS = \
 	$(PYBUFFER_CXXFLAGS) \
 	$(MPI_CXXFLAGS)
 
+if DEB_PACKAGE
+install-exec-hook:
+	$(PYTHON) setup.py build \
+	  --build-base=$(abs_builddir)/build install \
+	  --install-layout=deb \
+	  --prefix=$(DESTDIR)$(prefix)
+else
 install-exec-hook:
 	$(PYTHON) setup.py build \
 	  --build-base=$(abs_builddir)/build install \
-	  --prefix=$(DESTDIR)$(prefix) \
+	  --prefix=$(DESTDIR)$(prefix)
 	  --install-lib=$(DESTDIR)$(pyexecdir) \
 	  --install-scripts=$(DESTDIR)$(bindir) \
 	  --install-data=$(DESTDIR)$(pkgdatadir)
+endif
 
 clean-local:
 	-rm -rf $(abs_builddir)/build
diff --git a/pymusic/examples/Makefile.am b/pymusic/examples/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..8bc640070d790d01f50f1d2423d774de703264ed
--- /dev/null
+++ b/pymusic/examples/Makefile.am
@@ -0,0 +1,16 @@
+## Process this file with Automake to create Makefile.in
+
+exdatadir = $(datadir)/@PACKAGE@-@PACKAGE_VERSION@/examples/python
+dist_exdata_DATA = eventlogger.py   \
+		   event.music      \
+		   eventsource.py   \
+		   helloworld.music \
+		   messagelogger.py \
+		   message.music    \
+		   message.py       \
+		   messagesource.py \
+		   receivers.py     \
+		   senders.py       \
+		   test.music       \
+		   testsink.py      \
+		   testsource.py
diff --git a/pymusic/examples/eventlogger.py b/pymusic/examples/eventlogger.py
index 93c2fa911e908ef9a09c29400fc53d2d883c1ded..eba87165f1b9e8ffd27efa61b53bf4cae8732a50 100755
--- a/pymusic/examples/eventlogger.py
+++ b/pymusic/examples/eventlogger.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import music
 import sys
diff --git a/pymusic/examples/eventsource.py b/pymusic/examples/eventsource.py
index 4deaed3f1f2f97a3992f8d51ec2fc19fa1a17108..6461bb899548978eafbde401870d0beef9168ec0 100755
--- a/pymusic/examples/eventsource.py
+++ b/pymusic/examples/eventsource.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import music
 from itertools import groupby, takewhile
diff --git a/pymusic/examples/messagelogger.py b/pymusic/examples/messagelogger.py
index 9e1a6de174f07d9abd98c0810bce1c42b4de5ef8..cea1146bb94c662bf37f3f55b1e1dca055316e79 100755
--- a/pymusic/examples/messagelogger.py
+++ b/pymusic/examples/messagelogger.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import music
 import sys
diff --git a/pymusic/examples/messagesource.py b/pymusic/examples/messagesource.py
index 02dd3bfecbca809cd631c6ba3536fd4642ef83d5..442e89f4413466cc82abe4474d67607e2fe71c00 100755
--- a/pymusic/examples/messagesource.py
+++ b/pymusic/examples/messagesource.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import music
 from itertools import groupby, takewhile
diff --git a/pymusic/examples/receivers.py b/pymusic/examples/receivers.py
index cfac938391b46b840b01521d559089bd6a9dccfd..2a796bdb6a6b12ad14269ba5204af247d5a67c36 100755
--- a/pymusic/examples/receivers.py
+++ b/pymusic/examples/receivers.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 
 import music
 
diff --git a/pymusic/examples/senders.py b/pymusic/examples/senders.py
index 5cbdc223bd7fb1af3234c58c5454d652370879a4..2ea85ea8175b966f03abe93ba41808da10167806 100755
--- a/pymusic/examples/senders.py
+++ b/pymusic/examples/senders.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 
 import music
 
diff --git a/pymusic/examples/testsink.py b/pymusic/examples/testsink.py
index c1ab1b616e18baa24081b3ed851b66c8af3dfebb..bc9f4e1b3dc4476ad4d7634bb9f848946d74f701 100755
--- a/pymusic/examples/testsink.py
+++ b/pymusic/examples/testsink.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import music
 import sys
diff --git a/pymusic/examples/testsource.py b/pymusic/examples/testsource.py
index 660b0890f60cd0a27c4455e0916166b93e462c17..fc8024892d6c7232e9f62d56b304892c9608b72e 100755
--- a/pymusic/examples/testsource.py
+++ b/pymusic/examples/testsource.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 import music
 from itertools import groupby, takewhile