spacenav-ws 0.1.0__tar.gz → 0.1.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spacenav-ws
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: SpaceNav WebSocket Bridge for using a 3dConnexion spacemouse with onshape
5
5
  Author-email: RmStorm <roaldstorm@gmail.com>
6
6
  License-File: LICENSE
@@ -28,4 +28,9 @@ Simply run `uvx spacenav-ws`
28
28
  todo
29
29
 
30
30
  # Deploying to pypi
31
- todo
31
+ Just run
32
+
33
+ ```bash
34
+ uv build
35
+ uv publish
36
+ ```
@@ -14,4 +14,9 @@ Simply run `uvx spacenav-ws`
14
14
  todo
15
15
 
16
16
  # Deploying to pypi
17
- todo
17
+ Just run
18
+
19
+ ```bash
20
+ uv build
21
+ uv publish
22
+ ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "spacenav-ws"
3
- version = "0.1.0"
3
+ version = "0.1.1"
4
4
  description = "SpaceNav WebSocket Bridge for using a 3dConnexion spacemouse with onshape"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,6 +1,7 @@
1
1
  import asyncio
2
2
  import logging
3
3
  import struct
4
+ from pathlib import Path
4
5
 
5
6
  import typer
6
7
  import uvicorn
@@ -21,9 +22,20 @@ ORIGINS = [
21
22
  "https://3dconnexion.com",
22
23
  "https://cad.onshape.com",
23
24
  ]
24
-
25
- CERT_FILE = "certs/ip.crt"
26
- KEY_FILE = "certs/ip.key"
25
+ # from importlib.resources import files, as_file
26
+
27
+ # # Build a Traversable pointing to spacenav_ws/certs/ip.crt
28
+ # resource = files(__package__).joinpath("certs", "ip.crt")
29
+ # # as_file() ensures we have a real filesystem path even if inside a zip/wheel
30
+ # with as_file(resource) as cert_path:
31
+ # CERT_FILE = str(cert_path)
32
+
33
+ # # Same for the key
34
+ # key_res = files(__package__).joinpath("certs", "ip.key")
35
+ # with as_file(key_res) as key_path:
36
+ # KEY_FILE = str(key_path)
37
+ CERT_FILE = Path(__file__).parent / "certs" / "ip.crt"
38
+ KEY_FILE = Path(__file__).parent / "certs" / "ip.key"
27
39
 
28
40
  cli = typer.Typer()
29
41
  app = FastAPI()
File without changes
File without changes
File without changes
File without changes