chiark / gitweb /
include README.rst in official release source tarball
[fdroidserver.git] / setup.py
1 #!/usr/bin/env python3
2
3 from setuptools import setup
4 import os
5 import shutil
6 import sys
7
8 # workaround issue on OSX or --user installs, where sys.prefix is not an installable location
9 if os.access(sys.prefix, os.W_OK | os.X_OK):
10     data_prefix = sys.prefix
11 else:
12     data_prefix = '.'
13
14 # PyPI accepts reST not Markdown
15 if os.path.exists('README.md'):
16     if shutil.which('pandoc'):
17         print('Using reST README')
18         import subprocess
19         subprocess.check_call(['pandoc', '--from=markdown', '--to=rst', 'README.md',
20                                '--output=README.rst'], universal_newlines=True)
21         with open('README.rst') as fp:
22             readme = fp.read()
23     else:
24         print('Using Markdown README')
25         with open('README.md') as fp:
26             readme = fp.read()
27 else:
28     readme = ''
29
30 setup(name='fdroidserver',
31       version='0.8',
32       description='F-Droid Server Tools',
33       long_description=readme,
34       author='The F-Droid Project',
35       author_email='team@f-droid.org',
36       url='https://f-droid.org',
37       license='AGPL-3.0',
38       packages=['fdroidserver', 'fdroidserver.asynchronousfilereader'],
39       scripts=['fdroid', 'fd-commit', 'makebuildserver'],
40       data_files=[
41           (data_prefix + '/share/doc/fdroidserver/examples',
42               ['buildserver/config.buildserver.py',
43                'examples/config.py',
44                'examples/fdroid-icon.png',
45                'examples/makebuildserver.config.py',
46                'examples/opensc-fdroid.cfg',
47                'examples/public-read-only-s3-bucket-policy.json',
48                'examples/template.yml']),
49       ],
50       python_requires='>=3.4',
51       install_requires=[
52           'clint',
53           'GitPython',
54           'mwclient',
55           'paramiko',
56           'Pillow',
57           'apache-libcloud >= 0.14.1',
58           'pyasn1',
59           'pyasn1-modules',
60           'python-vagrant',
61           'PyYAML',
62           'ruamel.yaml >= 0.13',
63           'requests >= 2.5.2, != 2.11.0, != 2.12.2, != 2.18.0',
64           'docker-py >= 1.9, < 2.0',
65       ],
66       classifiers=[
67           'Development Status :: 4 - Beta',
68           'Intended Audience :: Developers',
69           'Intended Audience :: Information Technology',
70           'Intended Audience :: System Administrators',
71           'Intended Audience :: Telecommunications Industry',
72           'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
73           'Operating System :: POSIX',
74           'Operating System :: MacOS :: MacOS X',
75           'Operating System :: Unix',
76           'Topic :: Utilities',
77       ],
78       )