version eth2spec

This commit is contained in:
protolambda 2020-02-05 18:38:21 +01:00
parent 3184ade0f3
commit 1a16e9a3ab
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
4 changed files with 29 additions and 2 deletions

View File

@ -51,6 +51,17 @@ clean: partial_clean
rm -rf $(DEPOSIT_CONTRACT_COMPILER_DIR)/venv rm -rf $(DEPOSIT_CONTRACT_COMPILER_DIR)/venv
rm -rf $(DEPOSIT_CONTRACT_TESTER_DIR)/venv rm -rf $(DEPOSIT_CONTRACT_TESTER_DIR)/venv
# The pyspec is rebuilt to enforce the /specs being part of eth2specs source distribution. It could be forgotten otherwise.
dist_build: pyspec
python3 setup.py sdist bdist_wheel
dist_check:
python3 -m twine check dist/*
dist_upload:
python3 -m twine upload dist/*
# "make generate_tests" to run all generators # "make generate_tests" to run all generators
generate_tests: $(GENERATOR_TARGETS) generate_tests: $(GENERATOR_TARGETS)

View File

@ -428,9 +428,20 @@ commands = {
with open("README.md", "rt", encoding="utf8") as f: with open("README.md", "rt", encoding="utf8") as f:
readme = f.read() readme = f.read()
# How to use "VERSION.txt" file:
# - dev branch contains "X.Y.Z.dev", where "X.Y.Z" is the target version to release dev into.
# -> Changed as part of 'master' backport to 'dev'
# - master branch contains "X.Y.Z", where "X.Y.Z" is the current version.
# -> Changed as part of 'dev' release (or other branch) into 'master'
# -> In case of a commit on master without git tag, target the next version
# with ".postN" (release candidate, numbered) suffixed.
# See https://www.python.org/dev/peps/pep-0440/#public-version-identifiers
with open(os.path.join('tests', 'core', 'pyspec', 'eth2spec', 'VERSION.txt')) as f:
spec_version = f.read().strip()
setup( setup(
name='eth2spec', name='eth2spec',
version='0.0.1', # initial version, see #1584 and #1596 version=spec_version,
description="Eth2 spec, provided as Python package for tooling and testing", description="Eth2 spec, provided as Python package for tooling and testing",
long_description=readme, long_description=readme,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
@ -438,7 +449,8 @@ setup(
url="https://github.com/ethereum/eth2.0-specs", url="https://github.com/ethereum/eth2.0-specs",
include_package_data=False, include_package_data=False,
package_data={'configs': ['*.yaml'], package_data={'configs': ['*.yaml'],
'specs': ['**/*.md']}, 'specs': ['**/*.md'],
'eth2spec': ['VERSION.txt']},
package_dir={ package_dir={
"eth2spec": "tests/core/pyspec/eth2spec", "eth2spec": "tests/core/pyspec/eth2spec",
"configs": "configs", "configs": "configs",

View File

@ -0,0 +1 @@
0.10.2.dev0

View File

@ -0,0 +1,3 @@
# See setup.py about usage of VERSION.txt
with open('VERSION.txt') as f:
__version__ = f.read().strip()