mirror of
https://github.com/fmtr/haco.git
synced 2026-10-26 10:51:46 -04:00
Refactor setup.py to use fmtr.tools.Setup
This commit is contained in:
parent
666f625ed0
commit
c97b08e193
3 changed files with 22 additions and 36 deletions
9
build.env
Normal file
9
build.env
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
CHANNEL="prod"
|
||||
#ORG="fmtr"
|
||||
PACKAGE="haco"
|
||||
PORT="06"
|
||||
BASE="python"
|
||||
HOST="ws.lan"
|
||||
COMPUTE="cpu"
|
||||
EXTRAS="all"
|
||||
#ENTRYPOINT="fmtr-dns-launch"
|
||||
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[build-system]
|
||||
requires = ["fmtr.tools[setup,debug]"]
|
||||
build-backend = "setuptools.build_meta" #
|
||||
46
setup.py
46
setup.py
|
|
@ -1,40 +1,14 @@
|
|||
from pathlib import Path
|
||||
from fmtr.tools import Setup
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
packages = find_packages()
|
||||
name = next(iter(packages))
|
||||
path_base = Path(__file__).absolute().parent
|
||||
path = path_base / name / 'version'
|
||||
__version__ = path.read_text().strip()
|
||||
|
||||
setup(
|
||||
long_description=(path_base / 'README.md').read_text(),
|
||||
long_description_content_type='text/markdown',
|
||||
name=name,
|
||||
version=__version__,
|
||||
url=f'https://fmtr.link/{name}',
|
||||
license='Copyright © 2023 Frontmatter. All rights reserved.',
|
||||
author='Frontmatter',
|
||||
setup = Setup(
|
||||
org=None,
|
||||
dependencies=dict(
|
||||
install=[
|
||||
'fmtr.tools[version.dev,logging,sets,yaml,debug,caching,api]',
|
||||
'aiomqtt<2'
|
||||
]
|
||||
),
|
||||
description='Home Assistant Control Objects',
|
||||
keywords='homeassistant controls python tasmota',
|
||||
packages=packages,
|
||||
package_data={
|
||||
name: [f'version'],
|
||||
},
|
||||
install_requires=[
|
||||
'aiomqtt<2',
|
||||
'pyyaml',
|
||||
'requests'
|
||||
],
|
||||
extras_require={
|
||||
'tasmota': [
|
||||
|
||||
]
|
||||
},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
f'{name}-daemon = {name}.start:main',
|
||||
],
|
||||
}
|
||||
# url=f'https://fmtr.link/{name}',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue