Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include LICENSE
recursive-include homekit *.py
1 change: 1 addition & 0 deletions homekit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
MaxPeersError, MaxTriesError, ProtocolError, RequestRejected, UnavailableError, UnknownError, UnpairedError

from homekit.tools import IP_TRANSPORT_SUPPORTED
from .version import __version__

if IP_TRANSPORT_SUPPORTED:
# TODO: change import and let it be imported from its specific file
Expand Down
1 change: 1 addition & 0 deletions homekit/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.19.2"
2 changes: 1 addition & 1 deletion homekit/zeroconf_impl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_data(self):
"""
return self.data

def update_service(self, zeroconf, service_type, name, state_change):
def update_service(self, zeroconf, service_type, name, state_change=None):
# prevent FutureWarning: XXX has no update_service method. Provide one
# (it can be empty if you don't care about the updates), it'll become
# mandatory.
Expand Down
29 changes: 23 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,39 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import setuptools
import os.path
from setuptools import find_packages, setup


with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
def read(rel_path: str) -> str:
here = os.path.abspath(os.path.dirname(__file__))
# intentionally *not* adding an encoding option to open
with open(os.path.join(here, rel_path)) as fp:
return fp.read()


def get_version(rel_path: str) -> str:
for line in read(rel_path).splitlines():
if line.startswith("__version__"):
# __version__ = "0.9"
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
raise RuntimeError("Unable to find version string.")


setup(
name='homekit',
packages=setuptools.find_packages(exclude=['tests']),
version='0.18.0',
packages=find_packages(exclude=['tests']),
version=get_version("homekit/version.py"),
description='Python code to interface HomeKit Accessories and Controllers',
author='Joachim Lusiardi',
author_email='pypi@lusiardi.de',
url='https://github.com/jlusiardi/homekit_python',
download_url='https://github.com/jlusiardi/homekit_python/archive/0.18.0.tar.gz',
# Commented out as download_url is no longer used due to regular misuse and issues
# download_url='https://github.com/jlusiardi/homekit_python/archive/0.18.0.tar.gz',
keywords=['HomeKit'],
classifiers=[
'License :: OSI Approved :: Apache Software License',
Expand Down