diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-26 16:47:35 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-09-26 16:48:22 +0200 |
| commit | 0a19c2dedcaaa177b420eac99149515d84508204 (patch) | |
| tree | 34631498e694895a398da32fd077d855d938b113 /wrappers/python | |
| parent | 060d133acbc1d11cd79e32c6861956c265d87c7f (diff) | |
Python: Move from src/ to eduvpn_common/ and absolufy imports
Diffstat (limited to 'wrappers/python')
| -rw-r--r-- | wrappers/python/eduvpn_common/__init__.py (renamed from wrappers/python/src/__init__.py) | 2 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/discovery.py (renamed from wrappers/python/src/discovery.py) | 2 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/error.py (renamed from wrappers/python/src/error.py) | 0 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/event.py (renamed from wrappers/python/src/event.py) | 6 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/main.py (renamed from wrappers/python/src/main.py) | 10 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/server.py (renamed from wrappers/python/src/server.py) | 2 | ||||
| -rw-r--r-- | wrappers/python/eduvpn_common/state.py (renamed from wrappers/python/src/state.py) | 0 | ||||
| -rwxr-xr-x | wrappers/python/setup.py | 4 |
8 files changed, 13 insertions, 13 deletions
diff --git a/wrappers/python/src/__init__.py b/wrappers/python/eduvpn_common/__init__.py index 5383259..1406fa2 100644 --- a/wrappers/python/src/__init__.py +++ b/wrappers/python/eduvpn_common/__init__.py @@ -4,7 +4,7 @@ import pathlib import platform from typing import Tuple, Optional from typing import List -from .error import WrappedError, ErrorLevel +from eduvpn_common.error import WrappedError, ErrorLevel _lib_prefixes = defaultdict( lambda: "lib", diff --git a/wrappers/python/src/discovery.py b/wrappers/python/eduvpn_common/discovery.py index a1b87ea..68741bc 100644 --- a/wrappers/python/src/discovery.py +++ b/wrappers/python/eduvpn_common/discovery.py @@ -1,4 +1,4 @@ -from . import lib, cDiscoveryOrganizations, cDiscoveryServers, get_ptr_list_strings +from eduvpn_common import lib, cDiscoveryOrganizations, cDiscoveryServers, get_ptr_list_strings from ctypes import cast, POINTER diff --git a/wrappers/python/src/error.py b/wrappers/python/eduvpn_common/error.py index 50298bb..50298bb 100644 --- a/wrappers/python/src/error.py +++ b/wrappers/python/eduvpn_common/error.py diff --git a/wrappers/python/src/event.py b/wrappers/python/eduvpn_common/event.py index cf1a9d0..4532bef 100644 --- a/wrappers/python/src/event.py +++ b/wrappers/python/eduvpn_common/event.py @@ -1,8 +1,8 @@ -from . import VPNStateChange, get_ptr_string +from eduvpn_common import VPNStateChange, get_ptr_string from enum import Enum from typing import Callable -from .state import State, StateType -from .server import ( +from eduvpn_common.state import State, StateType +from eduvpn_common.server import ( get_locations, get_transition_profiles, get_transition_server, diff --git a/wrappers/python/src/main.py b/wrappers/python/eduvpn_common/main.py index 01621ae..3875ad9 100644 --- a/wrappers/python/src/main.py +++ b/wrappers/python/eduvpn_common/main.py @@ -1,10 +1,10 @@ -from . import lib, VPNStateChange, encode_args, decode_res, get_data_error +from eduvpn_common import lib, VPNStateChange, encode_args, decode_res, get_data_error from typing import Optional, Tuple import threading -from .discovery import get_disco_organizations, get_disco_servers -from .event import EventHandler -from .state import State, StateType -from .server import get_servers +from eduvpn_common.discovery import get_disco_organizations, get_disco_servers +from eduvpn_common.event import EventHandler +from eduvpn_common.state import State, StateType +from eduvpn_common.server import get_servers eduvpn_objects = {} diff --git a/wrappers/python/src/server.py b/wrappers/python/eduvpn_common/server.py index dce5d51..470f704 100644 --- a/wrappers/python/src/server.py +++ b/wrappers/python/eduvpn_common/server.py @@ -1,4 +1,4 @@ -from . import lib, cServer, cServers, cServerLocations, cServerProfiles +from eduvpn_common import lib, cServer, cServers, cServerLocations, cServerProfiles from ctypes import cast, POINTER, c_char_p from datetime import datetime diff --git a/wrappers/python/src/state.py b/wrappers/python/eduvpn_common/state.py index 5af004f..5af004f 100644 --- a/wrappers/python/src/state.py +++ b/wrappers/python/eduvpn_common/state.py diff --git a/wrappers/python/setup.py b/wrappers/python/setup.py index b2214e7..499627e 100755 --- a/wrappers/python/setup.py +++ b/wrappers/python/setup.py @@ -94,7 +94,7 @@ class bdist_wheel(_bdist_wheel): print(f"Building wheel for platform {self.plat_name}") # setuptools will only use paths inside the package for package_data, so we copy the library - tmp_lib = shutil.copy(f"{self.exports_lib_path}/{libpath}", "src/lib/") + tmp_lib = shutil.copy(f"{self.exports_lib_path}/{libpath}", "eduvpn_common/lib/") _bdist_wheel.run(self) os.remove(tmp_lib) @@ -104,7 +104,7 @@ setup( version="0.1.0", packages=["eduvpn_common"], python_requires=">=3.6", - package_dir={"eduvpn_common": "src"}, + package_dir={"eduvpn_common": "eduvpn_common"}, package_data={"eduvpn_common": [f"lib/*{_libname}*"]}, cmdclass={"bdist_wheel": bdist_wheel}, ) |
