forked from silvercondor/Exchange-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
61 lines (50 loc) · 1.39 KB
/
Copy pathsetup.py
File metadata and controls
61 lines (50 loc) · 1.39 KB
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
#! /usr/bin/env python3
#-*- coding: utf-8 -*-
##
# ExchangeBot setup.py
# @author STYJ
# @contributor xlanor
##
import os
import sys
import contextlib
import pip
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
name = "Exchange bot"
rootdir = os.path.abspath(os.path.dirname(__file__))
links = []
requires = []
# Python 3.4 and above
if sys.version_info < (3, 4, 0, 'final', 0):
raise SystemExit('Python 3.4 or later is required!')
# Opening requirements.txt to obtain a list of libraries needed
# New versions of pip requires a session
requirements = pip.req.parse_requirements('requirements.txt',
session=pip.download.PipSession())
for item in requirements:
# we want to handle package names and also repo urls
if getattr(item, 'url', None): # older pip has url
links.append(str(item.url))
if getattr(item, 'link', None): # newer pip has link
links.append(str(item.link))
if item.req:
requires.append(str(item.req))
setup(
name='Exchange bot',
version='0.0.1',
url='https://github.com/STYJ/Exchange-Bot/',
license='',
author='STYJ',
author_email='',
description='An exchange bot',
long_description='An exchange bot to interact with users.',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
platforms='Linux/MacOS',
install_requires=requires,
dependency_links=links
)