1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
from platform import python_version
from sys import exit, version_info
from xml.etree import ElementTree
if version_info < (3, ):
print('Error: Python 3 required but found %s' % python_version())
exit(1)
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_updater.application:main'
]
}
)
|