From e6e493496aa19d39413c100ee95f6d9fdd4547f2 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 30 Oct 2015 01:07:17 +0100 Subject: [PATCH 1/6] Test appveyor --- .appveyor.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 4c4a6949..e410d7e9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -21,6 +21,12 @@ install: # Check that we have the expected version and architecture for Python - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" + - "pip --version" + + # Download and install MikTeX + - ps: "wget http://mirrors.ctan.org/systems/win32/miktex/setup/basic-miktex-2.9.5721.exe -OutFile ./basic-miktex.exe" + - "./basic-miktex.exe" + build: false # Not a C# project, build stuff at the test step instead. From a09ece79ad6bd7c7f24cf942082e7dd225d1db1f Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 30 Oct 2015 01:12:20 +0100 Subject: [PATCH 2/6] Change path --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index e410d7e9..8f0c8ac0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -25,7 +25,7 @@ install: # Download and install MikTeX - ps: "wget http://mirrors.ctan.org/systems/win32/miktex/setup/basic-miktex-2.9.5721.exe -OutFile ./basic-miktex.exe" - - "./basic-miktex.exe" + - "basic-miktex.exe" build: false # Not a C# project, build stuff at the test step instead. From f30b8b647b66e3fe28675226be8e70afdb3c7936 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 30 Oct 2015 01:38:05 +0100 Subject: [PATCH 4/6] DEBUG --- patacrep/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patacrep/__init__.py b/patacrep/__init__.py index 0b839a45..7429a12c 100644 --- a/patacrep/__init__.py +++ b/patacrep/__init__.py @@ -22,3 +22,12 @@ def pkg_datapath(path=''): return os.path.join(_ROOT, 'data', path) __DATADIR__ = os.path.abspath(pkg_datapath()) + +### DEBUG ### +import subprocess +print("DEBUG: RESOURCE_FILENAME:", os.path.abspath(resource_filename(__name__, 'data'))) +print("DEBUG: DIR RESOURCE_FILENAME:", subprocess.check_output( + ['dir', os.path.abspath(resource_filename(__name__, 'data'))], + stderr=subprocess.STDOUT, + universal_newlines=True + )) From 32f6313d5f95c33f64289ab2444ff19cc1225916 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 30 Oct 2015 05:45:46 +0100 Subject: [PATCH 5/6] miktex install --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 8f0c8ac0..72d33c98 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -25,7 +25,7 @@ install: # Download and install MikTeX - ps: "wget http://mirrors.ctan.org/systems/win32/miktex/setup/basic-miktex-2.9.5721.exe -OutFile ./basic-miktex.exe" - - "basic-miktex.exe" + - "basic-miktex.exe --unattended" build: false # Not a C# project, build stuff at the test step instead. From 53e8307759c3491764223b25ea6fd9d552a54508 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 30 Oct 2015 07:11:03 +0100 Subject: [PATCH 6/6] Test APPDATA variable --- .appveyor.yml | 2 +- patacrep/__init__.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 72d33c98..faaa2ce4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -25,7 +25,7 @@ install: # Download and install MikTeX - ps: "wget http://mirrors.ctan.org/systems/win32/miktex/setup/basic-miktex-2.9.5721.exe -OutFile ./basic-miktex.exe" - - "basic-miktex.exe --unattended" + - "basic-miktex.exe --unattended --user-config='\MiKTeX\2.9' --user-data='\MiKTeX\2.9' --user-install='\MiKTeX\2.9'" build: false # Not a C# project, build stuff at the test step instead. diff --git a/patacrep/__init__.py b/patacrep/__init__.py index 7429a12c..43a9b269 100644 --- a/patacrep/__init__.py +++ b/patacrep/__init__.py @@ -31,3 +31,12 @@ print("DEBUG: DIR RESOURCE_FILENAME:", subprocess.check_output( stderr=subprocess.STDOUT, universal_newlines=True )) +print("DEBUG: EXPAND VAR", [(var, os.path.expandvars(var)) for var in ['APPDATA', '$APPDATA', '%APPDATA%', '']]) +try: + print("DEBUG: DIR APPDATA:", subprocess.check_output( + ['dir', os.path.expandvars('%APPDATA%')], + stderr=subprocess.STDOUT, + universal_newlines=True + )) +except Exception as error: + print(error)