forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move constants to setup.py (home-assistant#10312)
* Remove unused import * Move setup relevant consts to 'setup.py' * remove blank line * Set source
- Loading branch information
Showing
6 changed files
with
59 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,16 @@ | |
import homeassistant.helpers.config_validation as cv | ||
from homeassistant.const import ( | ||
CONF_DOMAIN, CONF_PASSWORD, CONF_TIMEOUT, CONF_USERNAME, HTTP_HEADER_AUTH, | ||
HTTP_HEADER_USER_AGENT, PROJECT_EMAIL) | ||
HTTP_HEADER_USER_AGENT) | ||
from homeassistant.helpers.aiohttp_client import SERVER_SOFTWARE | ||
|
||
_LOGGER = logging.getLogger(__name__) | ||
|
||
DOMAIN = 'no_ip' | ||
|
||
# We should set a dedicated address for the user agent. | ||
EMAIL = '[email protected]' | ||
|
||
INTERVAL = timedelta(minutes=5) | ||
|
||
DEFAULT_TIMEOUT = 10 | ||
|
@@ -38,7 +41,7 @@ | |
} | ||
|
||
UPDATE_URL = 'https://dynupdate.noip.com/nic/update' | ||
USER_AGENT = "{} {}".format(SERVER_SOFTWARE, PROJECT_EMAIL) | ||
USER_AGENT = "{} {}".format(SERVER_SOFTWARE, EMAIL) | ||
|
||
CONFIG_SCHEMA = vol.Schema({ | ||
DOMAIN: vol.Schema({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,37 +9,7 @@ | |
REQUIRED_PYTHON_VER_WIN = (3, 5, 2) | ||
CONSTRAINT_FILE = 'package_constraints.txt' | ||
|
||
PROJECT_NAME = 'Home Assistant' | ||
PROJECT_PACKAGE_NAME = 'homeassistant' | ||
PROJECT_LICENSE = 'Apache License 2.0' | ||
PROJECT_AUTHOR = 'The Home Assistant Authors' | ||
PROJECT_COPYRIGHT = ' 2013, {}'.format(PROJECT_AUTHOR) | ||
PROJECT_URL = 'https://home-assistant.io/' | ||
PROJECT_EMAIL = '[email protected]' | ||
PROJECT_DESCRIPTION = ('Open-source home automation platform ' | ||
'running on Python 3.') | ||
PROJECT_LONG_DESCRIPTION = ('Home Assistant is an open-source ' | ||
'home automation platform running on Python 3. ' | ||
'Track and control all devices at home and ' | ||
'automate control. ' | ||
'Installation in less than a minute.') | ||
PROJECT_CLASSIFIERS = [ | ||
'Intended Audience :: End Users/Desktop', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 3.4', | ||
'Topic :: Home Automation' | ||
] | ||
|
||
PROJECT_GITHUB_USERNAME = 'home-assistant' | ||
PROJECT_GITHUB_REPOSITORY = 'home-assistant' | ||
|
||
PYPI_URL = 'https://pypi.python.org/pypi/{}'.format(PROJECT_PACKAGE_NAME) | ||
GITHUB_PATH = '{}/{}'.format(PROJECT_GITHUB_USERNAME, | ||
PROJECT_GITHUB_REPOSITORY) | ||
GITHUB_URL = 'https://github.com/{}'.format(GITHUB_PATH) | ||
|
||
# Format for platforms | ||
PLATFORM_FORMAT = '{}.{}' | ||
|
||
# Can be used to specify a catch all when registering state or event listeners. | ||
|
@@ -48,8 +18,7 @@ | |
# If no name is specified | ||
DEVICE_DEFAULT_NAME = 'Unnamed Device' | ||
|
||
WEEKDAYS = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] | ||
|
||
# Sun events | ||
SUN_EVENT_SUNSET = 'sunset' | ||
SUN_EVENT_SUNRISE = 'sunrise' | ||
|
||
|
@@ -463,3 +432,5 @@ | |
TEMPERATURE = 'temperature' # type: str | ||
SPEED_MS = 'speed_ms' # type: str | ||
ILLUMINANCE = 'illuminance' # type: str | ||
|
||
WEEKDAYS = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,46 @@ | |
"""Home Assistant setup script.""" | ||
import os | ||
from setuptools import setup, find_packages | ||
from homeassistant.const import (__version__, PROJECT_PACKAGE_NAME, | ||
PROJECT_LICENSE, PROJECT_URL, | ||
PROJECT_EMAIL, PROJECT_DESCRIPTION, | ||
PROJECT_CLASSIFIERS, GITHUB_URL, | ||
PROJECT_AUTHOR) | ||
|
||
from homeassistant.const import __version__ | ||
|
||
PROJECT_NAME = 'Home Assistant' | ||
PROJECT_PACKAGE_NAME = 'homeassistant' | ||
PROJECT_LICENSE = 'Apache License 2.0' | ||
PROJECT_AUTHOR = 'The Home Assistant Authors' | ||
PROJECT_COPYRIGHT = ' 2013-2017, {}'.format(PROJECT_AUTHOR) | ||
PROJECT_URL = 'https://home-assistant.io/' | ||
PROJECT_EMAIL = '[email protected]' | ||
PROJECT_DESCRIPTION = ('Open-source home automation platform ' | ||
'running on Python 3.') | ||
PROJECT_LONG_DESCRIPTION = ('Home Assistant is an open-source ' | ||
'home automation platform running on Python 3. ' | ||
'Track and control all devices at home and ' | ||
'automate control. ' | ||
'Installation in less than a minute.') | ||
PROJECT_CLASSIFIERS = [ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: End Users/Desktop', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Topic :: Home Automation' | ||
] | ||
|
||
PROJECT_GITHUB_USERNAME = 'home-assistant' | ||
PROJECT_GITHUB_REPOSITORY = 'home-assistant' | ||
|
||
PYPI_URL = 'https://pypi.python.org/pypi/{}'.format(PROJECT_PACKAGE_NAME) | ||
GITHUB_PATH = '{}/{}'.format( | ||
PROJECT_GITHUB_USERNAME, PROJECT_GITHUB_REPOSITORY) | ||
GITHUB_URL = 'https://github.com/{}'.format(GITHUB_PATH) | ||
|
||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) | ||
DOWNLOAD_URL = ('{}/archive/' | ||
'{}.zip'.format(GITHUB_URL, __version__)) | ||
DOWNLOAD_URL = '{}/archive/{}.zip'.format(GITHUB_URL, __version__) | ||
|
||
PACKAGES = find_packages(exclude=['tests', 'tests.*']) | ||
|
||
|