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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#!/usr/bin/env python3
# filestore: dmedia hashing protocol and file layout
# Copyright (C) 2011 Novacut Inc
#
# This file is part of `filestore`.
#
# `filestore` is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# `filestore` is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with `filestore`. If not, see <http://www.gnu.org/licenses/>.
#
# Authors:
# Jason Gerard DeRose <jderose@novacut.com>
"""
Install `filestore`.
"""
import sys
if sys.version_info < (3, 3):
sys.exit('ERROR: FileStore requires Python 3.3 or newer')
from distutils.core import setup, Extension
from distutils.cmd import Command
import filestore
from filestore.tests.run import run_tests
class Test(Command):
description = 'run unit tests and doc tests'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
if not run_tests():
raise SystemExit(2)
_filestore = Extension('_filestore', sources=['_filestore.c'])
setup(
name='filestore',
description='dmedia hashing protocol and file layout',
url='https://launchpad.net/filestore',
version=filestore.__version__,
author='Jason Gerard DeRose',
author_email='jderose@novacut.com',
license='AGPLv3+',
packages=[
'filestore',
'filestore.tests'
],
package_data={'filestore': ['data/*.json']},
scripts=['dmediasum'],
cmdclass={'test': Test},
ext_modules=[_filestore],
)
|