Skip to content

Commit

Permalink
0.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
David-OConnor committed Sep 20, 2019
1 parent b76c207 commit a61364f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,7 @@
## v0.1.0
- Installing Python binaries now works correctly on Windows, Ubuntu≥18.4, and Debian
- Running `pyflow` with no arguments now runs a Python REPL
- Made error messages more detailed

## v0.0.4
- Renamed from `pypackage` to `pyflow`
Expand Down
10 changes: 6 additions & 4 deletions src/py_versions.rs
Expand Up @@ -21,16 +21,18 @@ enum PyVers {
/// Reduces code repetition for error messages related to Python binaries we don't support.
fn abort_helper(version: &str, os: &str) {
util::abort(&format!(
"Installing Python {} on {} is currently unsupported. If you'd like\
to use this version of Python, please install it directly.",
"Automatic installation of Python {} on {} is currently unsupported. If you'd like \
to use this version of Python, please install it.",
version, os
))
}

impl From<(Version, Os)> for PyVers {
fn from(v_o: (Version, Os)) -> Self {
let unsupported = "Unsupported python version requested; only Python ≥ 3.4 is supported. \
to fix this, edit the `python_version` line of `pyproject.toml`, or run `pyflow switch 3.7`";
if v_o.0.major != 3 {
util::abort("Unsupported python version requested; only Python ≥ 3.4 is supported");
util::abort(unsupported);
unreachable!()
}
// todo: Handle non Ubuntu/Debian
Expand Down Expand Up @@ -71,7 +73,7 @@ impl From<(Version, Os)> for PyVers {
}
},
_ => {
util::abort("Unsupported python version requested; only Python >=3.4 is supported");
util::abort(unsupported);
unreachable!()
}
}
Expand Down
1 change: 1 addition & 0 deletions src/util.rs
Expand Up @@ -353,6 +353,7 @@ pub fn extract_zip(file: &fs::File, out_path: &Path, rename: &Option<(String, St
}

pub fn unpack_tar_xz(archive_path: &Path, dest: &Path) {
println!("Path: {:?}, {:?}", archive_path, dest);
let archive_bytes = fs::read(archive_path).expect("Problem reading archive as bytes");

let mut tar: Vec<u8> = Vec::new();
Expand Down

0 comments on commit a61364f

Please sign in to comment.