Skip to content

Commit

Permalink
build: library names depend on OS and python version
Browse files Browse the repository at this point in the history
  • Loading branch information
dvp2015 committed Jan 8, 2021
1 parent 1bde7f7 commit db25d8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ jobs:
runs-on: ubuntu-latest
if: |
!startsWith(github.event.head_commit.message, 'bump:') &&
!startsWith(github.event.head_commit.message, 'ci:') &&
!contains(github.event.head_commit.message, '[skip_ci]')
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,14 @@ def is_pure(self): # noqa


def get_shared_lib_name(name: str) -> str:
"""Compute library name: this depends on OS and python version"""
sys_name = platform.system()
if sys_name == "Linux":
if sys.platform.startswith("darwin"):
return f"lib{name}.dylib"
return f"lib{name}.so"
if sys_name == "Darwin":
return f"lib{name}.dylib"
if sys_name == "Windows":
return f"Release/{name}.dll"
raise EnvironmentError(f"Unsupported system {sys_name}")
Expand Down

0 comments on commit db25d8c

Please sign in to comment.