Skip to content

It should be easier to be sure to get a venv #1662

Description

@hynek

Is your feature request related to a problem? Please describe.

When getting started with pdm, I've spent a lot of time trying to prevent pdm creating a __pypackages__ while bootstrapping a project. FTR by bootstrapping I mean a configured pdm project that is freshly checked out, or starting over.

AFAICT, the best way to end up with an in-tree project venv is:

pdm venv create $(command -v python3-intel64)
pdm use -i .venv/bin/python

(more about the -intel64 in a separate issue ;))

It would be really nice if that could be one, idiomatic call.

Describe the solution you'd like

I would like one of these:

  • pdm config python.use_pep582 false: analogue to use_venv. I never want to use __pypackages__ and it would be nice to tell pdm that in general. pdm use would then create .venv just like pdm init would.
  • pdm use -i --create-venv: currently it would create __pypackages__ so it would be nice to have an argument to get an venv, instead of pdm guessing depending on whether the Python is in an Virtualenv or not.
  • pdm install --venv-python=(command -v python3-intel64): I think this would be my favourite solution because it's most idiomatic and explicit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⭐ enhancementImprovements for existing features

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions