From d1a75d511f6c8c0ffeaa5614c5661de2943b1085 Mon Sep 17 00:00:00 2001 From: Matthew Craig Date: Wed, 25 Sep 2019 08:45:46 -0500 Subject: [PATCH 1/2] Remove vpnotebook dependency It is no longer needed (it used to import numpy, and a couple of other things) because we handle imports in the core vpython code. Editorial: custom kernels installed in --user can also mask kernels in --sys-prefix (i.e. in a virtual environment) leading to confusion about which python is actually running. --- setup.py | 2 +- vpython.recipe/meta.yaml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 82a589f..5c576de 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ import versioneer -install_requires = ['jupyter', 'vpnotebook', 'numpy', 'ipykernel', +install_requires = ['jupyter', 'numpy', 'ipykernel', 'autobahn>=18.8.2'] if sys.version_info.major == 3 and sys.version_info.minor >= 5: diff --git a/vpython.recipe/meta.yaml b/vpython.recipe/meta.yaml index 6d4c940..96036cf 100644 --- a/vpython.recipe/meta.yaml +++ b/vpython.recipe/meta.yaml @@ -31,7 +31,6 @@ requirements: - python - setuptools - jupyter - - vpnotebook - ujson - cython - wheel @@ -39,7 +38,6 @@ requirements: run: - python - jupyter - - vpnotebook - ujson - autobahn >=18.8.2 - numpy From 561a1e5e2c41584fc3f6a6891804b2e4ed29e896 Mon Sep 17 00:00:00 2001 From: Matthew Craig Date: Wed, 25 Sep 2019 09:04:53 -0500 Subject: [PATCH 2/2] Remove run_test.py in conda recipe in favor of a simple import test The stuff in run_test.py was checking for a kernel that is no longer required, and working around import issues in Python 2.7 and 3.4, neither of which is supported. --- vpython.recipe/meta.yaml | 4 ++++ vpython.recipe/run_test.py | 26 -------------------------- 2 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 vpython.recipe/run_test.py diff --git a/vpython.recipe/meta.yaml b/vpython.recipe/meta.yaml index 96036cf..b3a317c 100644 --- a/vpython.recipe/meta.yaml +++ b/vpython.recipe/meta.yaml @@ -43,6 +43,10 @@ requirements: - numpy - ipykernel +test: + imports: + - vpython + outputs: # Someday, maybe: - type: wheel - type: conda diff --git a/vpython.recipe/run_test.py b/vpython.recipe/run_test.py deleted file mode 100644 index 4e3e495..0000000 --- a/vpython.recipe/run_test.py +++ /dev/null @@ -1,26 +0,0 @@ -import sys - -from jupyter_client import kernelspec - - -# If we get this far, vpnotebook ought to have been installed and -# we should have a vpython kernel. - -assert 'vpython' in kernelspec.find_kernel_specs().keys() - -# Python 2.7 and 3.4: -major, minor = sys.version_info[0:2] -if major == 2 or (major == 3 and minor == 4): - # Make sure vpython is installed. The import is expected to fail because it - # tries to connect to a jupyter comm, and we are not running a notebook. - # The test is really that the error message expected if that is the - # failure is the actual error message. - try: - import vpython - except Exception as e: - assert "The non-notebook version of vpython requires" in str(e) - except OSError as e: - if sys.platform.startswith('win'): - assert "The system cannot find the path specified" in str(e) - else: - assert "No such file or directory" in str(e)