From d441f302630d38262b884db8316b96a0ec05efcb Mon Sep 17 00:00:00 2001 From: Christophe Migliorini Date: Tue, 14 Jul 2020 14:43:24 +0200 Subject: [PATCH] builds and runs under Python3.8 --- setup.py | 9 ++++----- symoroui/layout.py | 4 ++-- symoroutils/configfile.py | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index a7c4a6a..1877fc9 100644 --- a/setup.py +++ b/setup.py @@ -18,12 +18,11 @@ def apply_folder_join(item): return os.path.join(BIN_FOLDER, item) -if os.name is 'nt': +if os.name == 'nt': bin_scripts = ['symoro-bin.py'] else: bin_scripts = ['symoro-bin'] -bin_scripts = map(apply_folder_join, bin_scripts) - +bin_scripts = [apply_folder_join(x) for x in bin_scripts] setup( name='symoro', @@ -34,9 +33,9 @@ def apply_folder_join(item): scripts=bin_scripts, packages=find_packages(exclude=['*.tests', '*.tests.*', 'tests.*', 'tests']), install_requires=[ - 'sympy==0.7.3', + 'sympy>=0.7.3', 'numpy>=1.6.1', - 'wxPython>=2.8.11', + 'wxPython==4.0.7', 'PyOpenGL>=3.0.1b2' ], dependency_links=[ diff --git a/symoroui/layout.py b/symoroui/layout.py index a7bee01..2526bbb 100644 --- a/symoroui/layout.py +++ b/symoroui/layout.py @@ -121,13 +121,13 @@ def params_in_grid(self, szr_grd, elements, rows, cols, width=70): place = elements[key].place handler = getattr(self, elements[key].handler) field_id = int(elements[key].id) - if control is 'cmb': + if control == 'cmb': ctrl = wx.ComboBox( parent=self.panel, style=wx.CB_READONLY, size=(width, -1), name=name ) ctrl.Bind(wx.EVT_COMBOBOX, handler) - elif control is 'lbl': + elif control == 'lbl': ctrl = wx.StaticText( parent=self.panel, size=(width, -1), name=name ) diff --git a/symoroutils/configfile.py b/symoroutils/configfile.py index aab3cc6..d7bf0f9 100644 --- a/symoroutils/configfile.py +++ b/symoroutils/configfile.py @@ -28,7 +28,7 @@ def get_prog_config_path(): A string specifying the path to store SYMORO settings. """ prog_name = 'symoro' - if os.name is 'nt': + if os.name == 'nt': return os.path.join(os.environ['APPDATA'], prog_name) else: return os.path.join(os.environ['HOME'], '.config', prog_name)