python-poetry / python-poetry/poetry

Poetry created wheel puts includes into root of site-packages folder & is missing included folders.

Open
#7,153 13 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

When installing a wheel created by poetry and having specified include= in pyproject.toml, the included files get extracted into the root of the site-packages folder.

Steps:

  • add include= to pyproject.toml (see example)
  • poetry build
  • pip install
  • ls -l

Alternative Steps for Verification:

  • add include= to pyproject.toml (see example)
  • poetry build
  • cd
  • mkdir sdist
  • tar -xzf <built .tar.gz> -C sdist
  • mkdir wheel
  • tar -xzf <build .whl> -C wheel
  • ls -l sdist
  • ls -l wheel

Results:

  • note that the files from the includes list are now in the site-packages folder/root extracted folder, not inside any of the built package folders
  • additionally, included folders are missing from the wheel

Expected:

  • the files from the include list would not be in site-packages/root extracted folder itself, but in one of the built package's folders [as occurs with the sdist built version]

sdist result:

./
../
pytest_shell_script_test_harness-0.1.0.dev0/
    CHANGELOG.rst       <---
    LICENSE             <---
    PKG-INFO
    README.md
    pyproject.toml      <---
    setup.py
    src/
    tests/              <---

wheel result:

./
../
CHANGELOG.rst           <---
LICENSE                 <---
pyproject.toml          <---
pytest_shell_script_test_harness/
    __impl.py
    __init__.py
    coverage_plugin.py
    py.typed
    resources/
pytest_shell_script_test_harness-0.1.0.dev0.dist-info/
    LICENSE
    METADATA
    RECORD
    WHEEL
    entry_points.txt

NOTE: 'tests' folder missing from wheel

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked pyproject.toml and reproduce the issue using poetry build, then compare the extracted wheel and sdist contents. Trace the wheel-building path that handles include=; done means included files are placed under the intended package and included folders, such as tests, are present in the wheel.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.