Prepare pypi packaging

This commit is contained in:
Ben Roberts
2020-09-06 15:43:51 +01:00
parent c1cc54436c
commit 7f765f363a
3 changed files with 46 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build/

8
config.yaml.example Normal file
View File

@@ -0,0 +1,8 @@
---
mqtt:
username: brightuser
password: brightpass
topic: SMART/HILD/xxxxxxxx
influx:
server: localhost
port: 8428

37
setup.py Normal file
View File

@@ -0,0 +1,37 @@
from distutils.core import setup
from glob import glob # Needed for the examples below only
import setuptools
from energy_usage import VERSION
setup(
name="energy-usage",
version=VERSION,
description="Records realtime energy usage from a Glowmarkt MQTT feed into influxdb",
author="Ben Roberts",
author_email="me@benroberts.net",
url="https://gitlab.sihnon.net/ben/energy-usage",
# Distribute all python packages within this repository except tests
packages=setuptools.find_packages(exclude=['tests*']),
# If necessary, include non-python files stored in your package
package_data={
'energy_usage': ['config_default.yaml'],
},
# Executable scripts
# Wrappers will be automatically generated using the correct python shebang
# to run the methods indicated
entry_points={
'console_scripts': [
'energy-usage=energy_usage.main:main',
]
},
# Extra content like lib directories, config files from outside of the package
data_files=[
('/etc/energy-usage/config.yaml.example', ['config.yaml.example']),
],
)