hass-core/setup.py
Martin Hjelmare ba019c799a Make deps directory persistent over upgrades (#7801)
* Use pip install --user if venv not active

* Set PYTHONUSERBASE to deps directory, when installing with --user
  option.
* Reset --prefix option to workaround incompatability when installing
  with --user option. This requires pip version 8.0.0 or greater.
* Require pip version 8.0.3.
* Do not delete deps directory on home assistant upgrade.
* Fix local lib mount and check package exist.

* Update and add tests

* Fix upgrade from before version 0.46

* Extract function to get user site

* Add function(s) to package util to get user site.
* Use async subprocess for one of the functions to get user site.
* Add function to package util to check if virtual environment is
  active.
* Add and update tests.

* Update version for last removal of deps dir

* Address comments

* Rewrite package util tests with pytest

* Rewrite all existing unittest class based tests for package util as
  test functions, and capitalize pytest fixtures.
* Add test for installing with target inside venv.
2017-07-13 19:26:21 -07:00

53 lines
1.4 KiB
Python
Executable file

#!/usr/bin/env python3
"""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)
HERE = os.path.abspath(os.path.dirname(__file__))
DOWNLOAD_URL = ('{}/archive/'
'{}.zip'.format(GITHUB_URL, __version__))
PACKAGES = find_packages(exclude=['tests', 'tests.*'])
REQUIRES = [
'requests==2.14.2',
'pyyaml>=3.11,<4',
'pytz>=2017.02',
'pip>=8.0.3',
'jinja2>=2.9.5',
'voluptuous==0.10.5',
'typing>=3,<4',
'aiohttp==2.2.3',
'async_timeout==1.2.1',
'chardet==3.0.4',
'astral==1.4',
]
setup(
name=PROJECT_PACKAGE_NAME,
version=__version__,
license=PROJECT_LICENSE,
url=PROJECT_URL,
download_url=DOWNLOAD_URL,
author=PROJECT_AUTHOR,
author_email=PROJECT_EMAIL,
description=PROJECT_DESCRIPTION,
packages=PACKAGES,
include_package_data=True,
zip_safe=False,
platforms='any',
install_requires=REQUIRES,
test_suite='tests',
keywords=['home', 'automation'],
entry_points={
'console_scripts': [
'hass = homeassistant.__main__:main'
]
},
classifiers=PROJECT_CLASSIFIERS,
)