Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve output when importing pyproject.toml from poetry #2126

Closed
quag-cactus opened this issue Jul 23, 2023 · 1 comment
Closed

Improve output when importing pyproject.toml from poetry #2126

quag-cactus opened this issue Jul 23, 2023 · 1 comment
Labels
⭐ enhancement Improvements for existing features

Comments

@quag-cactus
Copy link

Is your feature request related to a problem? Please describe.

I am attempting to convert the pyproject.toml file, which was originally written for Poetry.

Here is an example of the toml file used to manage a test project with Poetry:

original toml file
name = "test-migration-project"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [{include = "test_migration_project"}]

[tool.poetry.dependencies]
python = "^3.8"
pendulum = "^2.1.2"
tqdm = "^4.65.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

following toml file is generated by executing pdm import pyproject.toml:

outputted toml file
[tool.poetry]
name = "test-migration-project"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [{include = "test_migration_project"}]

[tool.poetry.dependencies]
python = "^3.8"
pendulum = "^2.1.2"
tqdm = "^4.65.0"

[tool.pdm.build]
includes = [
    "test_migration_project",
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[project]
authors = [
    {name = "Your Name", email = "you@example.com"},
]
requires-python = ">=3.8,<4.0"
dependencies = [
    "pendulum<3.0.0,>=2.1.2",
    "tqdm<5.0.0,>=4.65.0",
]
name = "test-migration-project"
version = "0.1.0"
description = ""
readme = "README.md"

Describe the solution you'd like

  • Existing sections [tool.poetry.*]are retained. There does not seem to be much need for these to be do.
  • The order of the sections inside pyproject.toml generated by the import command seem to be undefined. The order of the sections should be in the same order as when the new project is generated.
  • The value of the build-system section is still specifying the poetry backend. It should be updated to a backend supported by PDM.

If this proposal is needed, I am prepared to work on this. 🙂

@quag-cactus quag-cactus added the ⭐ enhancement Improvements for existing features label Jul 23, 2023
@quag-cactus quag-cactus changed the title Improve output when importing pyproject.toml in poetry Improve output when importing pyproject.toml from poetry Jul 25, 2023
@frostming
Copy link
Collaborator

frostming commented Feb 7, 2024

  • The value of the build-system section is still specifying the poetry backend. It should be updated to a backend supported by PDM.

This item is already resolved, and there is no more item we could take here. Closing now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

No branches or pull requests

2 participants