aboutsummaryrefslogtreecommitdiffstats
path: root/python-packages/sra_client/setup.py
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:58:34 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-15 07:58:34 +0800
commit8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023 (patch)
tree608b52c60fb24777274de78174e69b88a75362e0 /python-packages/sra_client/setup.py
parent67422db4bd0b194296a1a584af7ead089e281715 (diff)
parent6d45beccad44e86ddd692d0cf54c09c29c5d9daf (diff)
downloaddexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.gz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.bz2
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.lz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.xz
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.tar.zst
dexon-sol-tools-8c5ff663a9521b3dcefbfd1bc9ef3fa2f4cfe023.zip
Merge branch 'development' into feature/instant/usd-eth-toggle
Diffstat (limited to 'python-packages/sra_client/setup.py')
-rwxr-xr-xpython-packages/sra_client/setup.py67
1 files changed, 67 insertions, 0 deletions
diff --git a/python-packages/sra_client/setup.py b/python-packages/sra_client/setup.py
new file mode 100755
index 000000000..b47f71ae7
--- /dev/null
+++ b/python-packages/sra_client/setup.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+# coding: utf-8
+
+
+import subprocess
+import distutils.command.build_py
+
+from setuptools import setup, find_packages # noqa: H301
+
+NAME = "0x-sra-client"
+VERSION = "1.0.0"
+# To install the library, run the following
+#
+# python setup.py install
+#
+# prerequisite: setuptools
+# http://pypi.python.org/pypi/setuptools
+
+with open("README.md", "r") as file_handle:
+ README_MD = file_handle.read()
+
+REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]
+
+class TestPublishCommand(distutils.command.build_py.build_py):
+ """Custom command to publish to test.pypi.org."""
+
+ description = (
+ "Publish dist/* to test.pypi.org. Run sdist & bdist_wheel first."
+ )
+
+ def run(self):
+ """Run twine to upload to test.pypi.org."""
+ subprocess.check_call( # nosec
+ (
+ "twine upload --repository-url https://test.pypi.org/legacy/"
+ + " --verbose dist/*"
+ ).split()
+ )
+
+
+class PublishCommand(distutils.command.build_py.build_py):
+ """Custom command to publish to pypi.org."""
+
+ description = "Publish dist/* to pypi.org. Run sdist & bdist_wheel first."
+
+ def run(self):
+ """Run twine to upload to pypi.org."""
+ subprocess.check_call("twine upload dist/*".split()) # nosec
+
+
+setup(
+ name=NAME,
+ version=VERSION,
+ description="Standard Relayer REST API",
+ author_email="",
+ url="https://github.com/0xproject/0x-monorepo/python-packages/sra_client",
+ keywords=["OpenAPI", "OpenAPI-Generator", "Standard Relayer REST API"],
+ install_requires=REQUIRES,
+ packages=find_packages(),
+ include_package_data=True,
+ long_description=README_MD,
+ long_description_content_type="text/markdown",
+ cmdclass={
+ "test_publish": TestPublishCommand,
+ "publish": PublishCommand,
+ },
+)