Poetry: Provide way to export only development dependencies

Created on 6 Oct 2019  路  2Comments  路  Source: python-poetry/poetry

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] I have searched the documentation and believe that my question is not covered.

Feature Request

I'm using Poetry v1.0.0b for this, which (as opposed to v0.12.x) includes the export command.

I come from a background where core dependencies are defined in requirements.txt and development ones in requirements-dev.txt (or similar). Test dependencies might have their own file as well (e.g. to only install what's necessary to test on CI systems, but not debug and documentation tools).

My issue is that while I can (re-)create the core requirements file via poetry export -f requirements.txt --without-hashes -o requirements.txt, I cannot do the same for the list of (only) development dependencies.

There is the --dev option for the export command ("Include development dependencies."), but it includes the core dependencies, too. Thus, the result is not the list of additional dependencies that required for development purposes only.

I'm not sure how this can be solved without breaking the (probably useful) use case of exporting all dependencies together.

  • Maybe a --dev-only option?
  • Or make --dev output only development dependencies, but not core ones? And
  • introduce --all to output both core and development dependencies?

    • Should these include extras? If not, and I don't think they should, is the name "all" appropriate?

Feature

Most helpful comment

I like the idea, and I think it would be a useful feature for the --extras packages as well. My two favorite implementation would be:

  • --dev-only/ --extras-only as parameters
  • -f requirements-dev.txt/-f requirements-extra.txt

If we can get a consensus about the way, I think I would be able to implement such feature.

@sdispater What's your opinion?

All 2 comments

I like the idea, and I think it would be a useful feature for the --extras packages as well. My two favorite implementation would be:

  • --dev-only/ --extras-only as parameters
  • -f requirements-dev.txt/-f requirements-extra.txt

If we can get a consensus about the way, I think I would be able to implement such feature.

@sdispater What's your opinion?

https://github.com/RCheese/deplodocker
now I am using not enough DRY )

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexlatchford picture alexlatchford  路  3Comments

mozartilize picture mozartilize  路  3Comments

jackemuk picture jackemuk  路  3Comments

thmo picture thmo  路  3Comments

nikaro picture nikaro  路  3Comments