Merge pull request #2046 from 0xProject/feature/python/publish-gend-wrappers-and-web3-v5
Pre-publish updates
This commit is contained in:
		@@ -28,6 +28,7 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr
 | 
				
			|||||||
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
 | 
					| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
 | 
				
			||||||
| [`0x-contract-addresses`](/python-packages/contract_addresses) | [](https://pypi.org/project/0x-contract-addresses/) | A tiny utility library for getting known deployed contract addresses for a particular network     |
 | 
					| [`0x-contract-addresses`](/python-packages/contract_addresses) | [](https://pypi.org/project/0x-contract-addresses/) | A tiny utility library for getting known deployed contract addresses for a particular network     |
 | 
				
			||||||
| [`0x-contract-artifacts`](/python-packages/contract_artifacts) | [](https://pypi.org/project/0x-contract-artifacts/) | 0x smart contract compilation artifacts                                                           |
 | 
					| [`0x-contract-artifacts`](/python-packages/contract_artifacts) | [](https://pypi.org/project/0x-contract-artifacts/) | 0x smart contract compilation artifacts                                                           |
 | 
				
			||||||
 | 
					| [`0x-contract-wrappers`](/python-packages/contract_wrappers)   | [](https://pypi.org/project/0x-contract-wrappers/)   | 0x smart contract wrappers                                                                        |
 | 
				
			||||||
| [`0x-json-schemas`](/python-packages/json_schemas)             | [](https://pypi.org/project/0x-json-schemas/)             | 0x-related JSON schemas                                                                           |
 | 
					| [`0x-json-schemas`](/python-packages/json_schemas)             | [](https://pypi.org/project/0x-json-schemas/)             | 0x-related JSON schemas                                                                           |
 | 
				
			||||||
| [`0x-order-utils`](/python-packages/order_utils)               | [](https://pypi.org/project/0x-order-utils/)               | A set of utilities for generating, parsing, signing and validating 0x orders                      |
 | 
					| [`0x-order-utils`](/python-packages/order_utils)               | [](https://pypi.org/project/0x-order-utils/)               | A set of utilities for generating, parsing, signing and validating 0x orders                      |
 | 
				
			||||||
| [`0x-sra-client`](/python-packages/sra_client)                 | [](https://pypi.org/project/0x-sra-client/)                 | A Python client for interacting with servers conforming to the Standard Relayer API specification |
 | 
					| [`0x-sra-client`](/python-packages/sra_client)                 | [](https://pypi.org/project/0x-sra-client/)                 | A Python client for interacting with servers conforming to the Standard Relayer API specification |
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,16 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 2.0.1 - 2019-02-25
 | 
					## 2.2.0 - 2019-08-08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   Updated addresses of OrderValidator and Forwarder contracts.
 | 
					-   Added ERC1155Proxy address
 | 
				
			||||||
 | 
					-   Updated addresses for AssetProxyOwner, Coordinator, CoordinatorRegistry, Forwarder, and OrderValidator.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 2.1.0 - 2019-07-15
 | 
					## 2.1.0 - 2019-07-15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   Added Coordinator and CoordinatorRegistry addresses.
 | 
					-   Added Coordinator and CoordinatorRegistry addresses.
 | 
				
			||||||
-   Expanded documentation.
 | 
					-   Expanded documentation.
 | 
				
			||||||
-   Redeployed Mainnet V2.1 Exchange et al
 | 
					-   Redeployed Mainnet V2.1 Exchange et al
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 2.0.1 - 2019-02-25
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-   Updated addresses of OrderValidator and Forwarder contracts.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -119,7 +119,7 @@ with open("README.md", "r") as file_handle:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
setup(
 | 
					setup(
 | 
				
			||||||
    name="0x-contract-addresses",
 | 
					    name="0x-contract-addresses",
 | 
				
			||||||
    version="2.1.0",
 | 
					    version="2.2.0",
 | 
				
			||||||
    description="Addresses at which the 0x smart contracts have been deployed",
 | 
					    description="Addresses at which the 0x smart contracts have been deployed",
 | 
				
			||||||
    long_description=README_MD,
 | 
					    long_description=README_MD,
 | 
				
			||||||
    long_description_content_type="text/markdown",
 | 
					    long_description_content_type="text/markdown",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 1.0.0 - TBD
 | 
					## 1.0.0 - 2019-08-08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   Initial release
 | 
					-   Initial release
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,6 +18,30 @@ from setuptools.command.test import test as TestCommand
 | 
				
			|||||||
BLACK_COMMAND = "black --line-length 79 "
 | 
					BLACK_COMMAND = "black --line-length 79 "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CONTRACTS_TO_BE_WRAPPED = [
 | 
				
			||||||
 | 
					    "asset_proxy_owner",
 | 
				
			||||||
 | 
					    "coordinator",
 | 
				
			||||||
 | 
					    "coordinator_registry",
 | 
				
			||||||
 | 
					    "dummy_erc20_token",
 | 
				
			||||||
 | 
					    "dummy_erc721_token",
 | 
				
			||||||
 | 
					    "dutch_auction",
 | 
				
			||||||
 | 
					    "erc20_proxy",
 | 
				
			||||||
 | 
					    "erc20_token",
 | 
				
			||||||
 | 
					    "erc721_proxy",
 | 
				
			||||||
 | 
					    "erc721_token",
 | 
				
			||||||
 | 
					    "eth_balance_checker",
 | 
				
			||||||
 | 
					    "exchange",
 | 
				
			||||||
 | 
					    "forwarder",
 | 
				
			||||||
 | 
					    "i_asset_proxy",
 | 
				
			||||||
 | 
					    "i_validator",
 | 
				
			||||||
 | 
					    "i_wallet",
 | 
				
			||||||
 | 
					    "multi_asset_proxy",
 | 
				
			||||||
 | 
					    "order_validator",
 | 
				
			||||||
 | 
					    "weth9",
 | 
				
			||||||
 | 
					    "zrx_token",
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class PreInstallCommand(distutils.command.build_py.build_py):
 | 
					class PreInstallCommand(distutils.command.build_py.build_py):
 | 
				
			||||||
    """Custom setuptools command class for pulling in generated code."""
 | 
					    """Custom setuptools command class for pulling in generated code."""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -26,29 +50,7 @@ class PreInstallCommand(distutils.command.build_py.build_py):
 | 
				
			|||||||
    def run(self):
 | 
					    def run(self):
 | 
				
			||||||
        """Copy files from TS build area to local src, & `black` them."""
 | 
					        """Copy files from TS build area to local src, & `black` them."""
 | 
				
			||||||
        pkgdir = path.dirname(path.realpath(argv[0]))
 | 
					        pkgdir = path.dirname(path.realpath(argv[0]))
 | 
				
			||||||
        contracts = [
 | 
					        for contract in CONTRACTS_TO_BE_WRAPPED:
 | 
				
			||||||
            "asset_proxy_owner",
 | 
					 | 
				
			||||||
            "coordinator",
 | 
					 | 
				
			||||||
            "coordinator_registry",
 | 
					 | 
				
			||||||
            "dummy_erc20_token",
 | 
					 | 
				
			||||||
            "dummy_erc721_token",
 | 
					 | 
				
			||||||
            "dutch_auction",
 | 
					 | 
				
			||||||
            "erc20_proxy",
 | 
					 | 
				
			||||||
            "erc20_token",
 | 
					 | 
				
			||||||
            "erc721_proxy",
 | 
					 | 
				
			||||||
            "erc721_token",
 | 
					 | 
				
			||||||
            "eth_balance_checker",
 | 
					 | 
				
			||||||
            "exchange",
 | 
					 | 
				
			||||||
            "forwarder",
 | 
					 | 
				
			||||||
            "i_asset_proxy",
 | 
					 | 
				
			||||||
            "i_validator",
 | 
					 | 
				
			||||||
            "i_wallet",
 | 
					 | 
				
			||||||
            "multi_asset_proxy",
 | 
					 | 
				
			||||||
            "order_validator",
 | 
					 | 
				
			||||||
            "weth9",
 | 
					 | 
				
			||||||
            "zrx_token",
 | 
					 | 
				
			||||||
        ]
 | 
					 | 
				
			||||||
        for contract in contracts:
 | 
					 | 
				
			||||||
            copy(
 | 
					            copy(
 | 
				
			||||||
                path.join(
 | 
					                path.join(
 | 
				
			||||||
                    pkgdir,
 | 
					                    pkgdir,
 | 
				
			||||||
@@ -84,7 +86,7 @@ class PreInstallCommand(distutils.command.build_py.build_py):
 | 
				
			|||||||
        black_command = BLACK_COMMAND + " ".join(
 | 
					        black_command = BLACK_COMMAND + " ".join(
 | 
				
			||||||
            [
 | 
					            [
 | 
				
			||||||
                f"src/zero_ex/contract_wrappers/{contract}/__init__.py"
 | 
					                f"src/zero_ex/contract_wrappers/{contract}/__init__.py"
 | 
				
			||||||
                for contract in contracts
 | 
					                for contract in CONTRACTS_TO_BE_WRAPPED
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        print(f"Running command `{black_command}`...")
 | 
					        print(f"Running command `{black_command}`...")
 | 
				
			||||||
@@ -158,8 +160,11 @@ class CleanCommandExtension(clean):
 | 
				
			|||||||
        rmtree(".pytest_cache", ignore_errors=True)
 | 
					        rmtree(".pytest_cache", ignore_errors=True)
 | 
				
			||||||
        rmtree("src/0x_contract_wrappers.egg-info", ignore_errors=True)
 | 
					        rmtree("src/0x_contract_wrappers.egg-info", ignore_errors=True)
 | 
				
			||||||
        # generated files:
 | 
					        # generated files:
 | 
				
			||||||
        remove("src/zero_ex/contract_wrappers/exchange/__init__.py")
 | 
					        for contract in CONTRACTS_TO_BE_WRAPPED:
 | 
				
			||||||
        remove("src/zero_ex/contract_wrappers/erc20_token/__init__.py")
 | 
					            try:
 | 
				
			||||||
 | 
					                remove(f"src/zero_ex/contract_wrappers/{contract}/__init__.py")
 | 
				
			||||||
 | 
					            except FileNotFoundError:
 | 
				
			||||||
 | 
					                pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TestPublishCommand(distutils.command.build_py.build_py):
 | 
					class TestPublishCommand(distutils.command.build_py.build_py):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 3.0.0 - TBD
 | 
					## 3.0.0 - 2019-08-08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   Major breaking changes: removal of definitions for Order, OrderInfo, order_to_jsdict, jsdict_to_order, all of which have been moved to contract_wrappers.exchange.types; removal of signature validation; migration from v4 to v5 of Web3.py
 | 
					-   Major breaking changes: removal of definitions for Order, OrderInfo, order_to_jsdict, jsdict_to_order, all of which have been moved to contract_wrappers.exchange.types; removal of signature validation; migration from v4 to v5 of Web3.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -149,7 +149,7 @@ with open("README.md", "r") as file_handle:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
setup(
 | 
					setup(
 | 
				
			||||||
    name="0x-order-utils",
 | 
					    name="0x-order-utils",
 | 
				
			||||||
    version="2.0.0",
 | 
					    version="3.0.0",
 | 
				
			||||||
    description="Order utilities for 0x applications",
 | 
					    description="Order utilities for 0x applications",
 | 
				
			||||||
    long_description=README_MD,
 | 
					    long_description=README_MD,
 | 
				
			||||||
    long_description_content_type="text/markdown",
 | 
					    long_description_content_type="text/markdown",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								python-packages/prep_for_staging_doc_publish
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								python-packages/prep_for_staging_doc_publish
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					find ./ \
 | 
				
			||||||
 | 
					    -name .discharge.json \
 | 
				
			||||||
 | 
					    -exec sed -i \
 | 
				
			||||||
 | 
					        -e "s/\(domain.*\)\",$/\1-staging\",/" \
 | 
				
			||||||
 | 
					        {} \;
 | 
				
			||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
# Changelog
 | 
					# Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 3.0.0 - TBD
 | 
					## 3.0.0 - 2019-08-08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-   Migrated from v4 to v5 of Web3.py.
 | 
					-   Migrated from v4 to v5 of Web3.py.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@ from setuptools import setup, find_packages  # noqa: H301
 | 
				
			|||||||
from setuptools.command.test import test as TestCommand
 | 
					from setuptools.command.test import test as TestCommand
 | 
				
			||||||
 | 
					
 | 
				
			||||||
NAME = "0x-sra-client"
 | 
					NAME = "0x-sra-client"
 | 
				
			||||||
VERSION = "2.0.0"
 | 
					VERSION = "3.0.0"
 | 
				
			||||||
# To install the library, run the following
 | 
					# To install the library, run the following
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# python setup.py install
 | 
					# python setup.py install
 | 
				
			||||||
@@ -170,7 +170,8 @@ setup(
 | 
				
			|||||||
    name=NAME,
 | 
					    name=NAME,
 | 
				
			||||||
    version=VERSION,
 | 
					    version=VERSION,
 | 
				
			||||||
    description="Standard Relayer REST API Client",
 | 
					    description="Standard Relayer REST API Client",
 | 
				
			||||||
    author_email="",
 | 
					    author="F. Eugene Aumson",
 | 
				
			||||||
 | 
					    author_email="feuGeneA@users.noreply.github.com",
 | 
				
			||||||
    url=(
 | 
					    url=(
 | 
				
			||||||
        "https://github.com/0xproject/0x-monorepo/tree/development"
 | 
					        "https://github.com/0xproject/0x-monorepo/tree/development"
 | 
				
			||||||
        "/python-packages/sra_client"
 | 
					        "/python-packages/sra_client"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user