On Sun, Jan 17, 2016 at 12:57:28PM +0500, Alexandr Shadchin wrote:
> Hi,
> 
> This diff updates ipython to the latest release.
> Tested on amd64. Add python3 flavor.
> 
> Also update and add py3 flavor for related ports.
> 
> Comments ? OK ?
> 

Correct diff for py-jupyter_core (I forgot add patches)

-- 
Alexandr Shadchin

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/py-jupyter_core/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile    1 Dec 2015 22:34:59 -0000       1.1.1.1
+++ Makefile    18 Jan 2016 08:35:16 -0000
@@ -5,16 +5,18 @@ COMMENT =             Jupyter core package
 MODPY_EGG_VERSION =    4.0.6
 DISTNAME =             jupyter_core-${MODPY_EGG_VERSION}
 PKGNAME =              py-${DISTNAME}
+REVISION =             0
 
 CATEGORIES =           devel
 
 HOMEPAGE =             http://jupyter.org/
 
-RUN_DEPENDS =          devel/py-traitlets
+MAINTAINER =           Alexandr Shadchin <[email protected]>
+
+RUN_DEPENDS =          devel/py-traitlets${MODPY_FLAVOR}
 TEST_DEPENDS =         ${RUN_DEPENDS} \
-                       devel/py-test \
-                       devel/py-mock \
-                       devel/ipython>=4.0.0
+                       devel/ipython${MODPY_FLAVOR}>=4.0.0 \
+                       devel/py-test${MODPY_FLAVOR}
 
 # BSD
 PERMIT_PACKAGE_CDROM = Yes
@@ -22,7 +24,21 @@ PERMIT_PACKAGE_CDROM =       Yes
 MODULES =              lang/python
 MODPY_PI =             Yes
 
+FLAVORS =              python3
+FLAVOR ?=
+
+.if !${FLAVOR:Mpython3}
+TEST_DEPENDS +=                devel/py-mock
+.endif
+
+.if ${FLAVOR:Mpython3}
+post-install:
+       mv ${PREFIX}/bin/jupyter ${PREFIX}/bin/jupyter${MODPY_BIN_SUFFIX}
+       mv ${PREFIX}/bin/jupyter-migrate 
${PREFIX}/bin/jupyter-migrate${MODPY_BIN_SUFFIX}
+.endif
+
+# test_subcommand_list fail on python3
 do-test:
-       cd ${WRKSRC} && ${LOCALBASE}/bin/py.test jupyter_core
+       cd ${WRKSRC} && ${MODPY_BIN} -m pytest jupyter_core
 
 .include <bsd.port.mk>
Index: patches/patch-jupyter_core_command_py
===================================================================
RCS file: patches/patch-jupyter_core_command_py
diff -N patches/patch-jupyter_core_command_py
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-jupyter_core_command_py       18 Jan 2016 08:35:16 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+--- jupyter_core/command.py.orig       Thu Sep 17 12:28:33 2015
++++ jupyter_core/command.py    Wed Jan 13 15:41:56 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
+@@ -147,6 +153,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:
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/py-jupyter_core/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   1 Dec 2015 22:34:59 -0000       1.1.1.1
+++ pkg/PLIST   18 Jan 2016 08:35:16 -0000
@@ -1,71 +1,76 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2015/12/01 22:34:59 edd Exp $
-bin/jupyter
-bin/jupyter-migrate
+bin/jupyter${MODPY_BIN_SUFFIX}
+bin/jupyter-migrate${MODPY_BIN_SUFFIX}
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/__init__.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/__init__.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/__main__.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/__main__.pyc
+${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/jupyter_core/${MODPY_PYCACHE}/
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/${MODPY_PYCACHE}__main__.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/${MODPY_PYCACHE}application.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/${MODPY_PYCACHE}command.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/${MODPY_PYCACHE}migrate.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/${MODPY_PYCACHE}paths.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/${MODPY_PYCACHE}version.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/application.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/application.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/command.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/command.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/migrate.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/migrate.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/paths.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/paths.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/__init__.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/__init__.pyc
+${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/${MODPY_PYCACHE}/
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/${MODPY_PYCACHE}mocking.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/${MODPY_PYCACHE}test_application.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/${MODPY_PYCACHE}test_command.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/${MODPY_PYCACHE}test_migrate.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/${MODPY_PYCACHE}test_paths.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/nbextensions/
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/nbextensions/myext.js
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/
+${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/${MODPY_PYCACHE}/
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/${MODPY_PYCACHE}ipython_config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/${MODPY_PYCACHE}ipython_console_config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/${MODPY_PYCACHE}ipython_kernel_config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/${MODPY_PYCACHE}ipython_nbconvert_config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/${MODPY_PYCACHE}ipython_notebook_config.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_console_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_console_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_kernel_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_kernel_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_nbconvert_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_nbconvert_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_notebook_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_notebook_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/static/
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/static/custom/
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/static/custom/custom.css
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython/profile_default/static/custom/custom.js
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/
+${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/${MODPY_PYCACHE}/
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/${MODPY_PYCACHE}ipython_config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/${MODPY_PYCACHE}ipython_console_config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/${MODPY_PYCACHE}ipython_kernel_config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/${MODPY_PYCACHE}ipython_nbconvert_config.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/${MODPY_PYCACHE}ipython_notebook_config.${MODPY_PYC_MAGIC_TAG}pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_console_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_console_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_kernel_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_kernel_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_nbconvert_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_nbconvert_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_notebook_config.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/ipython_notebook_config.pyc
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/static/
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/static/custom/
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/static/custom/custom.css
 
lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/dotipython_empty/profile_default/static/custom/custom.js
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/mocking.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/mocking.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/test_application.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/test_application.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/test_command.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/test_command.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/test_migrate.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/test_migrate.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/test_paths.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/tests/test_paths.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/utils/
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/utils/__init__.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/utils/__init__.pyc
+${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/jupyter_core/utils/${MODPY_PYCACHE}/
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/utils/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
+lib/python${MODPY_VERSION}/site-packages/jupyter_core/utils/${MODPY_PYCACHE}shutil_which.${MODPY_PYC_MAGIC_TAG}pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/utils/shutil_which.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/utils/shutil_which.pyc
 lib/python${MODPY_VERSION}/site-packages/jupyter_core/version.py
-lib/python${MODPY_VERSION}/site-packages/jupyter_core/version.pyc

Reply via email to