$OpenBSD: patch-jupyter_core_command_py,v 1.1 2016/12/13 14:46:43 shadchin Exp $
--- jupyter_core/command.py.orig	Tue Sep 13 18:22:49 2016
+++ jupyter_core/command.py	Thu Sep 29 17:04:28 2016
@@ -77,7 +77,13 @@ def list_subcommands():
                 if sys.platform.startswith('win'):
                     # remove file-extension on Windows
                     name = os.path.splitext(name)[0]
-                subcommand_tuples.add(tuple(name.split('-')[1:]))
+                if name == 'jupyter-3':
+                    continue
+                if sys.version_info.major == 3 and name.endswith('-3'):
+                    name = name.replace('-3', '')
+                    subcommand_tuples.add(tuple(name.split('-')[1:]))
+                elif sys.version_info.major == 2 and not name.endswith('-3'):
+                    subcommand_tuples.add(tuple(name.split('-')[1:]))
     # build a set of subcommand strings, excluding subcommands whose parents are defined
     subcommands = set()
     # Only include `jupyter-foo-bar` if `jupyter-foo` is not already present
@@ -182,6 +188,8 @@ def main():
         sys.exit("subcommand is required")
     
     command = 'jupyter-' + subcommand
+    if sys.version_info.major == 3 and not command.endswith('-3'):
+        command += '-3'
     try:
         _execvp(command, sys.argv[1:])
     except OSError as e:
