Browse Source

Updated setup.py to install template files

Samuel Vestlin 6 years ago
parent
commit
f01fd9f838
1 changed files with 8 additions and 1 deletions
  1. 8 1
      setup.py

+ 8 - 1
setup.py

@@ -10,6 +10,11 @@ except ImportError:
     with io.open('README.md', encoding="utf-8") as f:
         readme = f.read()
 
+template_patterns = [
+    '*.yml',
+    '*.py',
+    ]
+
 setup(name='energy_meter_logger',
       version=0.1,
       description='Read Energy Meter data using RS485 Modbus '+
@@ -31,7 +36,9 @@ setup(name='energy_meter_logger',
       keywords='Energy Meter RS485 Modbus',
       install_requires=[]+(['pyserial','minimalmodbus', 'influxdb', 'pyyaml'] if "linux" in sys.platform else []),
       license='MIT',
-      packages=[],
+      packages=packages,
+      package_data=dict( (package_name, template_patterns)
+                         for package_name in packages ))
       include_package_data=True,
       tests_require=[],
       test_suite='',