1
|
|
|
#!/usr/bin/env python |
2
|
|
|
|
3
|
|
|
""" |
4
|
|
|
hansel |
5
|
|
|
------ |
6
|
|
|
|
7
|
|
|
Flexible parametric file paths to make queries, build folder trees and |
8
|
|
|
smart folder structure access. |
9
|
|
|
""" |
10
|
|
|
import io |
11
|
|
|
|
12
|
|
|
from setuptools import setup, find_packages |
13
|
|
|
|
14
|
|
|
|
15
|
|
|
requirements = [ |
16
|
|
|
'click>=6.7', |
17
|
|
|
] |
18
|
|
|
|
19
|
|
|
|
20
|
|
|
# long description |
21
|
|
|
def read(*filenames, **kwargs): |
22
|
|
|
encoding = kwargs.get('encoding', 'utf-8') |
23
|
|
|
sep = kwargs.get('sep', '\n') |
24
|
|
|
buf = [] |
25
|
|
|
for filename in filenames: |
26
|
|
|
with io.open(filename, encoding=encoding) as f: |
27
|
|
|
buf.append(f.read()) |
28
|
|
|
return sep.join(buf) |
29
|
|
|
|
30
|
|
|
|
31
|
|
|
setup_dict = dict( |
32
|
|
|
name='hansel', |
33
|
|
|
version='version="2.0.0",', |
34
|
|
|
description='Easily traverse your structured folder tree.', |
35
|
|
|
url='https://pypi.python.org/pypi/hansel', |
36
|
|
|
license='Apache 2.0', |
37
|
|
|
author='alexsavio', |
38
|
|
|
author_email='[email protected]', |
39
|
|
|
maintainer='alexsavio', |
40
|
|
|
maintainer_email='[email protected]', |
41
|
|
|
packages=find_packages(exclude=['tests']), |
42
|
|
|
install_requires=requirements, |
43
|
|
|
|
44
|
|
|
entry_points=''' |
45
|
|
|
[console_scripts] |
46
|
|
|
crumb=hansel.cli:cli |
47
|
|
|
''', |
48
|
|
|
|
49
|
|
|
long_description=read('README.rst', 'CHANGES.rst'), |
50
|
|
|
platforms='Linux/MacOSX', |
51
|
|
|
|
52
|
|
|
# https://pypi.python.org/pypi?%3Aaction=list_classifiers |
53
|
|
|
classifiers=[ |
54
|
|
|
'Programming Language :: Python', |
55
|
|
|
'Development Status :: 5 - Production/Stable', |
56
|
|
|
'Natural Language :: English', |
57
|
|
|
'Environment :: Console', |
58
|
|
|
'License :: OSI Approved :: Apache Software License', |
59
|
|
|
'Operating System :: OS Independent', |
60
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules', |
61
|
|
|
'Operating System :: POSIX', |
62
|
|
|
'Operating System :: Unix', |
63
|
|
|
'Operating System :: MacOS', |
64
|
|
|
'Programming Language :: Python :: 3.6', |
65
|
|
|
], |
66
|
|
|
) |
67
|
|
|
|
68
|
|
|
if __name__ == '__main__': |
69
|
|
|
setup(**setup_dict) |
70
|
|
|
|