python-poetry / python-poetry/poetry-plugin-export

Allow relative paths when specifying local dependencies

Open
#340 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
335
Forks
57
Avg merge
1h 23m
Merged PRs (30d)
3

Description

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version: Ubuntu 20.04.6 LTS
  • Poetry (version 2.1.2)
  • Python version: 3.10

Issue:

Sort of a follow up to https://github.com/python-poetry/poetry-plugin-export/issues/145

my pyproject.toml file specifies a local dependency:

[tool.poetry.dependencies]
my_pkg = {path = "../../../my_pkg", develop=true}

The poetry.lock file specifies my_package with a relative path, which is correct.

But running poetry export --output requirments.txt results in

# requirements.txt
-e file:///full/path/to/my/local/dependency/my_pkg; 

this requirement.txt becomes unusable in CI due to the absolute path. There should be an optional to make the path in requirements.txt local path instead.

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 export --output requirements.txt command with a local dependency declared by a relative path. Inspect the export handling for path dependencies and determine how an optional setting could preserve relative paths; done means the generated requirements file uses a usable local path for CI. Run the relevant export checks after identifying them.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.