Skip to content

Commit

Permalink
release 3.0a1
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfalcao committed Jan 21, 2024
1 parent 28be05d commit 2b6db32
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
23 changes: 6 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion sure/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "3.0a0"
version = "3.0a1"

0 comments on commit 2b6db32

Please sign in to comment.