From 6cc96cff6fee42ba0eda8e93ab06ea71c3c78b2d Mon Sep 17 00:00:00 2001 From: Douglas Thor Date: Mon, 11 Apr 2016 14:02:46 -0700 Subject: [PATCH] Fixed imports for Py3. Was working when I tested, but not when I tried using it... + also added echo for path to .gitlab-ci.yml --- .gitlab-ci.yml | 1 + CHANGELOG.md | 4 ++++ wafer_map/__init__.py | 2 +- wafer_map/example.py | 11 ++++++++--- wafer_map/gen_fake_data.py | 11 ++++++++--- wafer_map/wm_app.py | 14 ++++++++++---- wafer_map/wm_core.py | 11 ++++++++--- wafer_map/wm_frame.py | 8 ++++++-- wafer_map/wm_legend.py | 8 ++++++-- 9 files changed, 52 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bb30bf..77e24d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,7 @@ python34_x64-pip-install: script: - call C:\WinPython34\scripts\env.bat - python -c "import sys;print('='*80+'\n{}\n'.format(sys.version)+'-'*80)" + - echo %VENV_ROOT%\python34_x64\%CI_PROJECT_ID%__%CI_BUILD_REF_NAME% - python -m venv --clear %VENV_ROOT%\python34_x64\%CI_PROJECT_ID%__%CI_BUILD_REF_NAME% - call %VENV_ROOT%\python34_x64\%CI_PROJECT_ID%__%CI_BUILD_REF_NAME%\Scripts\activate.bat # Can't upgrade pip in place. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fd6fe5..dfadf6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog This document highlights high-level changes made to this program. +## 1.0.16 / 2016-04-11 + + + Fixed imports for Py3 + ## 1.0.15 / 2016-04-11 + Version bump because of a messed up PyPI release. diff --git a/wafer_map/__init__.py b/wafer_map/__init__.py index 4ac59d5..0c9ec42 100644 --- a/wafer_map/__init__.py +++ b/wafer_map/__init__.py @@ -10,7 +10,7 @@ """ ### Constants ############################################################### -__version__ = "1.0.15" +__version__ = "1.0.16" __project_url__ = "https://github.com/dougthor42/wafer_map" __project_name__ = "wafer_map" __description__ = "Semiconductor Wafer Mapping" diff --git a/wafer_map/example.py b/wafer_map/example.py index 57eb763..c7be1b5 100644 --- a/wafer_map/example.py +++ b/wafer_map/example.py @@ -32,9 +32,14 @@ # Third-Party import wx -import gen_fake_data -import wm_core -import wm_app +if PY2: + import gen_fake_data + import wm_core + import wm_app +else: + from . import gen_fake_data + from . import wm_core + from . import wm_app __author__ = "Douglas Thor" __version__ = "v0.4.0" diff --git a/wafer_map/gen_fake_data.py b/wafer_map/gen_fake_data.py index dc34073..5136b20 100644 --- a/wafer_map/gen_fake_data.py +++ b/wafer_map/gen_fake_data.py @@ -28,9 +28,14 @@ import math import random -import wm_info -import wm_utils -import wm_constants as wm_const +if PY2: + import wm_info + import wm_utils + import wm_constants as wm_const +else: + from . import wm_info + from . import wm_utils + from . import wm_constants as wm_const # Python2 Compatibility diff --git a/wafer_map/wm_app.py b/wafer_map/wm_app.py index 0bd6506..2fe242f 100644 --- a/wafer_map/wm_app.py +++ b/wafer_map/wm_app.py @@ -30,10 +30,16 @@ import wx # Package / Application -import wm_frame -import wm_info -import gen_fake_data -import wm_constants as wm_const +if PY2: + import wm_frame + import wm_info + import gen_fake_data + import wm_constants as wm_const +else: + from . import wm_frame + from . import wm_info + from . import gen_fake_data + from . import wm_constants as wm_const class WaferMapApp(object): diff --git a/wafer_map/wm_core.py b/wafer_map/wm_core.py index 7688671..8dc1742 100644 --- a/wafer_map/wm_core.py +++ b/wafer_map/wm_core.py @@ -42,9 +42,14 @@ import wx.lib.colourselect as csel # Package / Application -import wm_legend -import wm_utils -import wm_constants as wm_const +if PY2: + import wm_legend + import wm_utils + import wm_constants as wm_const +else: + from . import wm_legend + from . import wm_utils + from . import wm_constants as wm_const # Module-level TODO list. diff --git a/wafer_map/wm_frame.py b/wafer_map/wm_frame.py index 907411b..94cc2c2 100644 --- a/wafer_map/wm_frame.py +++ b/wafer_map/wm_frame.py @@ -32,8 +32,12 @@ import wx # Package / Application -import wm_core -import wm_constants as wm_const +if PY2: + import wm_core + import wm_constants as wm_const +else: + from . import wm_core + from . import wm_constants as wm_const class WaferMapWindow(wx.Frame): diff --git a/wafer_map/wm_legend.py b/wafer_map/wm_legend.py index 92337f3..c6b00ca 100644 --- a/wafer_map/wm_legend.py +++ b/wafer_map/wm_legend.py @@ -33,8 +33,12 @@ import wx.lib.colourselect as csel # Package / Application -import wm_utils -import wm_constants as wm_const +if PY2: + import wm_utils + import wm_constants as wm_const +else: + from . import wm_utils + from . import wm_constants as wm_const # TODO: Update to Bezier Curves for colors. See http://bsou.io/p/3