diff --git a/Makefile b/Makefile index fb8c610..d400c61 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ push-release: dist # pushes distribution tarballs of the current version $(VENV)/bin/twine upload dist/*.tar.gz build-release: - $(VENV)/bin/python setup.py build sdist bdist_wheel + $(VENV)/bin/python setup.py build sdist $(VENV)/bin/twine check dist/*.tar.gz release: tests diff --git a/setup.cfg b/setup.cfg index 0eea7d1..7aa5aa0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [tool:pytest] -addopts = --cov=sure --ignore tests/crashes -v --capture=no --disable-warnings +addopts = --cov=sure --ignore tests/crashes -v --capture=no --disable-warnings --maxfail=1 testpaths = tests filterwarnings = diff --git a/setup.py b/setup.py index 5767e33..eac4c70 100644 --- a/setup.py +++ b/setup.py @@ -46,24 +46,13 @@ PROJECT_ROOT = os.path.dirname(__file__) -class VersionFinder(ast.NodeVisitor): - VARIABLE_NAME = "version" - - def __init__(self): - self.version = None - - def visit_Assign(self, node): - try: - if node.targets[0].id == self.VARIABLE_NAME: - self.version = node.value.s - except Exception: - pass - - def read_version(): - finder = VersionFinder() - finder.visit(ast.parse(local_text_file("sure", "version.py"))) - return finder.version + mod = ast.parse(local_text_file("sure", "version.py")) + exp = mod.body[0] + tgt = exp.targets[0] + cst = exp.value + assert tgt.id == "version" + return cst.value def local_text_file(*f): diff --git a/sure/version.py b/sure/version.py index 9f8ea32..3477736 100644 --- a/sure/version.py +++ b/sure/version.py @@ -1 +1 @@ -version = "3.0a0" +version = "3.0a1"