Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "substrate-interface"
description = "Library for interfacing with a Substrate node"
readme = "README.md"

authors = [
{ name = "Polkascan Foundation", email = "info@polkascan.org" }
]

requires-python = ">=3.7, <4"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3"
]
keywords = ["interface", "polkascan", "polkadot", "substrate", "blockchain", "rpc", "kusama"]

dynamic = ["dependencies", "version"]

[project.optional-dependencies]
dev = [
"coverage==5.3",
"pytest>=6.1.2",
"mkdocs",
"mkdocs-material",
"mkdocs-autorefs",
"mkdocstrings",
"mkdocstrings[python]"
]

[project.urls]
Homepage = "https://github.com/polkascan/py-substrate-interface"

[tool.setuptools.packages.find]
where = ["."]
exclude = ["contrib", "docs", "tests", "test"]

[tool.setuptools.dynamic]
version = {attr = "substrateinterface.constants.__version__"}
dependencies = {file = ["requirements.txt"]}
7 changes: 0 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ certifi>=2019.3.9
idna>=2.1.0,<4
requests>=2.21.0,<3
xxhash>=1.3.0,<4
pytest>=4.4.0
ecdsa>=0.17.0,<1
eth-keys>=0.2.1,<1
eth_utils>=1.3.0,<5
Expand All @@ -15,9 +14,3 @@ scalecodec>=1.2.10,<1.3
py-sr25519-bindings>=0.2.0,<1
py-ed25519-zebra-bindings>=1.0,<2
py-bip39-bindings>=0.1.9,<1

mkdocs
mkdocs-material
mkdocs-autorefs
mkdocstrings
mkdocstrings[python]
256 changes: 0 additions & 256 deletions setup.py

This file was deleted.

6 changes: 6 additions & 0 deletions substrateinterface/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os

STORAGE_HASH_SYSTEM_EVENTS = "0xcc956bdb7605e3547539f321ac2bc95c"
STORAGE_HASH_SYSTEM_EVENTS_V9 = "0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7"
Expand All @@ -39,3 +40,8 @@
"default": "0x00000000"
},
}

if os.getenv('GITHUB_REF') and os.getenv('GITHUB_REF').startswith('refs/tags/v'):
__version__ = os.getenv('GITHUB_REF').replace('refs/tags/v', '')
else:
__version__ = '0.0.0-dev1'