blob: c813edf325f3f132173c6b56e3e35e8e686db47b [file] [log] [blame]
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Build the local-agent Python package."""
import os
from setuptools import find_packages, setup
import sys
def get_version() -> str:
"""Gets the package version from single source of truth."""
version_module = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
'local_agent/version.py')
globals_in_version_module = {}
exec(open(version_module, 'r').read(), globals_in_version_module)
return globals_in_version_module['__version__']
# Package meta-data
NAME = 'Local-Agent'
DESCRIPTION = 'Local Agent in Smart Home Test Suite'
REQUIRES_PYTHON = '>=3.7'
VERSION = get_version()
LICENSE = 'Copyright 2022 Google LLC'
REQUIRED_MODULES = [
'gazoo-device >= 1.67.0', 'inflection', 'requests >= 2.25.0', 'wheel']
TEST_REQUIRED_MODULES = {
'test': ['coverage', 'immutabledict', 'parameterized']}
setup(
name = NAME,
version = VERSION,
description = DESCRIPTION,
license = LICENSE,
packages = find_packages(exclude=('tests')),
python_requires = REQUIRES_PYTHON,
install_requires = REQUIRED_MODULES,
extras_require = TEST_REQUIRED_MODULES,
entry_points = {
'console_scripts': ['local-agent = local_agent.local_agent:main']
}
)