Skip to content

Commit

Permalink
Merge pull request #1 from vyperlang/v0.0.2
Browse files Browse the repository at this point in the history
v0.0.2
  • Loading branch information
iamdefinitelyahuman committed Aug 26, 2020
2 parents 10b451c + d378051 commit eec1454
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/vyperlang/vvm/)

## [0.0.2](https://github.com/vyperlang/vvm/tree/v0.0.2) - 2020-08-26
### Fixed
- Ignore `.exe` when handling versions on Windows

## [0.0.1](https://github.com/vyperlang/vvm/tree/v0.0.1) - 2020-08-25
- Initial release
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[bumpversion]
current_version = 0.0.1
current_version = 0.0.2

[bumpversion:file:setup.py]

[flake8]
max-line-length = 100
ignore = E203,W503
per-file-ignores =
per-file-ignores =
*/__init__.py: F401

[mypy]
Expand All @@ -23,4 +23,3 @@ use_parentheses = True

[tool:pytest]
addopts = --cov=vvm --cov-branch --cov-report xml

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="vvm",
version="0.0.1", # don't change this manually, use bumpversion instead
version="0.0.2", # don't change this manually, use bumpversion instead
description="Vyper version management tool",
long_description_markdown_filename="README.md",
author="Ben Hauser",
Expand Down
6 changes: 6 additions & 0 deletions tests/test_install.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import vvm


def test_get_installed_vyper_versions(all_versions):
assert "exe" not in str(all_versions)
assert all_versions in vvm.install.get_installed_vyper_versions()
10 changes: 7 additions & 3 deletions vvm/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def get_executable(
version = to_vyper_version(version)
vyper_bin = get_vvm_install_folder(vvm_binary_path).joinpath(f"vyper-{version}")
if _get_os_name() == "windows":
vyper_bin = vyper_bin.with_suffix(".exe")
vyper_bin = vyper_bin.with_name(f"{vyper_bin.name}.exe")

if not vyper_bin.exists():
raise VyperNotInstalled(
Expand Down Expand Up @@ -198,7 +198,11 @@ def get_installed_vyper_versions(vvm_binary_path: Union[Path, str] = None) -> Li
List of Version objects of installed `vyper` versions.
"""
install_path = get_vvm_install_folder(vvm_binary_path)
return sorted([Version(i.name[6:]) for i in install_path.glob("vyper-*")], reverse=True)
if _get_os_name() == "windows":
version_list = [i.stem[6:] for i in install_path.glob("vyper-*")]
else:
version_list = [i.name[6:] for i in install_path.glob("vyper-*")]
return sorted([Version(i) for i in version_list], reverse=True)


def install_vyper(
Expand Down Expand Up @@ -250,7 +254,7 @@ def install_vyper(

install_path = get_vvm_install_folder(vvm_binary_path).joinpath(f"vyper-{version}")
if os_name == "windows":
install_path = install_path.with_suffix(".exe")
install_path = install_path.with_name(f"{install_path.name}.exe")

url = BINARY_DOWNLOAD_BASE.format(version, asset["name"])
content = _download_vyper(url, headers, show_progress)
Expand Down

0 comments on commit eec1454

Please sign in to comment.