forked from yingqiuz/netflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
52 lines (42 loc) · 1.3 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for netflows
you can install netflows with
python setup.py install
"""
import os
import sys
import setuptools
if sys.argv[-1] == 'setup.py':
print("To install, run 'python setup.py install'")
print()
if sys.version_info[:2] < (3, 5):
print("netflows requires Python 3.5 or later (%d.%d detected)." %
sys.version_info[:2])
sys.exit(-1)
# write the version information
sys.path.insert(0, 'netflows')
import info
sys.path.pop(0)
# get long description from README
curr_path = os.path.dirname(__file__)
with open(os.path.join(curr_path, info.__longdesc__), "r") as fh:
long_description = fh.read()
if __name__ == "__main__":
setuptools.setup(
name=info.__packagename__,
version=info.__version__,
author=info.__author__,
author_email=info.__email__,
description=info.__description__,
long_description=long_description,
long_description_content_type=info.__longdesctype__,
url=info.__url__,
packages=setuptools.find_packages(exclude=['netflows/tests']),
classifiers=info.CLASSIFIERS,
install_requires=info.REQUIRES,
extras_requires=info.EXTRAS_REQUIRE,
test_requires=info.TESTS_REQUIRE,
license=info.__license__,
)