From 51b55be6f527887126151fb6a8fab1b4c64a8464 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Tue, 23 Jan 2024 18:28:30 +0100 Subject: [PATCH 1/3] clarify docs for `default_prefix` and friends --- CONSTRUCT.md | 13 ++++++++----- constructor/construct.py | 13 ++++++++----- docs/source/construct-yaml.md | 13 ++++++++----- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/CONSTRUCT.md b/CONSTRUCT.md index 4d5f572d4..5e27eaf57 100644 --- a/CONSTRUCT.md +++ b/CONSTRUCT.md @@ -500,10 +500,11 @@ _required:_ no
_type:_ string
Set default install prefix. On Linux, if not provided, the default prefix -is `${HOME}/${NAME}` (or, if `HOME` is not set, `/opt/${NAME}`). On Windows, +is `${HOME}/` (or, if `HOME` is not set, `/opt/`). On Windows, this is used only for "Just Me" installation; for "All Users" installation, use the `default_prefix_all_users` key. If not provided, the default prefix -is `${USERPROFILE}\${NAME}`. +is `%USERPROFILE%\`. Environment variables will be expanded at +installation time. ### `default_prefix_domain_user` @@ -511,9 +512,10 @@ _required:_ no
_type:_ string
Set default installation prefix for domain user. If not provided, the -installation prefix for domain user will be `${LOCALAPPDATA}\${NAME}`. +installation prefix for domain user will be `%LOCALAPPDATA%\`. By default, it is different from the `default_prefix` value to avoid installing -the distribution in the roaming profile. Windows only. +the distribution in the roaming profile. Environment variables will be expanded +at installation time. Windows only. ### `default_prefix_all_users` @@ -522,7 +524,8 @@ _type:_ string
Set default installation prefix for All Users installation. If not provided, the installation prefix for all users installation will be -`${ALLUSERSPROFILE}\${NAME}`. Windows only. +`%ALLUSERSPROFILE%\`. Environment variables will be expanded at installation +time. Windows only. ### `default_location_pkg` diff --git a/constructor/construct.py b/constructor/construct.py index 3a1c89b11..72438ac21 100644 --- a/constructor/construct.py +++ b/constructor/construct.py @@ -366,23 +366,26 @@ ('default_prefix', False, str, r''' Set default install prefix. On Linux, if not provided, the default prefix -is `${HOME}/${NAME}` (or, if `HOME` is not set, `/opt/${NAME}`). On Windows, +is `${HOME}/` (or, if `HOME` is not set, `/opt/`). On Windows, this is used only for "Just Me" installation; for "All Users" installation, use the `default_prefix_all_users` key. If not provided, the default prefix -is `${USERPROFILE}\${NAME}`. +is `%USERPROFILE%\`. Environment variables will be expanded at +installation time. '''), # noqa ('default_prefix_domain_user', False, str, r''' Set default installation prefix for domain user. If not provided, the -installation prefix for domain user will be `${LOCALAPPDATA}\${NAME}`. +installation prefix for domain user will be `%LOCALAPPDATA%\`. By default, it is different from the `default_prefix` value to avoid installing -the distribution in the roaming profile. Windows only. +the distribution in the roaming profile. Environment variables will be expanded +at installation time. Windows only. '''), # noqa ('default_prefix_all_users', False, str, r''' Set default installation prefix for All Users installation. If not provided, the installation prefix for all users installation will be -`${ALLUSERSPROFILE}\${NAME}`. Windows only. +`%ALLUSERSPROFILE%\`. Environment variables will be expanded at installation +time. Windows only. '''), # noqa ('default_location_pkg', False, str, ''' diff --git a/docs/source/construct-yaml.md b/docs/source/construct-yaml.md index 4d5f572d4..5e27eaf57 100644 --- a/docs/source/construct-yaml.md +++ b/docs/source/construct-yaml.md @@ -500,10 +500,11 @@ _required:_ no
_type:_ string
Set default install prefix. On Linux, if not provided, the default prefix -is `${HOME}/${NAME}` (or, if `HOME` is not set, `/opt/${NAME}`). On Windows, +is `${HOME}/` (or, if `HOME` is not set, `/opt/`). On Windows, this is used only for "Just Me" installation; for "All Users" installation, use the `default_prefix_all_users` key. If not provided, the default prefix -is `${USERPROFILE}\${NAME}`. +is `%USERPROFILE%\`. Environment variables will be expanded at +installation time. ### `default_prefix_domain_user` @@ -511,9 +512,10 @@ _required:_ no
_type:_ string
Set default installation prefix for domain user. If not provided, the -installation prefix for domain user will be `${LOCALAPPDATA}\${NAME}`. +installation prefix for domain user will be `%LOCALAPPDATA%\`. By default, it is different from the `default_prefix` value to avoid installing -the distribution in the roaming profile. Windows only. +the distribution in the roaming profile. Environment variables will be expanded +at installation time. Windows only. ### `default_prefix_all_users` @@ -522,7 +524,8 @@ _type:_ string
Set default installation prefix for All Users installation. If not provided, the installation prefix for all users installation will be -`${ALLUSERSPROFILE}\${NAME}`. Windows only. +`%ALLUSERSPROFILE%\`. Environment variables will be expanded at installation +time. Windows only. ### `default_location_pkg` From 814388f956205feffb344b5924820b3a8e07eeef Mon Sep 17 00:00:00 2001 From: jaimergp Date: Tue, 23 Jan 2024 18:52:18 +0100 Subject: [PATCH 2/3] add news --- news/750-default-prefix-docs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 news/750-default-prefix-docs diff --git a/news/750-default-prefix-docs b/news/750-default-prefix-docs new file mode 100644 index 000000000..1e7d55290 --- /dev/null +++ b/news/750-default-prefix-docs @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* + +### Deprecations + +* + +### Docs + +* Clarify environment variables role in `default_prefix` and friends on Windows. (#748 via #750) + +### Other + +* From ca00e26abf1c5020794f1551c60d08581f16afca Mon Sep 17 00:00:00 2001 From: jaimergp Date: Tue, 23 Jan 2024 18:52:50 +0100 Subject: [PATCH 3/3] pre-commit --- CONSTRUCT.md | 2 +- constructor/construct.py | 2 +- docs/source/construct-yaml.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONSTRUCT.md b/CONSTRUCT.md index 5e27eaf57..6497acd5d 100644 --- a/CONSTRUCT.md +++ b/CONSTRUCT.md @@ -514,7 +514,7 @@ _type:_ string
Set default installation prefix for domain user. If not provided, the installation prefix for domain user will be `%LOCALAPPDATA%\`. By default, it is different from the `default_prefix` value to avoid installing -the distribution in the roaming profile. Environment variables will be expanded +the distribution in the roaming profile. Environment variables will be expanded at installation time. Windows only. ### `default_prefix_all_users` diff --git a/constructor/construct.py b/constructor/construct.py index 72438ac21..6a1d6fb5a 100644 --- a/constructor/construct.py +++ b/constructor/construct.py @@ -377,7 +377,7 @@ Set default installation prefix for domain user. If not provided, the installation prefix for domain user will be `%LOCALAPPDATA%\`. By default, it is different from the `default_prefix` value to avoid installing -the distribution in the roaming profile. Environment variables will be expanded +the distribution in the roaming profile. Environment variables will be expanded at installation time. Windows only. '''), # noqa diff --git a/docs/source/construct-yaml.md b/docs/source/construct-yaml.md index 5e27eaf57..6497acd5d 100644 --- a/docs/source/construct-yaml.md +++ b/docs/source/construct-yaml.md @@ -514,7 +514,7 @@ _type:_ string
Set default installation prefix for domain user. If not provided, the installation prefix for domain user will be `%LOCALAPPDATA%\`. By default, it is different from the `default_prefix` value to avoid installing -the distribution in the roaming profile. Environment variables will be expanded +the distribution in the roaming profile. Environment variables will be expanded at installation time. Windows only. ### `default_prefix_all_users`