Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace setup.py for pyproject.toml #400

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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 = "[email protected]" }
]

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'
Loading