|
2 | 2 |
|
3 | 3 | from setuptools import setup, find_packages |
4 | 4 | from pathlib import Path |
| 5 | +import re |
5 | 6 |
|
6 | 7 | # Read the contents of README file |
7 | 8 | this_directory = Path(__file__).parent |
|
16 | 17 | if requirements_path.exists(): |
17 | 18 | requirements = requirements_path.read_text(encoding="utf-8").splitlines() |
18 | 19 |
|
| 20 | +# Read version from __version__.py |
| 21 | +version = "0.1.0" # fallback |
| 22 | +version_file = this_directory / "src" / "meshtastic_mqtt_protobuf" / "__version__.py" |
| 23 | +if version_file.exists(): |
| 24 | + version_content = version_file.read_text(encoding="utf-8") |
| 25 | + version_match = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', version_content, re.MULTILINE) |
| 26 | + if version_match: |
| 27 | + version = version_match.group(1) |
| 28 | + |
19 | 29 | setup( |
20 | 30 | name="meshtastic-mqtt-protobuf", |
21 | | - version="0.1.0", |
| 31 | + version=version, |
22 | 32 | author="Meshtastic MQTT Protobuf Contributors", |
23 | 33 | description="A CLI tool for sending protobuf-encoded messages to Meshtastic MQTT servers", |
24 | 34 | long_description=long_description, |
25 | 35 | long_description_content_type="text/markdown", |
26 | 36 | url="https://github.com/yourusername/meshtastic-mqtt-protobuf", |
27 | 37 | packages=find_packages(where="src"), |
28 | 38 | package_dir={"": "src"}, |
| 39 | + license="GPL-3.0-or-later", |
29 | 40 | classifiers=[ |
30 | | - "Development Status :: 3 - Alpha", |
| 41 | + "Development Status :: 4 - Beta", |
31 | 42 | "Intended Audience :: Developers", |
| 43 | + "Intended Audience :: End Users/Desktop", |
32 | 44 | "Topic :: Communications", |
33 | | - "License :: OSI Approved :: MIT License", |
| 45 | + "Topic :: Communications :: Ham Radio", |
| 46 | + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", |
34 | 47 | "Programming Language :: Python :: 3", |
35 | 48 | "Programming Language :: Python :: 3.7", |
36 | 49 | "Programming Language :: Python :: 3.8", |
37 | 50 | "Programming Language :: Python :: 3.9", |
38 | 51 | "Programming Language :: Python :: 3.10", |
39 | 52 | "Programming Language :: Python :: 3.11", |
| 53 | + "Programming Language :: Python :: 3.12", |
40 | 54 | ], |
41 | 55 | python_requires=">=3.7", |
42 | 56 | install_requires=requirements, |
|
0 commit comments