Skip to content

Test Installed package detection in pyproject.toml #21288

Closed
@karthiknadig

Description

@karthiknadig

Refs: #21141

Complexity: 2

Create Issue


Requirements

  1. Python 3.7 or greater
  2. Latest python extension pre-release.

Verification steps:

  1. Ensure you have python and python extension installed.
  2. Make sure python extension is activated (open python file)
  3. Create pyproject.toml with following content:
[project]
name = "spam"
version = "2020.0.0"
description = "Lovely Spam! Wonderful Spam!"
keywords = ["egg", "bacon", "sausage", "tomatoes", "Lobster Thermidor"]
dependencies = [
    "httpx",
    "gidgethub[httpx]",
    "django; os_name != 'nt'",
    "django; os_name == 'nt'",
]

[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools", "wheel"] # PEP 508 specifications.

Things to check:

  1. You should see hint squiggle like this, if the package is not installed. For os specific case you should see the squiggle only under the dependency that applies to your os. More environment markers here (https://peps.python.org/pep-0508/#environment-markers):
    image

  2. If you remove the [build-system] part and save, Create Environment button should go away.

  3. If there are no dependencies or if all packages are installed then Create Environment button should go away.

Note: we don't trigger on file system events to detect package installs at this point. So you will need to close and reopen the file for this.
Note 2: We don't validate versions at this point. We only detect if a package is installed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions