From be197140acda8684e5f4f20cc5ed12ea00f898bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= Date: Mon, 5 Nov 2018 00:40:10 +0100 Subject: [PATCH] Fix build on appveyor + Windows This includes using dirname(abspath(__file__)), otherwise dirname returns empty string (!) on Windows. --- appveyor.yml | 18 +++++++----------- python/setup.py | 3 ++- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 50e08b7ad..8b36809e2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,5 @@ version: 1.0.{build} -clone_depth: 1 - configuration: - Release @@ -33,6 +31,7 @@ install: pytest pytest-runner setuptools + setuptools_scm pybind11 hypothesis twine @@ -51,15 +50,12 @@ build_script: -DCMAKE_CXX_FLAGS=/D_CRT_SECURE_NO_WARNINGS - cmake --build . --config %configuration% - - ps: | - popd - pushd python - python setup.py bdist_wheel - popd - -test_script: - - ps: pushd build - - ctest --build-config %configuration% --output-on-failure + - ctest --build-config %configuration% + --output-on-failure + - ps: popd + - ps: pushd python + - git describe + - IF DEFINED PYTHON python setup.py bdist_wheel - ps: popd before_deploy: diff --git a/python/setup.py b/python/setup.py index c6418ab4f..6946db398 100755 --- a/python/setup.py +++ b/python/setup.py @@ -41,10 +41,11 @@ def build_extensions(self): def getversion(): if os.path.isdir('.git'): + print('Getversion == True') return True return { - 'relative_to': os.path.dirname(__file__), + 'relative_to': os.path.dirname(os.path.abspath(__file__)), } setup(