diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 096e065d..89ad7408 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,9 +24,9 @@ jobs: run: shell: bash -el {0} steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 - - uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca #v3.0.4 + - uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d #v3.1.0 with: activate-environment: menuinst-docs environment-file: docs/environment.yml diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 0a191eee..d808d92a 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -23,7 +23,7 @@ jobs: GLOBAL: https://raw.githubusercontent.com/conda/infra/main/.github/global.yml LOCAL: .github/labels.yml steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - id: has_local uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 00925396..f9ece1bb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,7 +41,7 @@ jobs: python-version: "3.10" steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 with: fetch-depth: 0 @@ -54,7 +54,7 @@ jobs: echo "XDG_CURRENT_DESKTOP=GNOME" >> $GITHUB_ENV - name: Install miniforge - uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca #v3.0.4 + uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d #v3.1.0 with: miniforge-version: latest @@ -119,14 +119,14 @@ jobs: steps: # Clean checkout of specific git ref needed for package metadata version # which needs env vars GIT_DESCRIBE_TAG and GIT_BUILD_STR: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 with: ref: ${{ github.ref }} clean: true fetch-depth: 0 # Explicitly use Python 3.11 since each of the OSes has a different default Python - - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 #v5.2.0 + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b #v5.3.0 with: python-version: "3.11" diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 5549cb0b..df69f36a 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -44,7 +44,7 @@ jobs: echo REPOSITORY=$(curl --silent ${{ github.event.issue.pull_request.url }} | jq --raw-output '.head.repo.full_name') >> $GITHUB_ENV echo REF=$(curl --silent ${{ github.event.issue.pull_request.url }} | jq --raw-output '.head.ref') >> $GITHUB_ENV - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: repository: ${{ env.REPOSITORY || github.repository }} ref: ${{ env.REF || '' }} diff --git a/menuinst/_legacy/__init__.py b/menuinst/_legacy/__init__.py index 18968f42..9726eabf 100644 --- a/menuinst/_legacy/__init__.py +++ b/menuinst/_legacy/__init__.py @@ -14,7 +14,7 @@ except ImportError: __version__ = "dev" -from ..utils import DEFAULT_BASE_PREFIX, DEFAULT_PREFIX +from ..utils import DEFAULT_BASE_PREFIX, DEFAULT_PREFIX, python_executable if sys.platform == 'win32': from ..platforms.win_utils.win_elevate import isUserAdmin, runAsAdmin @@ -59,9 +59,7 @@ def install(path, remove=False, prefix=None, recursing=False, root_prefix=None): if not sys.platform == 'win32': raise RuntimeError("menuinst._legacy is only supported on Windows.") - # this root_prefix is intentional. We want to reflect the state of the root installation. - - if not exists(join(root_prefix, '.nonadmin')): + if not exists(join(prefix, ".nonadmin")) and not exists(join(root_prefix, ".nonadmin")): if isUserAdmin(): _install(path, remove, prefix, mode='system', root_prefix=root_prefix) else: @@ -70,7 +68,7 @@ def install(path, remove=False, prefix=None, recursing=False, root_prefix=None): if not recursing: retcode = runAsAdmin( [ - join(root_prefix, 'python'), + *python_executable(), '-c', "import menuinst; menuinst.install(%r, %r, %r, %r, %r)" % (path, bool(remove), prefix, True, root_prefix), diff --git a/news/236-update-python-versions-canary b/news/236-update-python-versions-canary new file mode 100644 index 00000000..9205902a --- /dev/null +++ b/news/236-update-python-versions-canary @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* + +### Deprecations + +* + +### Docs + +* + +### Other + +* Update Python versions in canary builds: remove version 3.8 and add 3.12. (#266) diff --git a/news/260-backport-v2-admin-to-v1 b/news/260-backport-v2-admin-to-v1 new file mode 100644 index 00000000..7947d50c --- /dev/null +++ b/news/260-backport-v2-admin-to-v1 @@ -0,0 +1,19 @@ +### Enhancements + +* Partially backport privilege elevation logic from v2 to v1. (#260) + +### Bug fixes + +* + +### Deprecations + +* + +### Docs + +* + +### Other + +* diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 644034a7..78f9e9b2 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,8 +1,8 @@ python: - - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" # Use VS version available on GitHub runners c_compiler: # [win] - vs2022 # [win]