From a648a472293b1861798654932da597d18ca919e8 Mon Sep 17 00:00:00 2001 From: Arnaud Belcour Date: Fri, 16 May 2025 14:15:04 +0200 Subject: [PATCH 1/2] Fix wrong path separator for Windows. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 20a4a2531..fb5d71555 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,13 @@ from setuptools import setup, Extension from glob import glob -from os.path import isfile +from os.path import isfile, sep from Cython.Build import cythonize def make_extension(path): # to create cython extensions the way we want - name = path.replace('/', '.')[:-len('.pyx')] # / -> . and remove .pyx + name = path.replace(sep, '.')[:-len('.pyx')] # / -> . and remove .pyx return Extension(name, [path], extra_compile_args=['-O3']) setup( From 255a11be01873b0cc09cbcc3933f12c7cd34d54d Mon Sep 17 00:00:00 2001 From: Arnaud Belcour Date: Fri, 16 May 2025 14:52:01 +0200 Subject: [PATCH 2/2] Fix KeyError 'HOME' on Windows. --- ete4/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ete4/config.py b/ete4/config.py index 4de6cb991..5a23000f2 100644 --- a/ete4/config.py +++ b/ete4/config.py @@ -11,7 +11,7 @@ # Helper function to define global ETE_* variables. def ete_path(xdg_var, default): - return os.environ.get(xdg_var, os.environ['HOME'] + default) + '/ete' + return os.environ.get(xdg_var, os.path.expanduser('~') + default) + '/ete' ETE_DATA_HOME = ete_path('XDG_DATA_HOME', '/.local/share') ETE_CONFIG_HOME = ete_path('XDG_CONFIG_HOME', '/.config')