-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand variables for working directory and adjust Windows default path (
#212) * Expand variables when creating working_dir * Use os.path.expanduser logic to set default working_dir on Windows * Add news item * Fix Linux path * Use separate test file for working dir test * Apply suggestions from code review --------- Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
- Loading branch information
1 parent
faeb24d
commit da8133f
Showing
6 changed files
with
82 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
### Enhancements | ||
|
||
* <news item> | ||
|
||
### Bug fixes | ||
|
||
* Expand variables when creating `working_dir` and use `os.path.expanduser` logic for default `working_dir` on Windows. (#211 via #212) | ||
|
||
### Deprecations | ||
|
||
* <news item> | ||
|
||
### Docs | ||
|
||
* <news item> | ||
|
||
### Other | ||
|
||
* <news item> |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema", | ||
"$id": "https://schemas.conda.io/menuinst-1.schema.json", | ||
"menu_name": "Sys.Prefix {{ DISTRIBUTION_NAME }}", | ||
"menu_items": [ | ||
{ | ||
"name": "Sys.Prefix", | ||
"description": "This will install to Windows and Linux with default options. MacOS has a custom option.", | ||
"icon": null, | ||
"command": [ | ||
"{{ PYTHON }}", | ||
"-c", | ||
"import sys; print(sys.prefix)" | ||
], | ||
"platforms": { | ||
"win": { | ||
"command": [ | ||
"{{ PYTHON }}", | ||
"-c", | ||
"import sys; f = open(r'__OUTPUT_FILE__', 'w'); f.write(sys.prefix); f.close()" | ||
], | ||
"description": "Note how __OUTPUT_FILE__ is using raw-strings. Otherwise the backslashes are not properly escaped.", | ||
"working_dir": "%TEMP%/working_dir_test" | ||
}, | ||
"linux": { | ||
"working_dir": "${TMP}/working_dir_test" | ||
}, | ||
"osx": { | ||
"CFBundleName": "Sys Prefix", | ||
"working_dir": "${TMPDIR}/working_dir_test" | ||
} | ||
} | ||
} | ||
] | ||
} |
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