summaryrefslogtreecommitdiffstats
path: root/bin/updater/setup.py
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-12-04 10:32:23 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-12-04 10:32:23 +0100
commit69624de11f8ec6c5fb59c6e099447d6644fb5d5a (patch)
treee96a53dd17a68eda5b9ed9531f129fae58a83b45 /bin/updater/setup.py
parent90ae9ae044f2505954374fd155890315a8bb64f8 (diff)
add systemd scripts for updater
Diffstat (limited to 'bin/updater/setup.py')
-rw-r--r--bin/updater/setup.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/bin/updater/setup.py b/bin/updater/setup.py
new file mode 100644
index 000000000..8c1173587
--- /dev/null
+++ b/bin/updater/setup.py
@@ -0,0 +1,39 @@
+from os import exit
+from xml.etree import ElementTree
+
+try:
+ from setuptools import setup, find_packages
+except ImportError as e:
+ print('Could not find setuptools. Did you install the package?')
+ exit(1)
+
+with open('requirements.txt', 'r') as infile:
+ install_requires = infile.read().split('\n')
+
+with open('README.rst', 'r') as infile:
+ long_description = infile.read()
+
+# parse version from info.xml
+tree = ElementTree.parse('../../appinfo/info.xml')
+for element in tree.findall('version'):
+ version = element.text
+
+setup (
+ name = 'owncloud-news-updater',
+ version = version,
+ description = 'ownCloud news updater',
+ long_description = long_description,
+ author = 'Bernhard Posselt',
+ author_email = 'dev@bernhard-posselt.com',
+ url = 'https://github.com/owncloud/news',
+ packages = find_packages(),
+ include_package_data = True,
+ license = 'AGPL',
+ install_requires = install_requires,
+ keywords = ['owncloud', 'news', 'updater'],
+ entry_points = {
+ 'console_scripts': [
+ 'owncloud-news-updater = owncloud_news.application:main'
+ ]
+ }
+)