mmrelay 1.0.5__tar.gz → 1.0.6__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.

Potentially problematic release.


This version of mmrelay might be problematic. Click here for more details.

Files changed (38) hide show
  1. {mmrelay-1.0.5/src/mmrelay.egg-info → mmrelay-1.0.6}/PKG-INFO +2 -1
  2. {mmrelay-1.0.5 → mmrelay-1.0.6}/requirements.txt +1 -0
  3. {mmrelay-1.0.5 → mmrelay-1.0.6}/setup.cfg +3 -1
  4. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/setup_utils.py +66 -26
  5. {mmrelay-1.0.5 → mmrelay-1.0.6/src/mmrelay.egg-info}/PKG-INFO +2 -1
  6. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay.egg-info/requires.txt +1 -0
  7. {mmrelay-1.0.5 → mmrelay-1.0.6}/LICENSE +0 -0
  8. {mmrelay-1.0.5 → mmrelay-1.0.6}/MANIFEST.in +0 -0
  9. {mmrelay-1.0.5 → mmrelay-1.0.6}/README.md +0 -0
  10. {mmrelay-1.0.5 → mmrelay-1.0.6}/pyproject.toml +0 -0
  11. {mmrelay-1.0.5 → mmrelay-1.0.6}/sample_config.yaml +0 -0
  12. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/__init__.py +0 -0
  13. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/cli.py +0 -0
  14. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/config.py +0 -0
  15. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/config_checker.py +0 -0
  16. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/db_utils.py +0 -0
  17. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/log_utils.py +0 -0
  18. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/main.py +0 -0
  19. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/matrix_utils.py +0 -0
  20. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/meshtastic_utils.py +0 -0
  21. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugin_loader.py +0 -0
  22. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/__init__.py +0 -0
  23. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/base_plugin.py +0 -0
  24. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/debug_plugin.py +0 -0
  25. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/drop_plugin.py +0 -0
  26. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/health_plugin.py +0 -0
  27. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/help_plugin.py +0 -0
  28. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/map_plugin.py +0 -0
  29. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/mesh_relay_plugin.py +0 -0
  30. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/nodes_plugin.py +0 -0
  31. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/ping_plugin.py +0 -0
  32. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/telemetry_plugin.py +0 -0
  33. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay/plugins/weather_plugin.py +0 -0
  34. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay.egg-info/SOURCES.txt +0 -0
  35. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay.egg-info/dependency_links.txt +0 -0
  36. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay.egg-info/entry_points.txt +0 -0
  37. {mmrelay-1.0.5 → mmrelay-1.0.6}/src/mmrelay.egg-info/top_level.txt +0 -0
  38. {mmrelay-1.0.5 → mmrelay-1.0.6}/tools/mmrelay.service +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmrelay
3
- Version: 1.0.5
3
+ Version: 1.0.6
4
4
  Summary: Bridge between Meshtastic mesh networks and Matrix chat rooms
5
5
  Home-page: https://github.com/geoffwhittington/meshtastic-matrix-relay
6
6
  Author: Geoff Whittington, Jeremiah K., and contributors
@@ -25,6 +25,7 @@ Requires-Dist: schedule==1.2.2
25
25
  Requires-Dist: platformdirs==4.3.7
26
26
  Requires-Dist: py-staticmaps>=0.4.0
27
27
  Requires-Dist: rich==14.0.0
28
+ Requires-Dist: setuptools==80.3.1
28
29
  Dynamic: license-file
29
30
 
30
31
  # M<>M Relay
@@ -9,3 +9,4 @@ schedule==1.2.2
9
9
  platformdirs==4.3.7
10
10
  py-staticmaps>=0.4.0
11
11
  rich==14.0.0
12
+ setuptools==80.3.1
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = mmrelay
3
- version = 1.0.5
3
+ version = 1.0.6
4
4
  author = Geoff Whittington, Jeremiah K., and contributors
5
5
  author_email = jeremiahk@gmx.com
6
6
  description = Bridge between Meshtastic mesh networks and Matrix chat rooms
@@ -33,6 +33,8 @@ install_requires =
33
33
  platformdirs==4.3.7
34
34
  py-staticmaps>=0.4.0
35
35
  rich==14.0.0
36
+ setuptools==80.3.1
37
+ include_package_data = True
36
38
 
37
39
  [options.packages.find]
38
40
  where = src
@@ -91,42 +91,82 @@ def get_template_service_path():
91
91
  str: The path to the template service file, or None if not found.
