99import sys
1010from shutil import rmtree
1111
12- from setuptools import setup , Command
12+ from setuptools import setup , Command , find_packages
1313
14- NAME = ' injective.sdk'
15- DESCRIPTION = ' Injective Python SDK, with Exchange API client'
16- URL = ' https://github.com/InjectiveLabs/sdk-python'
17- 18- AUTHOR = ' Injective Labs'
19- REQUIRES_PYTHON = ' >=3.9.0'
20- VERSION = ' 0.2.0'
14+ NAME = " injective-py"
15+ DESCRIPTION = " Injective Python SDK, with Exchange API client"
16+ URL = " https://github.com/InjectiveLabs/sdk-python"
17+ 18+ AUTHOR = " Injective Labs"
19+ REQUIRES_PYTHON = " >=3.9.0"
20+ VERSION = " 0.2.0"
2121
2222REQUIRED = [
23- 'grpcio' ,
24- 'asyncio' ,
25- 'aiohttp' ,
26- 'ecdsa' ,
27- 'bech32' ,
28- 'mnemonic' ,
29- 'hdwallets' ,
23+ "grpcio" ,
24+ "asyncio" ,
25+ "aiohttp" ,
26+ "ecdsa" ,
27+ "bech32" ,
28+ "mnemonic" ,
29+ "hdwallets" ,
30+ "pysha3" ,
3031]
3132
3233# The rest you shouldn't have to touch too much :)
3940# Import the README and use it as the long-description.
4041# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
4142try :
42- with io .open (os .path .join (here , ' README.md' ), encoding = ' utf-8' ) as f :
43- long_description = ' \n ' + f .read ()
43+ with io .open (os .path .join (here , " README.md" ), encoding = " utf-8" ) as f :
44+ long_description = " \n " + f .read ()
4445except FileNotFoundError :
4546 long_description = DESCRIPTION
4647
4748# Load the package's __version__.py module as a dictionary.
4849about = {}
4950if not VERSION :
5051 project_slug = NAME .lower ().replace ("-" , "_" ).replace (" " , "_" )
51- with open (os .path .join (here , project_slug , ' __version__.py' )) as f :
52+ with open (os .path .join (here , project_slug , " __version__.py" )) as f :
5253 exec (f .read (), about )
5354else :
54- about [' __version__' ] = VERSION
55+ about [" __version__" ] = VERSION
5556
5657
5758class UploadCommand (Command ):
5859 """Support setup.py upload."""
5960
60- description = ' Build and publish the package.'
61+ description = " Build and publish the package."
6162 user_options = []
6263
6364 @staticmethod
6465 def status (s ):
6566 """Prints things in bold."""
66- print (' \033 [1m{0}\033 [0m' .format (s ))
67+ print (" \033 [1m{0}\033 [0m" .format (s ))
6768
6869 def initialize_options (self ):
6970 pass
@@ -73,55 +74,52 @@ def finalize_options(self):
7374
7475 def run (self ):
7576 try :
76- self .status (' Removing previous builds…' )
77- rmtree (os .path .join (here , ' dist' ))
77+ self .status (" Removing previous builds…" )
78+ rmtree (os .path .join (here , " dist" ))
7879 except OSError :
7980 pass
8081
81- self .status (' Building Source and Wheel (universal) distribution…' )
82- os .system (' {0} setup.py sdist bdist_wheel --universal' .format (sys .executable ))
82+ self .status (" Building Source and Wheel (universal) distribution…" )
83+ os .system (" {0} setup.py sdist bdist_wheel --universal" .format (sys .executable ))
8384
84- self .status (' Uploading the package to PyPI via Twine…' )
85- os .system (' twine upload dist/*' )
85+ self .status (" Uploading the package to PyPI via Twine…" )
86+ os .system (" twine upload dist/*" )
8687
87- self .status (' Pushing git tags…' )
88- os .system (' git tag v{0}' .format (about [' __version__' ]))
89- os .system (' git push --tags' )
88+ self .status (" Pushing git tags…" )
89+ os .system (" git tag v{0}" .format (about [" __version__" ]))
90+ os .system (" git push --tags" )
9091
9192 sys .exit ()
9293
9394
9495# Where the magic happens:
9596setup (
9697 name = NAME ,
97- version = about [' __version__' ],
98+ version = about [" __version__" ],
9899 description = DESCRIPTION ,
99100 long_description = long_description ,
100- long_description_content_type = ' text/markdown' ,
101+ long_description_content_type = " text/markdown" ,
101102 author = AUTHOR ,
102103 author_email = EMAIL ,
103104 python_requires = REQUIRES_PYTHON ,
104105 url = URL ,
105- py_modules = ['exchange_api' , 'chainclient' ],
106-
107- # entry_points={
108- # 'console_scripts': ['mycli=mymodule:cli'],
109- # },
106+ package_dir = {"" : "src" },
107+ packages = find_packages (where = "src" ),
110108 install_requires = REQUIRED ,
111109 include_package_data = True ,
112- license = ' Apache 2.0' ,
110+ license = " Apache Software License 2.0" ,
113111 classifiers = [
114112 # Trove classifiers
115113 # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
116- ' License :: OSI Approved :: Apache 2.0 License' ,
117- ' Programming Language :: Python' ,
118- ' Programming Language :: Python :: 3' ,
119- ' Programming Language :: Python :: 3.9' ,
120- ' Programming Language :: Python :: Implementation :: CPython' ,
121- ' Programming Language :: Python :: Implementation :: PyPy'
114+ " License :: OSI Approved :: Apache Software License" ,
115+ " Programming Language :: Python" ,
116+ " Programming Language :: Python :: 3" ,
117+ " Programming Language :: Python :: 3.9" ,
118+ " Programming Language :: Python :: Implementation :: CPython" ,
119+ " Programming Language :: Python :: Implementation :: PyPy" ,
122120 ],
123121 # $ setup.py publish support.
124122 cmdclass = {
125- ' upload' : UploadCommand ,
123+ " upload" : UploadCommand ,
126124 },
127- )
125+ )
0 commit comments