File tree 3 files changed +12
-4
lines changed 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 14
14
from pathlib import Path
15
15
from typing import Union , Tuple , Dict
16
16
17
- import oschmod
18
-
19
17
from openeo import __version__
20
18
from openeo .config import get_user_config_dir , get_user_data_dir
21
19
from openeo .util import rfc3339 , deep_get , deep_set
22
20
21
+ if platform .system () == 'Windows' :
22
+ import oschmod
23
+
24
+
23
25
_PRIVATE_PERMS = stat .S_IRUSR | stat .S_IWUSR
24
26
25
27
log = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 47
47
'xarray>=0.12.3' ,
48
48
'pandas>0.20.0' ,
49
49
'deprecated>=1.2.12' ,
50
- 'oschmod' ,
50
+ 'oschmod; sys_platform == "win32" ' ,
51
51
'pywin32; sys_platform == "win32"' ,
52
52
],
53
53
extras_require = {
Original file line number Diff line number Diff line change 2
2
from unittest import mock
3
3
import platform
4
4
5
- import oschmod
6
5
import pytest
7
6
8
7
import openeo .rest .auth .config
9
8
from openeo .rest .auth .config import RefreshTokenStore , AuthConfig , PrivateJsonFile
10
9
10
+ # TODO: We could simplify the code if we can verify oschmod works transparently on Linux/Mac as well.
11
+ # I think oschmod does work on Linux and Mac, but since it we use it for a
12
+ # security sensitive feature, let's make sure there are no problems first.
13
+ # For now, it is fine to have some Windows specific code.
14
+ if platform .system () == 'Windows' :
15
+ import oschmod
16
+
11
17
12
18
class TestPrivateJsonFile :
13
19
You can’t perform that action at this time.
0 commit comments