Refactor setup.py to use fmtr.tools.Setup

This commit is contained in:
Edward Brown 2025-11-11 09:03:09 +00:00 • committed by Edward Brown
parent 666f625ed0
commit 77214fa26b
3 changed files with 22 additions and 36 deletions

9
build.env Normal file
View 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
View file

@ -0,0 +1,3 @@
[build-system]
requires = ["fmtr.tools[setup,debug]"]
build-backend = "setuptools.build_meta" #

View file

@ -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}',
)