python - Pylance can't recognize installed package built in editable mode using pyproject.toml - Stack Overflow

After creating the project.toml for my project and building it with pip install -e packgedir, it is not

After creating the project.toml for my project and building it with pip install -e packgedir, it is not being recognized by Pylance in VSCode. The problem do not happen for a standard installation (pip install packgedir), but I want to use the editable mode. Do you know what's wrong?

The Pylance warning: warning

The basic structure of my project:

packgedir/
├── LICENSE
├── pyproject.toml
├── README.md
├── VERSION
├── packge/
    ├── __init__.py
    └── file.py

pyproject.toml:

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools >= 75"]

[project]
name = "packge"
dynamic = ["version"]
description = "Test Package"
readme = "README.md"
authors = [
    {name = "author_name", email = "[email protected]"}
]
requires-python = ">=3.8"
dependencies = [
    "numpy >= 1.2.2",
]
license = {file = "LICENSE"}
classifiers = [
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python",
]

[tool.setuptools.dynamic]
version = {file = "VERSION"}

I also tried to use a minimal, empty, setuptools.setup() into a setup.py together with the pyproject.toml and didn't solve.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744178001a4561846.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信