python-poetry / python-poetry/poetry-plugin-bundle

Bundle fails when calling from another folder than the repo itself

Open
#98 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
151
Forks
30
Avg merge
48m
Merged PRs (30d)
5

Description

Using --directory option should let you run a command as if you were in the repo folder.

This fails and probably shouldn't:

poetry new -n issue_test
poetry bundle venv issue_test_bundle --directory=issue_test

  • Bundling issue-test (0.1.0) into issue_test_bundle: Installing issue-test (0.1.0)

[Errno 2] No such file or directory: '/home/clementpinard/issue_test/issue_test/issue_test/__init__.py'

As you can see, it seems that there is a confusion between directory and file discovery. the bundle plugins probably assumes that issue_test is the library folder while it's the repo folder, which happens to be named the same
As such, the issue_test/issue_test/__init__.py' relative path that gets appended to the given working folder with the --directory option.

Contributor guide

No contributing guide indexed for this repository

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 by reproducing the poetry new and poetry bundle venv ... --directory=issue_test commands from outside the repository, then trace the bundle venv command's handling of the --directory entry point and relative package paths. Done means the same project bundles successfully without duplicating the repository directory in the package path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.