Skip to content

Commit eec1454

Browse files
Merge pull request #1 from vyperlang/v0.0.2
v0.0.2
2 parents 10b451c + d378051 commit eec1454

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

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

9+
## [0.0.2](https://github.com/vyperlang/vvm/tree/v0.0.2) - 2020-08-26
10+
### Fixed
11+
- Ignore `.exe` when handling versions on Windows
12+
913
## [0.0.1](https://github.com/vyperlang/vvm/tree/v0.0.1) - 2020-08-25
1014
- Initial release

setup.cfg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[bumpversion]
2-
current_version = 0.0.1
2+
current_version = 0.0.2
33

44
[bumpversion:file:setup.py]
55

66
[flake8]
77
max-line-length = 100
88
ignore = E203,W503
9-
per-file-ignores =
9+
per-file-ignores =
1010
*/__init__.py: F401
1111

1212
[mypy]
@@ -23,4 +23,3 @@ use_parentheses = True
2323

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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name="vvm",
7-
version="0.0.1", # don't change this manually, use bumpversion instead
7+
version="0.0.2", # don't change this manually, use bumpversion instead
88
description="Vyper version management tool",
99
long_description_markdown_filename="README.md",
1010
author="Ben Hauser",

tests/test_install.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import vvm
2+
3+
4+
def test_get_installed_vyper_versions(all_versions):
5+
assert "exe" not in str(all_versions)
6+
assert all_versions in vvm.install.get_installed_vyper_versions()

vvm/install.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def get_executable(
103103
version = to_vyper_version(version)
104104
vyper_bin = get_vvm_install_folder(vvm_binary_path).joinpath(f"vyper-{version}")
105105
if _get_os_name() == "windows":
106-
vyper_bin = vyper_bin.with_suffix(".exe")
106+
vyper_bin = vyper_bin.with_name(f"{vyper_bin.name}.exe")
107107

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

203207

204208
def install_vyper(
@@ -250,7 +254,7 @@ def install_vyper(
250254

251255
install_path = get_vvm_install_folder(vvm_binary_path).joinpath(f"vyper-{version}")
252256
if os_name == "windows":
253-
install_path = install_path.with_suffix(".exe")
257+
install_path = install_path.with_name(f"{install_path.name}.exe")
254258

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

0 commit comments

Comments
 (0)