mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix setup.py unicode version errors
This commit is contained in:
parent
b0bd1fadac
commit
3520255b7c
12
setup.py
12
setup.py
@ -1,15 +1,11 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
from homeassistant.const import __version__
|
||||||
|
|
||||||
PACKAGE_NAME = 'homeassistant'
|
PACKAGE_NAME = 'homeassistant'
|
||||||
HERE = os.path.abspath(os.path.dirname(__file__))
|
HERE = os.path.abspath(os.path.dirname(__file__))
|
||||||
with open(os.path.join(HERE, PACKAGE_NAME, 'const.py'),
|
DOWNLOAD_URL = ('https://github.com/balloob/home-assistant/archive/'
|
||||||
encoding='utf-8') as fp:
|
'{}.zip'.format(__version__))
|
||||||
VERSION = re.search(
|
|
||||||
"__version__ = ['\"]([^']+)['\"]\n", fp.read()).group(1)
|
|
||||||
DOWNLOAD_URL = \
|
|
||||||
'https://github.com/balloob/home-assistant/archive/{}.zip'.format(VERSION)
|
|
||||||
|
|
||||||
PACKAGES = find_packages(exclude=['tests', 'tests.*']) + \
|
PACKAGES = find_packages(exclude=['tests', 'tests.*']) + \
|
||||||
['homeassistant.external', 'homeassistant.external.noop',
|
['homeassistant.external', 'homeassistant.external.noop',
|
||||||
@ -29,7 +25,7 @@ REQUIRES = [
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=PACKAGE_NAME,
|
name=PACKAGE_NAME,
|
||||||
version=VERSION,
|
version=__version__,
|
||||||
license='MIT License',
|
license='MIT License',
|
||||||
url='https://home-assistant.io/',
|
url='https://home-assistant.io/',
|
||||||
download_url=DOWNLOAD_URL,
|
download_url=DOWNLOAD_URL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user