-
-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make system-site-packages project level
- Loading branch information
Showing
10 changed files
with
43 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,15 +200,6 @@ impl Config { | |
.unwrap_or(true) | ||
} | ||
|
||
/// Make the `.venv` to use the system site packages | ||
pub fn venv_system_site_packages(&self) -> bool { | ||
self.doc | ||
.get("behavior") | ||
.and_then(|x| x.get("venv-system-site-packages")) | ||
.and_then(|x| x.as_bool()) | ||
.unwrap_or(false) | ||
} | ||
|
||
/// Returns the HTTP proxy that should be used. | ||
pub fn http_proxy_url(&self) -> Option<String> { | ||
std::env::var("http_proxy").ok().or_else(|| { | ||
|
@@ -388,13 +379,6 @@ author = "John Doe <[email protected]>""#, | |
assert!(!cfg.venv_mark_sync_ignore()); | ||
} | ||
|
||
#[test] | ||
fn test_venv_system_site_packages() { | ||
let (cfg_path, _temp_dir) = setup_config("[behavior]\nvenv-system-site-packages = true"); | ||
let cfg = Config::from_path(&cfg_path).expect("Failed to load config"); | ||
assert!(cfg.venv_system_site_packages()); | ||
} | ||
|
||
#[test] | ||
fn test_http_proxy_url() { | ||
let (cfg_path, _temp_dir) = setup_config("[proxy]\nhttp = 'http://proxy.example.com'"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters