diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f27e9fac1..4e2c010fb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Support reading requirement constraints from pip-style requirement files for "overriding" via `--override` option. ([#2896](https://github.com/pdm-project/pdm/issues/2896)) - Add a `--non-interactive` option for automation scenarios, also interactive prompts will not show up when not running in an interactive terminal. ([#2934](https://github.com/pdm-project/pdm/issues/2934)) +- Refactored `pdm python install --list` to reuse the same implementation as other cli commands that work with Python interpreters from pbs_installer. ([#2977](https://github.com/pdm-project/pdm/issues/2977)) - Add `--license` and `--project-version` as CLI options to control and streamline them during `pdm init` - especially in automated scenarios with `--non-interactive` ([#2978](https://github.com/pdm-project/pdm/issues/2978)) - Run pdm sync in "post-rewrite" stage of pre-commit ([#2994](https://github.com/pdm-project/pdm/issues/2994)) - `Project.get_dependencies()` now returns a list of `Requirement` instead of a mapping. diff --git a/news/2977.refactor.md b/news/2977.refactor.md deleted file mode 100644 index ac5d7b0663..0000000000 --- a/news/2977.refactor.md +++ /dev/null @@ -1 +0,0 @@ -Refactored `pdm python install --list` to reuse the same implementation as other cli commands that work with Python interpreters from pbs_installer \ No newline at end of file diff --git a/news/3031.zshcompletion.md b/news/3031.misc.md similarity index 100% rename from news/3031.zshcompletion.md rename to news/3031.misc.md diff --git a/news/dep-logic.bugfix.md b/news/3033.bugfix.md similarity index 100% rename from news/dep-logic.bugfix.md rename to news/3033.bugfix.md diff --git a/news/3035.bugfix.md b/news/3035.bugfix.md new file mode 100644 index 0000000000..12f7873ef5 --- /dev/null +++ b/news/3035.bugfix.md @@ -0,0 +1 @@ +Correct the current platform and architecture for win32 and macos systems. diff --git a/pdm.lock b/pdm.lock index c19e9037f1..aef926ce59 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "all", "cookiecutter", "copier", "doc", "keyring", "pytest", "template", "test", "tox", "workflow"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:857f9a265e99a5e3f37e50f9ae87a0df094c4d27bce6f60600cbb276b87ac6e2" +content_hash = "sha256:89752749790efd07ae098751683577b1e5c6412239ae91863adc2cf8fb1fa2f4" [[metadata.targets]] requires_python = ">=3.8" @@ -563,7 +563,7 @@ files = [ [[package]] name = "dep-logic" -version = "0.4.2" +version = "0.4.3" requires_python = ">=3.8" summary = "Python dependency specifications supporting logical operations" groups = ["default"] @@ -571,8 +571,8 @@ dependencies = [ "packaging>=22", ] files = [ - {file = "dep_logic-0.4.2-py3-none-any.whl", hash = "sha256:37a668add3f66a13e8a2f6511fac871ce3cc40b01c7fa4b1db23eca626b3549a"}, - {file = "dep_logic-0.4.2.tar.gz", hash = "sha256:c2f6e938ec30788952ee3e0c51da90d043e0354460c96b4fa608ac43a5ce566f"}, + {file = "dep_logic-0.4.3-py3-none-any.whl", hash = "sha256:03f2740fc40e2848f2a4c77baddcc8f5e3773c304da947815306d1e616f3942c"}, + {file = "dep_logic-0.4.3.tar.gz", hash = "sha256:e4768f0a26c8c1c0e39fd520f3e0bd099ca528ec6a8f20359fbc89ffcdf8da45"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index 535ed809da..2d79473e0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = [ "virtualenv>=20", "pyproject-hooks", "unearth>=0.16.0", - "dep-logic>=0.4.2", + "dep-logic>=0.4.3", "findpython>=0.6.0,<1.0.0a0", "tomlkit>=0.11.1,<1", "shellingham>=1.3.2", diff --git a/src/pdm/models/in_process/env_spec.py b/src/pdm/models/in_process/env_spec.py index f6ae049322..5a41fe24b6 100644 --- a/src/pdm/models/in_process/env_spec.py +++ b/src/pdm/models/in_process/env_spec.py @@ -13,6 +13,8 @@ def get_arch() -> str: if arch in ("i386", "i686"): return "x86" if arch == "amd64": + if platform.architecture()[0] == "32bit": + return "x86" return "x86_64" if arch == "arm64": return "aarch64" @@ -42,7 +44,10 @@ def get_platform() -> str: mac_ver = platform.mac_ver()[0].split(".") if arch == "aarch64": arch = "arm64" - return f"macos_{mac_ver[0]}_{mac_ver[1]}_{arch}" + major, minor = int(mac_ver[0]), int(mac_ver[1]) + if major >= 11: + minor = 0 + return f"macos_{major}_{minor}_{arch}" else: raise EnvError("Unsupported platform")