btbricks 0.2.1__tar.gz → 0.2.2__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.
Files changed (47) hide show
  1. {btbricks-0.2.1 → btbricks-0.2.2}/PKG-INFO +1 -1
  2. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks.egg-info/PKG-INFO +1 -1
  3. {btbricks-0.2.1 → btbricks-0.2.2}/pyproject.toml +1 -1
  4. btbricks-0.2.2/setup.py +94 -0
  5. btbricks-0.2.1/setup.py +0 -76
  6. {btbricks-0.2.1 → btbricks-0.2.2}/.readthedocs.yaml +0 -0
  7. {btbricks-0.2.1 → btbricks-0.2.2}/CHANGELOG.md +0 -0
  8. {btbricks-0.2.1 → btbricks-0.2.2}/LICENSE +0 -0
  9. {btbricks-0.2.1 → btbricks-0.2.2}/MANIFEST.in +0 -0
  10. {btbricks-0.2.1 → btbricks-0.2.2}/README.md +0 -0
  11. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks/__init__.py +0 -0
  12. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks/bt.py +0 -0
  13. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks/bthub.py +0 -0
  14. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks/ctrl_plus.py +0 -0
  15. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks.egg-info/SOURCES.txt +0 -0
  16. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks.egg-info/dependency_links.txt +0 -0
  17. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks.egg-info/requires.txt +0 -0
  18. {btbricks-0.2.1 → btbricks-0.2.2}/btbricks.egg-info/top_level.txt +0 -0
  19. {btbricks-0.2.1 → btbricks-0.2.2}/docs/Makefile +0 -0
  20. {btbricks-0.2.1 → btbricks-0.2.2}/docs/conf.py +0 -0
  21. {btbricks-0.2.1 → btbricks-0.2.2}/docs/index.rst +0 -0
  22. {btbricks-0.2.1 → btbricks-0.2.2}/examples/ble-midi-esp/main.py +0 -0
  23. {btbricks-0.2.1 → btbricks-0.2.2}/examples/ble_uart_light_matrix_client.py +0 -0
  24. {btbricks-0.2.1 → btbricks-0.2.2}/examples/ble_uart_light_matrix_server.py +0 -0
  25. {btbricks-0.2.1 → btbricks-0.2.2}/examples/ble_uart_simple_central.py +0 -0
  26. {btbricks-0.2.1 → btbricks-0.2.2}/examples/ble_uart_simple_peripheral.py +0 -0
  27. {btbricks-0.2.1 → btbricks-0.2.2}/examples/inventor_ble_midi_guitar.py +0 -0
  28. {btbricks-0.2.1 → btbricks-0.2.2}/examples/midi_controller_example.py +0 -0
  29. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_batmobile_spike_wheel.py +0 -0
  30. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_extreme_offroader_spike_wheel.py +0 -0
  31. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_hotrod_car_receiver.py +0 -0
  32. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_hotrod_transmitter.py +0 -0
  33. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_mecanum_wheels.py +0 -0
  34. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_multi_snake_head.py +0 -0
  35. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_multi_snake_seg_1.py +0 -0
  36. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_receiver_example.py +0 -0
  37. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_snake.py +0 -0
  38. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_snake_with_simple_remote.py +0 -0
  39. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_snake_with_spike_steering_wheel.py +0 -0
  40. {btbricks-0.2.1 → btbricks-0.2.2}/examples/rc_transmitter_example.py +0 -0
  41. {btbricks-0.2.1 → btbricks-0.2.2}/examples/uart_central_example.py +0 -0
  42. {btbricks-0.2.1 → btbricks-0.2.2}/examples/uart_peripheral_example.py +0 -0
  43. {btbricks-0.2.1 → btbricks-0.2.2}/setup.cfg +0 -0
  44. {btbricks-0.2.1 → btbricks-0.2.2}/tests/__init__.py +0 -0
  45. {btbricks-0.2.1 → btbricks-0.2.2}/tests/test_bthub.py +0 -0
  46. {btbricks-0.2.1 → btbricks-0.2.2}/tests/test_constants.py +0 -0
  47. {btbricks-0.2.1 → btbricks-0.2.2}/tests/test_imports.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: btbricks
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A MicroPython Bluetooth library for remote controlling LEGO hubs via BLE
5
5
  Home-page: https://github.com/antonvh/btbricks
6
6
  Author: Anton Vanhoucke
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: btbricks
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A MicroPython Bluetooth library for remote controlling LEGO hubs via BLE
5
5
  Home-page: https://github.com/antonvh/btbricks
6
6
  Author: Anton Vanhoucke
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "btbricks"
7
- version = "0.2.1"
7
+ version = "0.2.2"
8
8
  description = "A MicroPython Bluetooth library for remote controlling LEGO hubs via BLE"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
@@ -0,0 +1,94 @@
1
+ """
2
+ Setup configuration for btbricks package.
3
+
4
+ This package is designed for MicroPython environments. While it's distributed
5
+ via PyPI for reference and documentation, actual deployment to MicroPython
6
+ devices uses one of these methods:
7
+
8
+ 1. **Using micropip (MicroPython's package manager):**
9
+ On the MicroPython device:
10
+ ```python
11
+ import micropip
12
+ await micropip.install("btbricks")
13
+ ```
14
+
15
+ 2. **Using mpremote (for ESP32, SPIKE, etc.):**
16
+ ```bash
17
+ mpremote cp -r btbricks :btbricks
18
+ ```
19
+
20
+ 3. **Manual upload via WebREPL or Thonny:**
21
+ Copy the btbricks/ folder to the device's filesystem.
22
+
23
+ For development/documentation on regular Python, you can install normally:
24
+ ```bash
25
+ pip install btbricks
26
+ ```
27
+ """
28
+
29
+ from setuptools import setup, find_packages
30
+ import pathlib
31
+
32
+ # Read long description from README
33
+ with open("README.md", "r", encoding="utf-8") as fh:
34
+ long_description = fh.read()
35
+
36
+ # Read metadata from pyproject.toml so we only need to update one file
37
+ pyproject_path = pathlib.Path("pyproject.toml")
38
+ pyproject_data = {}
39
+ if pyproject_path.exists():
40
+ try:
41
+ # Python 3.11+
42
+ import tomllib as _toml
43
+
44
+ pyproject_data = _toml.loads(pyproject_path.read_text(encoding="utf-8"))
45
+ except Exception:
46
+ try:
47
+ import toml as _toml # type: ignore
48
+
49
+ pyproject_data = _toml.loads(pyproject_path.read_text(encoding="utf-8"))
50
+ except Exception:
51
+ pyproject_data = {}
52
+
53
+ project_meta = pyproject_data.get("project", {}) if isinstance(pyproject_data, dict) else {}
54
+
55
+
56
+ def _first_author(meta):
57
+ authors = meta.get("authors") or []
58
+ if authors and isinstance(authors, list):
59
+ first = authors[0]
60
+ return first.get("name"), first.get("email")
61
+ return (None, None)
62
+
63
+
64
+ author_name, author_email = _first_author(project_meta)
65
+
66
+ # Fallbacks for commonly used fields
67
+ name = project_meta.get("name", "btbricks")
68
+ version = project_meta.get("version", "0.0.0")
69
+ description = project_meta.get("description", "")
70
+ keywords = ", ".join(project_meta.get("keywords", []))
71
+ classifiers = project_meta.get("classifiers", [])
72
+ python_requires = project_meta.get("requires-python", project_meta.get("python_requires", ">=3.7"))
73
+ install_requires = project_meta.get("dependencies", [])
74
+ extras_require = project_meta.get("optional-dependencies", {})
75
+ project_urls = project_meta.get("urls", {})
76
+ url = (project_urls or {}).get("Homepage", project_meta.get("homepage", ""))
77
+
78
+ setup(
79
+ name=name,
80
+ version=version,
81
+ author=author_name or "",
82
+ author_email=author_email or "",
83
+ description=description,
84
+ long_description=long_description,
85
+ long_description_content_type="text/markdown",
86
+ url=url,
87
+ packages=find_packages(),
88
+ classifiers=classifiers,
89
+ python_requires=python_requires,
90
+ install_requires=install_requires,
91
+ extras_require=extras_require,
92
+ keywords=keywords,
93
+ project_urls=project_urls,
94
+ )
btbricks-0.2.1/setup.py DELETED
@@ -1,76 +0,0 @@
1
- """
2
- Setup configuration for btbricks package.
3
-
4
- This package is designed for MicroPython environments. While it's distributed
5
- via PyPI for reference and documentation, actual deployment to MicroPython
6
- devices uses one of these methods:
7
-
8
- 1. **Using micropip (MicroPython's package manager):**
9
- On the MicroPython device:
10
- ```python
11
- import micropip
12
- await micropip.install("btbricks")
13
- ```
14
-
15
- 2. **Using mpremote (for ESP32, SPIKE, etc.):**
16
- ```bash
17
- mpremote cp -r btbricks :btbricks
18
- ```
19
-
20
- 3. **Manual upload via WebREPL or Thonny:**
21
- Copy the btbricks/ folder to the device's filesystem.
22
-
23
- For development/documentation on regular Python, you can install normally:
24
- ```bash
25
- pip install btbricks
26
- ```
27
- """
28
-
29
- from setuptools import setup, find_packages
30
-
31
- with open("README.md", "r", encoding="utf-8") as fh:
32
- long_description = fh.read()
33
-
34
- setup(
35
- name="btbricks",
36
- version="0.1.0",
37
- author="Anton Vanhoucke",
38
- author_email="anton@antonsmindstorms.com",
39
- description="A MicroPython Bluetooth library for remote controlling LEGO hubs via BLE",
40
- long_description=long_description,
41
- long_description_content_type="text/markdown",
42
- url="https://github.com/antonvh/btbricks",
43
- packages=find_packages(),
44
- classifiers=[
45
- "Programming Language :: Python :: 3",
46
- "Programming Language :: Python :: 3.7",
47
- "Programming Language :: Python :: 3.8",
48
- "Programming Language :: Python :: 3.9",
49
- "Programming Language :: Python :: 3.10",
50
- "Programming Language :: Python :: 3.11",
51
- "Programming Language :: Python :: Implementation :: MicroPython",
52
- "License :: OSI Approved :: MIT License",
53
- "Operating System :: OS Independent",
54
- "Intended Audience :: Developers",
55
- "Topic :: Software Development :: Libraries :: Python Modules",
56
- "Topic :: System :: Hardware",
57
- "Environment :: Handhelds/PDA Devices",
58
- ],
59
- python_requires=">=3.7",
60
- install_requires=[],
61
- extras_require={
62
- "dev": [
63
- "pytest>=7.0",
64
- "pytest-asyncio>=0.20.0",
65
- "black>=23.0",
66
- "flake8>=5.0",
67
- "mypy>=1.0",
68
- ],
69
- },
70
- keywords="micropython bluetooth ble lego hub control",
71
- project_urls={
72
- "Bug Reports": "https://github.com/antonvh/btbricks/issues",
73
- "Source": "https://github.com/antonvh/btbricks",
74
- "Documentation": "https://btbricks.readthedocs.io",
75
- },
76
- )
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes