Skip to content

Commit

Permalink
DSANSIBLE-78
Browse files Browse the repository at this point in the history
to Support Win
1) change hard coded path separator to os.sep
2) add osx, windows into .travis.yml

Signed-off-by: shipeng@us.ibm.com <shipeng@us.ibm.com>
  • Loading branch information
shipeng@us.ibm.com committed Jul 11, 2022
1 parent 200ba9b commit ce66f66
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
language: python
dist: xenial

os:
- linux
- windows
- osx

matrix:
include:
- python: 3.6
Expand Down
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
import os
import sys

sys.path.insert(0, os.path.realpath(os.path.abspath('../')))
sys.path.append(os.path.abspath('../..'))
sys.path.insert(
0,
os.path.realpath(
os.path.abspath(f"..{os.sep}")
)
)
sys.path.append(os.path.abspath(f"..{os.sep}.."))

import pyds8k

Expand Down
2 changes: 1 addition & 1 deletion pyds8k/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_resource_route_prefix_by_class(cls):
path = os.path.abspath(
os.path.dirname(sys.modules[cls.__module__].__file__)
)
route = path.replace("/", ".")
route = path.replace(os.sep, ".")
return route.rsplit(".resources.", 2)[1]


Expand Down

0 comments on commit ce66f66

Please sign in to comment.