1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4# Copyright (C) 2013 by Łukasz Langa
5#
6# Permission is hereby granted, free of charge, to any person obtaining a copy
7# of this software and associated documentation files (the "Software"), to deal
8# in the Software without restriction, including without limitation the rights
9# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10# copies of the Software, and to permit persons to whom the Software is
11# furnished to do so, subject to the following conditions:
12
13# The above copyright notice and this permission notice shall be included in
14# all copies or substantial portions of the Software.
15
16# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22# THE SOFTWARE.
23
24import codecs
25import os
26import sys
27from setuptools import setup, find_packages
28
29current_dir = os.path.abspath(os.path.dirname(__file__))
30ld_file = codecs.open(os.path.join(current_dir, 'README.rst'), encoding='utf8')
31try:
32    long_description = ld_file.read()
33finally:
34    ld_file.close()
35# We let it die a horrible tracebacking death if reading the file fails.
36# We couldn't sensibly recover anyway: we need the long description.
37
38sys.path.insert(0, current_dir + os.sep + 'src')
39from bitrot import VERSION
40release = ".".join(str(num) for num in VERSION)
41
42setup(
43    name = 'bitrot',
44    version = release,
45    author = u'Łukasz Langa',
46    author_email = 'lukasz@langa.pl',
47    description = ("Detects bit rotten files on the hard drive to save your "
48                   "precious photo and music collection from slow decay."),
49    long_description = long_description,
50    url = 'https://github.com/ambv/bitrot/',
51    keywords = 'file checksum database',
52    platforms = ['any'],
53    license = 'MIT',
54    package_dir = {'': 'src'},
55    packages = find_packages('src'),
56    py_modules = ['bitrot'],
57    scripts = ['bin/bitrot'],
58    include_package_data = True,
59    zip_safe = False, # if only because of the readme file
60    install_requires = [
61        'futures; python_version == "2.7"'
62    ],
63    classifiers = [
64        'Development Status :: 4 - Beta',
65        'License :: OSI Approved :: MIT License',
66        'Natural Language :: English',
67        'Programming Language :: Python :: 2.7',
68        'Programming Language :: Python :: 3',
69        'Programming Language :: Python :: 3.7',
70        'Programming Language :: Python :: 3.8',
71        'Programming Language :: Python',
72        'Topic :: System :: Filesystems',
73        'Topic :: System :: Monitoring',
74        'Topic :: Software Development :: Libraries :: Python Modules',
75        ]
76    )
77