On Fri 07/02/2020 21:28, Björn Ketelaars wrote: > Diff below brings py-jupyter_core to 4.6.1, which is needed for a > pending update of www/jupyter-notebook. Changelog can be found at > https://github.com/jupyter/jupyter_core/blob/4.6.1/docs/changelog.rst > > Changes to the port: > - Follow Makefile.template > - Remove ipython as TDEP, which is not needed > - Add py-nose as TDEP > > Testing: > - 'make test' runs successfully for both python2 and python3 > - Run tested on amd64 with jupyter-notebook from ports and an update > hereof > > Comments/OK?
Oops, forgot to use '--relative' with git, new diff below. diff --git Makefile Makefile index 4962a3be9c3..b057b6fe65f 100644 --- Makefile +++ Makefile @@ -2,29 +2,26 @@ COMMENT = Jupyter core package -MODPY_EGG_VERSION = 4.4.0 +MODPY_EGG_VERSION = 4.6.1 DISTNAME = jupyter_core-${MODPY_EGG_VERSION} PKGNAME = py-${DISTNAME} -REVISION = 1 CATEGORIES = devel HOMEPAGE = https://jupyter.org/ -RUN_DEPENDS = devel/py-traitlets${MODPY_FLAVOR} -TEST_DEPENDS = devel/ipython${MODPY_FLAVOR}>=5.1.0 \ - devel/py-ipykernel${MODPY_FLAVOR}>=4.5.2 - # BSD PERMIT_PACKAGE = Yes MODULES = lang/python - MODPY_PI = Yes MODPY_SETUPTOOLS = Yes MODPY_PYTEST = Yes MODPY_PYTEST_ARGS = jupyter_core -PORTHOME = ${WRKDIR} + +RUN_DEPENDS = devel/py-traitlets${MODPY_FLAVOR} +TEST_DEPENDS = devel/py-ipykernel${MODPY_FLAVOR} \ + devel/py-nose$(MODPY_FLAVOR) FLAVORS = python3 FLAVOR ?= @@ -33,6 +30,8 @@ FLAVOR ?= TEST_DEPENDS += devel/py-mock .endif +PORTHOME = ${WRKDIR} + post-install: mv ${PREFIX}/bin/jupyter{,${MODPY_BIN_SUFFIX}} mv ${PREFIX}/bin/jupyter-migrate{,${MODPY_BIN_SUFFIX}} diff --git distinfo distinfo index 534a6e1d7d5..f92949f9480 100644 --- distinfo +++ distinfo @@ -1,2 +1,2 @@ -SHA256 (jupyter_core-4.4.0.tar.gz) = unB1SqaAMAMGxpl5ASj2+9jDBu5ZJ5dsvkitrPJAwLc= -SIZE (jupyter_core-4.4.0.tar.gz) = 63613 +SHA256 (jupyter_core-4.6.1.tar.gz) = oYPg7C6Pat3fYrCj/GoiN+PgBW04HlNtPnx+zDBn4kQ= +SIZE (jupyter_core-4.6.1.tar.gz) = 66693 diff --git patches/patch-jupyter_core_command_py patches/patch-jupyter_core_command_py index 4acbeb5f540..ef58670679e 100644 --- patches/patch-jupyter_core_command_py +++ patches/patch-jupyter_core_command_py @@ -1,7 +1,8 @@ $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(): +Index: jupyter_core/command.py +--- jupyter_core/command.py.orig ++++ jupyter_core/command.py +@@ -84,7 +84,13 @@ def list_subcommands(): if sys.platform.startswith('win'): # remove file-extension on Windows name = os.path.splitext(name)[0] @@ -16,10 +17,11 @@ $OpenBSD: patch-jupyter_core_command_py,v 1.1 2016/12/13 14:46:43 shadchin Exp $ # 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(): +@@ -245,7 +251,8 @@ def main(): sys.exit("subcommand is required") - - command = 'jupyter-' + subcommand + + command = _jupyter_abspath(subcommand) +- + if sys.version_info.major == 3 and not command.endswith('-3'): + command += '-3' try: diff --git patches/patch-jupyter_core_tests_test_command_py patches/patch-jupyter_core_tests_test_command_py index 2e56ec9a998..722657c8cd4 100644 --- patches/patch-jupyter_core_tests_test_command_py +++ patches/patch-jupyter_core_tests_test_command_py @@ -2,7 +2,7 @@ $OpenBSD: patch-jupyter_core_tests_test_command_py,v 1.2 2018/12/29 11:50:35 mar Index: jupyter_core/tests/test_command.py --- jupyter_core/tests/test_command.py.orig +++ jupyter_core/tests/test_command.py -@@ -98,16 +98,20 @@ def test_subcommand_not_found(): +@@ -99,20 +99,24 @@ def test_subcommand_not_found(): @patch.object(sys, 'argv', [__file__] + sys.argv[1:]) def test_subcommand_list(tmpdir): @@ -21,12 +21,17 @@ Index: jupyter_core/tests/test_command.py 'jupyterstuff', 'jupyter-yo-eyropa-ganymyde-callysto'): - b.join(cmd).write('') ++ b.join(cmd + cmd_sufx).write('') + c = tmpdir.mkdir("c") + for cmd in ('jupyter-baz', + 'jupyter-bop'): +- c.join(cmd).write('') + b.join(cmd + cmd_sufx).write('') path = os.pathsep.join(map(str, [a, b])) - -@@ -121,13 +125,17 @@ def test_subcommand_list(tmpdir): - ] + +@@ -132,13 +136,17 @@ def test_subcommand_list(tmpdir): + ] def test_not_on_path(tmpdir): + if sys.version_info.major == 3: @@ -44,7 +49,13 @@ Index: jupyter_core/tests/test_command.py witness_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS ME")') write_executable(witness, witness_src) -@@ -142,18 +150,22 @@ def test_not_on_path(tmpdir): +@@ -148,23 +156,27 @@ def test_not_on_path(tmpdir): + if sys.platform == 'win32': + env[str('PATHEXT')] = '.EXE' + # This won't work on windows unless +- out = check_output([sys.executable, str(jupyter), 'witness'], env=env) ++ out = check_output([sys.executable, str(jupyter), 'witness' + cmd_sufx], env=env) + assert b'WITNESS' in out def test_path_priority(tmpdir): @@ -69,3 +80,10 @@ Index: jupyter_core/tests/test_command.py witness_b_src = '#!%s\n%s\n' % (sys.executable, 'print("WITNESS B")') write_executable(witness_b, witness_b_src) +@@ -173,5 +185,5 @@ def test_path_priority(tmpdir): + env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT'] + if sys.platform == 'win32': + env[str('PATHEXT')] = '.EXE' +- out = check_output([sys.executable, str(jupyter), 'witness'], env=env) ++ out = check_output([sys.executable, str(jupyter), 'witness' + cmd_sufx], env=env) + assert b'WITNESS A' in out diff --git patches/patch-setup_py patches/patch-setup_py deleted file mode 100644 index 636fc49b102..00000000000 --- patches/patch-setup_py +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-setup_py,v 1.1 2016/12/13 14:46:43 shadchin Exp $ ---- setup.py.orig Sun Dec 4 12:31:44 2016 -+++ setup.py Sun Dec 4 12:32:04 2016 -@@ -21,7 +21,7 @@ if v[:2] < (2,7) or (v[:2] > (3,) and v[:2] < (3,3)): - - # At least we're on the python version we need, move on. - --from distutils.core import setup -+from setuptools import setup - - pjoin = os.path.join - here = os.path.abspath(os.path.dirname(__file__))