mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 11:00:10 +01:00
714b3b9ff6
It will make it a lot easier to manage the cache if we use the original file names, which often include the file version. This also changes the download process to be resumable if there is a partial file in the cache, and switches from calling wget on the command line to using the python libs 'requests' and 'clint' to provide a similar experience. While its not so important for this particular bit of code to use those libraries, I think those two will allow us to provide a better user experience throughout the whole of fdroidserver. In this case, it is already doing special tricks fetching the file size from the server before trying to download it. I suppose this code could instead check if the file exists, and if so, check the hash sum. I think that would be slower for most people since checking the hash on large files takes a noticeable about of time, while a HTTP HEAD request is pretty tiny.
49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
#!/usr/bin/env python3
|
|
|
|
from setuptools import setup
|
|
import sys
|
|
|
|
# workaround issue on OSX, where sys.prefix is not an installable location
|
|
if sys.platform == 'darwin' and sys.prefix.startswith('/System'):
|
|
data_prefix = '.'
|
|
else:
|
|
data_prefix = sys.prefix
|
|
|
|
setup(name='fdroidserver',
|
|
version='0.6.0',
|
|
description='F-Droid Server Tools',
|
|
long_description=open('README.md').read(),
|
|
author='The F-Droid Project',
|
|
author_email='team@f-droid.org',
|
|
url='https://f-droid.org',
|
|
packages=['fdroidserver', 'fdroidserver.asynchronousfilereader'],
|
|
scripts=['fdroid', 'fd-commit'],
|
|
data_files=[
|
|
(data_prefix + '/share/doc/fdroidserver/examples',
|
|
['buildserver/config.buildserver.py',
|
|
'examples/config.py',
|
|
'examples/makebuildserver.config.py',
|
|
'examples/opensc-fdroid.cfg',
|
|
'examples/fdroid-icon.png']),
|
|
],
|
|
install_requires=[
|
|
'clint',
|
|
'GitPython',
|
|
'mwclient',
|
|
'paramiko',
|
|
'Pillow',
|
|
'apache-libcloud >= 0.14.1',
|
|
'pyasn1',
|
|
'pyasn1-modules',
|
|
'PyYAML',
|
|
'requests',
|
|
],
|
|
classifiers=[
|
|
'Development Status :: 3 - Alpha',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
|
|
'Operating System :: POSIX',
|
|
'Topic :: Utilities',
|
|
],
|
|
)
|