Skip to content

Commit

Permalink
Fix build on appveyor + Windows
Browse files Browse the repository at this point in the history
This includes using dirname(abspath(__file__)), otherwise dirname
returns empty string (!) on Windows.
  • Loading branch information
jokva committed Nov 5, 2018
1 parent 90ac195 commit be19714
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 7 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
version: 1.0.{build}

clone_depth: 1

configuration:
- Release

Expand Down Expand Up @@ -33,6 +31,7 @@ install:
pytest
pytest-runner
setuptools
setuptools_scm
pybind11
hypothesis
twine
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit be19714

Please sign in to comment.