From 0bcdb03daf73728f4f21cb885f0ee7e7ce2e9979 Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Mon, 5 Dec 2022 10:39:35 -0500 Subject: [PATCH] fix python sdk & core build script --- packages/core/package.json | 2 ++ packages/sdk/python/MANIFEST.in | 1 + packages/sdk/python/Makefile | 4 ++++ packages/sdk/python/setup.py | 3 ++- 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 packages/sdk/python/MANIFEST.in diff --git a/packages/core/package.json b/packages/core/package.json index 51e44b66df..9a33716c7f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -9,6 +9,8 @@ "typechain-types/**/*.ts" ], "scripts": { + "clean": "hardhat clean && rm -rf abis cache", + "precompile": "npm run clean", "compile": "hardhat compile", "verify": "hardhat verify", "test": "hardhat test", diff --git a/packages/sdk/python/MANIFEST.in b/packages/sdk/python/MANIFEST.in new file mode 100644 index 0000000000..8820040b95 --- /dev/null +++ b/packages/sdk/python/MANIFEST.in @@ -0,0 +1 @@ +include contracts/**/*.json diff --git a/packages/sdk/python/Makefile b/packages/sdk/python/Makefile index 17d65783ad..325a07453c 100644 --- a/packages/sdk/python/Makefile +++ b/packages/sdk/python/Makefile @@ -1,3 +1,6 @@ +clean-package: + rm -rf build contracts dist *.egg-info + build-contracts: ./scripts/build-contracts.sh @@ -9,6 +12,7 @@ run-test: ./scripts/run-test.sh build-package: + make clean-package make build-contracts python3 setup.py sdist bdist_wheel diff --git a/packages/sdk/python/setup.py b/packages/sdk/python/setup.py index 3d93dd8ffa..6a808afea2 100644 --- a/packages/sdk/python/setup.py +++ b/packages/sdk/python/setup.py @@ -3,11 +3,12 @@ setuptools.setup( name="human-protocol-sdk", - version="0.0.3", + version="0.0.4", author="HUMAN Protocol", description="A python library to launch escrow contracts to the HUMAN network.", url="https://github.com/humanprotocol/human-protocol/packages/sdk/python", include_package_data=True, + exclude_package_data={"contracts": ["*.dbg.json"]}, zip_safe=True, classifiers=[ "Intended Audience :: Developers",