-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup.py
executable file
·111 lines (105 loc) · 5 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# File: setup.py
#
# Part of ‘UNICORN Binance Local Depth Cache’
# Project website: https://www.lucit.tech/unicorn-binance-local-depth-cache.html
# Github: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-local-depth-cache
# Documentation: https://unicorn-binance-local-depth-cache.docs.lucit.tech
# PyPI: https://pypi.org/project/unicorn-binance-local-depth-cache
# LUCIT Online Shop: https://shop.lucit.services/software
#
# License: LSOSL - LUCIT Synergetic Open Source License
# https://github.com/LUCIT-Systems-and-Development/unicorn-binance-local-depth-cache/blob/master/LICENSE
#
# Author: LUCIT Systems and Development
#
# Copyright (c) 2022-2023, LUCIT Systems and Development (https://www.lucit.tech)
# All rights reserved.
from Cython.Build import cythonize
from setuptools import setup, find_packages, Extension
import os
import shutil
import subprocess
name = "unicorn-binance-local-depth-cache"
source_dir = "unicorn_binance_local_depth_cache"
stubs_dir = "stubs"
extensions = [
Extension("*", [f"{source_dir}/*.py"]),
]
# Setup
GEN_STUBS = True
for filename in os.listdir(source_dir):
if filename.endswith('.pyi'):
GEN_STUBS = False
if GEN_STUBS is False:
print("Skipping stub files ...")
else:
print("Generating stub files ...")
os.makedirs(stubs_dir, exist_ok=True)
for filename in os.listdir(source_dir):
if filename.endswith('.py'):
source_path = os.path.join(source_dir, filename)
subprocess.run(['stubgen', '-o', stubs_dir, source_path], check=True)
for stub_file in os.listdir(os.path.join(stubs_dir, source_dir)):
if stub_file.endswith('.pyi'):
source_stub_path = os.path.join(stubs_dir, source_dir, stub_file)
if os.path.exists(os.path.join(source_dir, stub_file)):
print(f"Skipped moving {source_stub_path} because {os.path.join(source_dir, stub_file)} already exists!")
else:
shutil.move(source_stub_path, source_dir)
print(f"Moved {source_stub_path} to {source_dir}!")
shutil.rmtree(os.path.join(stubs_dir))
print("Stub files generated and moved successfully.")
with open("README.md", "r") as fh:
print("Using README.md content as `long_description` ...")
long_description = fh.read()
setup(
name=name,
version="2.8.0",
author="LUCIT Systems and Development",
author_email='[email protected]',
url="https://github.com/LUCIT-Systems-and-Development/unicorn-binance-local-depth-cache",
description="A Python SDK by LUCIT for accessing and managing multiple local Binance order books with Python in a "
"simple, fast, flexible, robust and fully featured way. .",
long_description=long_description,
long_description_content_type="text/markdown",
license='LSOSL - LUCIT Synergetic Open Source License',
install_requires=['aiohttp', 'lucit-licensing-python>=1.8.2', 'Cython>=3.0.10', 'requests>=2.32.3',
'unicorn-binance-websocket-api>=2.8.1', 'unicorn-binance-rest-api>=2.6.1'],
keywords='binance, depth cache',
project_urls={
'Documentation': 'https://unicorn-binance-local-depth-cache.docs.lucit.tech',
'Wiki': 'https://github.com/LUCIT-Systems-and-Development/unicorn-binance-local-depth-cache/wiki',
'Author': 'https://www.lucit.tech',
'Changes': 'https://unicorn-binance-local-depth-cache.docs.lucit.tech/changelog.html',
'License': 'https://unicorn-binance-local-depth-cache.docs.lucit.tech/license.html',
'Issue Tracker': 'https://github.com/LUCIT-Systems-and-Development/unicorn-binance-local-depth-cache/issues',
'Chat': 'https://gitter.im/unicorn-binance-suite/unicorn-binance-local-depth-cache',
'Telegram': 'https://t.me/unicorndevs',
'Get Support': 'https://www.lucit.tech/get-support.html',
'LUCIT Online Shop': 'https://shop.lucit.services/software',
},
packages=find_packages(exclude=[f"dev/{source_dir}"], include=[source_dir]),
ext_modules=cythonize(extensions, compiler_directives={'language_level': "3"}),
python_requires='>=3.8.0',
package_data={'': ['*.so', '*.dll', '*.py', '*.pyd', '*.pyi']},
include_package_data=True,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: Other/Proprietary License",
'Intended Audience :: Developers',
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Topic :: Office/Business :: Financial :: Investment",
'Topic :: Software Development :: Libraries :: Python Modules',
],
)