Skip to content

Commit

Permalink
Merge pull request #44
Browse files Browse the repository at this point in the history
Release: v0.18.3
  • Loading branch information
macro128 authored Jul 15, 2024
2 parents 9dadc25 + 7fa0f8f commit e776d55
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.18.3] - 15/07/2024

### Fixed

* Fix `pdm venv create` not working when no using Conda.

## [0.18.2] - 01/07/2024

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/pdm_conda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pdm.core import Core

logger = termui.logger
__version__ = "0.18.2"
__version__ = "0.18.3"


def main(core: Core):
Expand Down
7 changes: 4 additions & 3 deletions src/pdm_conda/cli/commands/venv/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,20 @@ def create(
in_project: bool = False,
prompt: str | None = None,
with_pip: bool = False,
venv_name: str | None = None,
) -> Path:
with ensure_logger(self.project, "conda_create"):
return super().create(name, args, force, in_project, prompt, with_pip)
return super().create(venv_name or name, args, force, in_project, prompt, with_pip)

@PluginConfig.check_active
def get_location(self, name: str | None) -> Path:
def get_location(self, name: str | None = None, venv_name: str | None = None) -> Path:
with self.project.conda_config.with_conda_venv_location() as (venv_location, _):
if conda_name := (name is not None and name.startswith("conda:")):
name = name[6:]
if conda_name:
location = venv_location / name
else:
location = super().get_location(name)
location = super().get_location(name, venv_name)
return location

@PluginConfig.check_active
Expand Down

0 comments on commit e776d55

Please sign in to comment.