Skip to content

[BUG] setuptools 64.0.0 breaks editable install #3504

@ajasmin

Description

@ajasmin

setuptools version

setuptools==64.0.0

Python version

Python 3.10.6

OS

Ubuntu jammy

Additional environment information

No response

Description

After creating a simple project and installing it as editable with pip install -e, I'm unable to import modules from the package.

Expected behavior

We should be able to import a package installed as editable.

How to Reproduce

1. Create this simple project structure

pyproject.toml

[build-system]
requires = [
  "setuptools==64.0.0",
  "wheel",
]
build-backend = "setuptools.build_meta"

[project]
name = "foo"
version = "1.0.0"

[tool.setuptools]
packages.find.include = ["foo.*"]

setup.py

from setuptools import setup

setup()

foo/__init__.py

__version__ = "1.0.0"

2. Create and activate a venv:

python -mvenv venv
. venv/bin/activate

3. Install the project as editable:

python install -e .

Change to another directory and try to import the package:

python -c "import foo"

Output

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'foo'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions