Skip to content

Import dependencies from pyproject.toml: [project] and [project.optional-dependencies] #640

@paugier

Description

@paugier

Problem description

Python packages dependencies are now described in the pyproject.toml file, sections [project] and [project.optional-dependencies].

I understand that pixi [dependencies] are something else because they are about conda packages and usually not PyPI dependencies. However, when initializing pixi for a package with a clean pyproject.toml, it would be nice to be able to fill the pixi.toml file with values from the pyproject.toml file.

Note that it is not convenient to just copy/paste the text because the format is not the same:

[project]
name = 'fluidsim'
[...]
dependencies = [
    "importlib_metadata",
    "fluidsim-core>=0.7.4",
    "h5py",
    "h5netcdf",
    "transonic",
    "xarray",
    "rich",
    "matplotlib>=3.3",
    "scipy",
]

[project.optional-dependencies]

fft = [
    "pyfftw >= 0.10.4",
    "fluidfft >= 0.2.7",
]
mpi = [
    "mpi4py",
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions