Skip to content

Commit

Permalink
Use TheengsDecoder package instead of submodule (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvervloesem authored Mar 28, 2023
1 parent fc11d34 commit 6cea45e
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 50 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "TheengsDecoder"]
path = TheengsDecoder
url = https://github.com/theengs/decoder.git
20 changes: 0 additions & 20 deletions CMakeLists.txt

This file was deleted.

6 changes: 0 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
include LICENSE
include README.md
include pyproject.toml
include CMakeLists.txt
recursive-include TheengsDecoder/src *
recursive-include TheengsDecoder/python *
recursive-include TheengsGateway *
prune TheengsDecoder/src/arduino_json/extras*
prune TheengsDecoder/src/arduino_json/examples*
prune TheengsDecoder/src/arduino_json/.*
1 change: 0 additions & 1 deletion TheengsDecoder
Submodule TheengsDecoder deleted from 24895d
3 changes: 1 addition & 2 deletions TheengsGateway/ble_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
from bluetooth_numbers import company
from bluetooth_numbers.exceptions import UnknownCICError
from paho.mqtt import client as mqtt_client

from ._decoder import decodeBLE
from TheengsDecoder import decodeBLE

if platform.system() == "Linux":
from bleak.assigned_numbers import AdvertisementDataType
Expand Down
3 changes: 2 additions & 1 deletion TheengsGateway/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
import json
import re

from ._decoder import getProperties
from TheengsDecoder import getProperties

from .ble_gateway import Gateway, logger

ha_dev_classes = [
Expand Down
4 changes: 2 additions & 2 deletions docs/install/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ docker pull theengs/gateway
```

## Advanced users - Build and install
Clone the repository and its submodules:
Clone the repository:

```
git clone https://github.com/theengs/gateway.git
cd gateway
git submodule update --init --recursive
```

Change `version_tag` in `setup.py` to a valid version string such has `0.6.0` and then build the package:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ include = 'TheengsGateway\/.*\.pyi?$'
[tool.isort]
profile = "black"
[build-system]
requires = ["setuptools", "cmake", "wheel", "scikit-build", "ninja"]
requires = ["setuptools", "wheel"]
16 changes: 2 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
# read the contents of your README file
from pathlib import Path

from packaging import version
from skbuild import setup
from skbuild.cmaker import get_cmake_version
from skbuild.exceptions import SKBuildError
from setuptools import setup

this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text(encoding="utf-8")

# Add CMake as a build requirement if cmake is not installed
# or is too low a version
setup_requires = []
try:
if version.parse(get_cmake_version()) < version.parse("3.4"):
setup_requires.append("cmake")
except SKBuildError:
setup_requires.append("cmake")

setup(
name="TheengsGateway",
version="version_tag",
Expand All @@ -29,12 +17,12 @@
package_dir={"TheengsGateway": "TheengsGateway"},
packages=["TheengsGateway"],
scripts=["bin/TheengsGateway"],
setup_requires=setup_requires,
include_package_data=True,
install_requires=[
"bleak>=0.19.0",
"bluetooth-clocks<1.0",
"bluetooth-numbers>=1.0,<2.0",
"paho-mqtt>=1.6.1",
"TheengsDecoder>=1.3.0",
],
)

0 comments on commit 6cea45e

Please sign in to comment.