-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
56 lines (48 loc) · 1.62 KB
/
setup.py
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import restorething
from setuptools import setup, find_packages
from codecs import open
import sys
import os
import re
def get_version(path):
with open(path, encoding='utf-8') as f:
version_file = f.read()
regex = r"^__version__ = ['\"]([^'\"]*)['\"]"
version_match = re.search(regex, version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string in %s.', version_file)
with open('README.rst', encoding='utf-8') as f:
readme = f.read()
with open('LICENSE', encoding='utf-8') as f:
license = f.read()
if os.name == 'nt':
requirements=['win_unicode_console>=0.5']
else:
requirements=[]
setup(
name='restorething',
version=get_version('restorething/_version.py'),
description='restorething is a tool for restoring files from a syncthing versioning archive',
long_description=readme,
author='Mick Shine',
author_email='[email protected]',
url='https://github.com/madmickstar/restorething',
license=license,
packages=find_packages(exclude=('tests', 'docs')),
install_requires=requirements,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Topic :: Utilities',
],
)