vswmc-cli 2.2.0.dev355__py2.py3-none-any.whl → 2.2.1.dev357__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
vswmc/__init__.py ADDED
@@ -0,0 +1 @@
1
+ """VSWMC command-line client package."""
vswmc/cli/__main__.py CHANGED
@@ -3,7 +3,6 @@ from __future__ import print_function
3
3
  import argparse
4
4
  import logging
5
5
 
6
- import pkg_resources
7
6
  from vswmc.cli import (
8
7
  cp,
9
8
  logs,
@@ -19,6 +18,21 @@ from vswmc.cli import (
19
18
  )
20
19
 
21
20
 
21
+ try:
22
+ from importlib import metadata as importlib_metadata
23
+ except ImportError:
24
+ importlib_metadata = None
25
+
26
+
27
+ def get_version():
28
+ if importlib_metadata is None:
29
+ return "unknown"
30
+ try:
31
+ return importlib_metadata.version("vswmc-cli")
32
+ except importlib_metadata.PackageNotFoundError:
33
+ return "unknown"
34
+
35
+
22
36
  class SubCommandHelpFormatter(argparse.RawDescriptionHelpFormatter):
23
37
  def _format_action(self, action):
24
38
  # Removes the subparsers metavar from the help output
@@ -29,14 +43,13 @@ class SubCommandHelpFormatter(argparse.RawDescriptionHelpFormatter):
29
43
 
30
44
 
31
45
  def main():
32
- dist = pkg_resources.get_distribution("vswmc-cli")
33
46
  parser = argparse.ArgumentParser(
34
47
  description=None, formatter_class=SubCommandHelpFormatter
35
48
  )
36
49
  parser.add_argument(
37
50
  "--version",
38
51
  action="version",
39
- version=dist.version,
52
+ version=get_version(),
40
53
  help="Print version information and quit",
41
54
  )
42
55
  parser.add_argument("--token", help="S2P OAuth access token")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vswmc-cli
3
- Version: 2.2.0.dev355
3
+ Version: 2.2.1.dev357
4
4
  Summary: VSWMC Command-Line Tools
5
5
  Home-page: https://spaceweather.hpc.kuleuven.be
6
6
  Author: Rays of Space
@@ -26,7 +26,6 @@ Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
27
  Requires-Dist: six
28
28
  Requires-Dist: requests
29
- Requires-Dist: setuptools
30
29
  Dynamic: author
31
30
  Dynamic: author-email
32
31
  Dynamic: classifier
@@ -1,8 +1,8 @@
1
- vswmc_cli-2.2.0.dev355-py3.10-nspkg.pth,sha256=5CmsDZeokdAFnZcooOWKRU78iegQqG-HOlTlAk2VYzI,462
1
+ vswmc/__init__.py,sha256=IPsitsCPgSqTEDw0JGVZvpBuNFE5ERXtYKnxuJm-EZE,41
2
2
  vswmc/client.py,sha256=IQIjSFtuXdni_VVs37HJ4-w1zUcjqtiyCT1b9tplA0s,7078
3
3
  vswmc/sockjs.py,sha256=E4Ng4cgILrL8J6UUSdp7I478CdrzDPb45tCwdIWrwPQ,2459
4
4
  vswmc/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- vswmc/cli/__main__.py,sha256=rpFBzqyxP9H4o6V1mtllbElaTegJaDchUyTm45tU644,3172
5
+ vswmc/cli/__main__.py,sha256=ayilQ5mMSiZNC0U5NPWw2LLpW20PTZ1rMNKVGoJZjQ4,3433
6
6
  vswmc/cli/cp.py,sha256=3fJeLPCD0ZSaq_dMwUPtbnaG2CaF3VOFuI2az4ODzrY,1141
7
7
  vswmc/cli/logs.py,sha256=YKOklqEp4uvGDib4GO25byoQDBa57S4mgdD0Ia6kGDA,741
8
8
  vswmc/cli/ls.py,sha256=UYvBgx_WCK0BS0VCZTItl_7Vcdghoyr0QAk9I717yp4,1129
@@ -19,10 +19,9 @@ vswmc/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  vswmc/core/auth.py,sha256=YclGruWgPZb2SyZiX_uJIuVbDYvsYbxg9fEMSV6FUKU,95
20
20
  vswmc/core/exceptions.py,sha256=nbQEgCg1SSnJYr9iomXJaKzK-Heu2njpW_SioibR9UY,443
21
21
  vswmc/core/helpers.py,sha256=BeIpbz9CpCE4cS9TTQwTtVi35cUsWN-6e7lmVu82sDY,719
22
- vswmc_cli-2.2.0.dev355.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
23
- vswmc_cli-2.2.0.dev355.dist-info/METADATA,sha256=nvrOBsMmSe_VK2Vzou2KGA-wU-PqJefa_WJ0QXScwfw,4777
24
- vswmc_cli-2.2.0.dev355.dist-info/WHEEL,sha256=TdQ5LtNwLuxTCjgxN51AgdU5w-KkB9ttmLbzjTH02pg,109
25
- vswmc_cli-2.2.0.dev355.dist-info/entry_points.txt,sha256=Lc1-M9eBt4eCnnRb8Q-NWM1OSwyO6UDdK7l97nQ_RO0,50
26
- vswmc_cli-2.2.0.dev355.dist-info/namespace_packages.txt,sha256=SSaXSamS4BaN_CDCtVo95MfjZ2bo7x7KYnVvPN_CtY4,6
27
- vswmc_cli-2.2.0.dev355.dist-info/top_level.txt,sha256=SSaXSamS4BaN_CDCtVo95MfjZ2bo7x7KYnVvPN_CtY4,6
28
- vswmc_cli-2.2.0.dev355.dist-info/RECORD,,
22
+ vswmc_cli-2.2.1.dev357.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
23
+ vswmc_cli-2.2.1.dev357.dist-info/METADATA,sha256=rDFtlHtZql6hKZiZn1e83UiMTztwd36gNmAHIKlMlng,4751
24
+ vswmc_cli-2.2.1.dev357.dist-info/WHEEL,sha256=TdQ5LtNwLuxTCjgxN51AgdU5w-KkB9ttmLbzjTH02pg,109
25
+ vswmc_cli-2.2.1.dev357.dist-info/entry_points.txt,sha256=Lc1-M9eBt4eCnnRb8Q-NWM1OSwyO6UDdK7l97nQ_RO0,50
26
+ vswmc_cli-2.2.1.dev357.dist-info/top_level.txt,sha256=SSaXSamS4BaN_CDCtVo95MfjZ2bo7x7KYnVvPN_CtY4,6
27
+ vswmc_cli-2.2.1.dev357.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- import sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('vswmc',));importlib = __import__('importlib.util');__import__('importlib.machinery');m = sys.modules.setdefault('vswmc', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('vswmc', [os.path.dirname(p)])));m = m or sys.modules.setdefault('vswmc', types.ModuleType('vswmc'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)