92
92
  """
93
93
  # Try to find the service template file
94
- # First, check in the package directory (where it should be after installation)
95
94
  package_dir = os.path.dirname(__file__)
96
- template_path = os.path.join(
97
- os.path.dirname(os.path.dirname(package_dir)), "tools", "mmrelay.service"
98
- )
99
-
100
- # If not found, try the repository root (for development)
101
- if not os.path.exists(template_path):
102
- repo_root = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
103
- template_path = os.path.join(repo_root, "tools", "mmrelay.service")
104
-
105
- # If still not found, try the current directory (fallback)
106
- if not os.path.exists(template_path):
107
- template_path = os.path.join(os.getcwd(), "tools", "mmrelay.service")
108
95
 
109
- if not os.path.exists(template_path):
110
- return None
111
-
112
- return template_path
96
+ # Try to find the service template file in various locations
97
+ template_paths = [
98
+ # Check in the package directory (where it should be after installation)
99
+ os.path.join(package_dir, "mmrelay.service"),
100
+ # Check in a tools subdirectory of the package
101
+ os.path.join(package_dir, "tools", "mmrelay.service"),
102
+ # Check in the data files location (where it should be after installation)
103
+ os.path.join(sys.prefix, "share", "mmrelay", "mmrelay.service"),
104
+ os.path.join(sys.prefix, "share", "mmrelay", "tools", "mmrelay.service"),
105
+ # Check in the user site-packages location
106
+ os.path.join(os.path.expanduser("~"), ".local", "share", "mmrelay", "mmrelay.service"),
107
+ os.path.join(os.path.expanduser("~"), ".local", "share", "mmrelay", "tools", "mmrelay.service"),
108
+ # Check one level up from the package directory
109
+ os.path.join(os.path.dirname(package_dir), "tools", "mmrelay.service"),
110
+ # Check two levels up from the package directory (for development)
111
+ os.path.join(os.path.dirname(os.path.dirname(package_dir)), "tools", "mmrelay.service"),
112
+ # Check in the repository root (for development)
113
+ os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "tools", "mmrelay.service"),
114
+ # Check in the current directory (fallback)
115
+ os.path.join(os.getcwd(), "tools", "mmrelay.service")
116
+ ]
117
+
118
+ # Try each path until we find one that exists
119
+ for path in template_paths:
120
+ if os.path.exists(path):
121
+ return path
122
+
123
+ # If we get here, we couldn't find the template
124
+ # Debug output to help diagnose issues
125
+ print("Debug: Could not find mmrelay.service in any of these locations:")
126
+ for path in template_paths:
127
+ print(f" - {path}")
128
+
129
+ # If we get here, we couldn't find the template
130
+ return None
113
131
 
114
132
 
115
133
  def get_template_service_content():
116
134
  """Get the content of the template service file.
117
135
 
118
136
  Returns:
119
- str: The content of the template service file, or None if not found.
137
+ str: The content of the template service file, or a default template if not found.
120
138
  """
121
139
  template_path = get_template_service_path()
122
- if not template_path:
123
- return None
124
-
125
- # Read the template
126
- with open(template_path, "r") as f:
127
- service_template = f.read()
128
-
129
- return service_template
140
+ if template_path:
141
+ # Read the template from file
142
+ try:
143
+ with open(template_path, "r") as f:
144
+ service_template = f.read()
145
+ return service_template
146
+ except Exception as e:
147
+ print(f"Error reading service template file: {e}")
148
+
149
+ # If we couldn't find or read the template file, use a default template
150
+ print("Using default service template")
151
+ return """[Unit]
152
+ Description=A Meshtastic <=> Matrix Relay
153
+ After=network-online.target
154
+ Wants=network-online.target
155
+
156
+ [Service]
157
+ Type=idle
158
+ # The mmrelay binary can be installed via pipx or pip
159
+ ExecStart=%h/.local/bin/mmrelay --config %h/.mmrelay/config.yaml --logfile %h/.mmrelay/logs/mmrelay.log
160
+ WorkingDirectory=%h/.mmrelay
161
+ Restart=on-failure
162
+ RestartSec=10
163
+ Environment=PYTHONUNBUFFERED=1
164
+ # Ensure both pipx and pip environments are properly loaded
165
+ Environment=PATH=%h/.local/bin:%h/.local/pipx/venvs/mmrelay/bin:/usr/local/bin:/usr/bin:/bin
166
+
167
+ [Install]
168
+ WantedBy=default.target
169
+ """
130
170
 
131
171
 
132
172
  def is_service_enabled():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mmrelay
3
- Version: 1.0.5
3
+ Version: 1.0.6
4
4
  Summary: Bridge between Meshtastic mesh networks and Matrix chat rooms
5
5
  Home-page: https://github.com/geoffwhittington/meshtastic-matrix-relay
6
6
  Author: Geoff Whittington, Jeremiah K., and contributors
@@ -25,6 +25,7 @@ Requires-Dist: schedule==1.2.2
25
25
  Requires-Dist: platformdirs==4.3.7
26
26
  Requires-Dist: py-staticmaps>=0.4.0
27
27
  Requires-Dist: rich==14.0.0
28
+ Requires-Dist: setuptools==80.3.1
28
29
  Dynamic: license-file
29
30
 
30
31
  # M<>M Relay
@@ -9,3 +9,4 @@ schedule==1.2.2
9
9
  platformdirs==4.3.7
10
10
  py-staticmaps>=0.4.0
11
11
  rich==14.0.0
12
+ setuptools==80.3.1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes