This repository was archived by the owner on Feb 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
88 lines (63 loc) · 2.11 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/usr/bin/python2
"""Setup script for twod."""
from setuptools import setup, find_packages
import codecs
import os
import sys
import setuptools
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the relevant file
with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
def get_version(fname='twod/_version.py'):
"""Fetch version from file."""
with open(fname) as f:
for line in f:
if line.startswith('__version__'):
return (line.split('=')[-1].strip().strip('"'))
INSTALL_REQUIRES = [
'requests>=2.8.1',
'lockfile>=0.9.1',
]
EXTRAS_REQUIRE = {}
# Different versions of dependencies depending on python version
if sys.version_info[0:2] < (3, 0):
INSTALL_REQUIRES.append("python-daemon<2.0")
else:
INSTALL_REQUIRES.append("python-daemon>2.1.1")
# Additional requirements for python 2
if int(setuptools.__version__.split(".", 1)[0]) < 18:
assert "bdist_wheel" not in sys.argv, "setuptools 18 required for wheels."
if sys.version_info[0:2] < (3, 0):
INSTALL_REQUIRES.append("configparser>=3.5.0")
else:
EXTRAS_REQUIRE[":python_version<'3.0'"] = ["configparser>=3.5.0"]
setup(
name="twod",
version=get_version(),
description="twod TwoDNS host IP updater",
long_description=long_description,
# The project URL.
url='https://github.com/tablet-mode/twod',
# Author details
author='Thomas Kager',
author_email='tablet-mode@monochromatic.cc',
# Choose your license
license='GPLv3',
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GPLv3 License',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
keywords='daemon dns',
packages=find_packages(exclude=["docs", "tests*"]),
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
package_data={},
data_files=[],
entry_points={
'console_scripts': ['twod = twod.twod:main', ]
},
)