-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
128 lines (111 loc) · 4.16 KB
/
setup.py
File metadata and controls
128 lines (111 loc) · 4.16 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
"""
Setup configuration for SuiPy SDK.
"""
from setuptools import setup, find_packages
from setuptools.command.install import install
from setuptools.command.develop import develop
from setuptools.command.egg_info import egg_info
import os
import sys
# Read README for long description
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
# Read requirements with fallback
requirements = []
requirements_file = "requirements.txt"
if os.path.exists(requirements_file):
with open(requirements_file, "r", encoding="utf-8") as fh:
requirements = [line.strip() for line in fh if line.strip() and not line.startswith("#")]
else:
# Fallback requirements if file not found during build
requirements = [
"httpx>=0.25.0",
"typing-extensions>=4.0.0",
"pynacl>=1.5.0",
"ecdsa>=0.18.0",
"base58>=2.1.0"
]
def display_ascii_art():
"""Display ASCII art during installation."""
print("\n" + "="*80)
ascii_art = """
███████╗ •• ██████╗
██╔════╝██╗ ██╗██║██╔══██╗██╗ ██╗
███████╗██║ ██║██║██████╔╝╚██╗ ██╔╝
╚════██║██║ ██║██║██╔═══╝ ╚████╔╝
███████║╚██████╔╝██║██║ ╚██╔╝
╚══════╝ ╚═════╝ ╚═╝╚═╝ ██║
╚═╝
a deliciously lightweight, high-performance Python SDK for the Sui blockchain
by OpenDive (@OpenDiveHQ)
"""
print(ascii_art)
print("="*80 + "\n")
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
display_ascii_art()
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
develop.run(self)
display_ascii_art()
class PostEggInfoCommand(egg_info):
"""Post-installation for egg_info mode."""
def run(self):
egg_info.run(self)
# Only show during pip install, not just egg_info generation
if '--single-version-externally-managed' in sys.argv or 'install' in sys.argv:
display_ascii_art()
setup(
name="sui-py",
version="0.1.0",
author="SuiPy Team",
author_email="team@suipy.dev",
description="A lightweight, high-performance Python SDK for the Sui blockchain",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/your-org/sui-py",
packages=find_packages(),
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"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",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Office/Business :: Financial",
],
python_requires=">=3.8",
install_requires=requirements,
cmdclass={
'install': PostInstallCommand,
'develop': PostDevelopCommand,
'egg_info': PostEggInfoCommand,
},
extras_require={
"dev": [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"black>=23.0.0",
"isort>=5.12.0",
"mypy>=1.0.0",
"flake8>=6.0.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.10.0",
],
},
keywords="sui blockchain crypto web3 async sdk",
project_urls={
"Bug Reports": "https://github.com/your-org/sui-py/issues",
"Source": "https://github.com/your-org/sui-py",
"Documentation": "https://sui-py.readthedocs.io/",
},
)