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

Add other requirement formats #132

Open
4 tasks
DavHau opened this issue Sep 27, 2020 · 4 comments
Open
4 tasks

Add other requirement formats #132

DavHau opened this issue Sep 27, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@DavHau
Copy link
Owner

DavHau commented Sep 27, 2020

This ticket should track the general progress for adding additional requirement formats.

  • poetry (project.toml)
  • poetry (poetry.lock)
  • PEP 518
  • Pipenv
@DavHau DavHau added the enhancement New feature or request label Sep 27, 2020
@shadowrylander
Copy link
Contributor

... Well I'm watching this one for sure!

@DavHau
Copy link
Owner Author

DavHau commented Oct 5, 2020

We might want to use poetry2nix to parse poetry requirements.
Of course this raises the question, if mach-nix is still needed at all since poertry2nix is able to complete the build on its own.
But:

  • poetry2nix probably doesn't handle non-python dependencies as well as mach-nix. (It doesn't take advantage of nixpkgs)
  • it isn't able to automatically mix in extra packages into the environment
  • It probably wouldn't integrate well with some other mach-nix features which I'm not aware of right now.

@SomeoneSerge
Copy link
Contributor

SomeoneSerge commented Feb 8, 2021

It would be super great to support PEP-517/PEP-518 the way poetry2nix does - so one can develop a python project the usual python way, but add a flake.nix into the directory and get toolchain-level reproducibility and optimal docker images essentially for free


UPD: to clarify, at this moment running mach-nix.buildPythonPackage against a directory with poetry-based project does not work

blaggacao pushed a commit to blaggacao/mach-nix that referenced this issue Mar 1, 2021
As er DavHau#132 not supported are, at the time of writing:
- poetry (project.toml)
- poetry (poetry.lock)
- PEP 518
- Pipenv
@blaggacao
Copy link
Contributor

blaggacao commented Mar 1, 2021

An extractor for poetry could maybe look something (relatively straight forward) like the following:

{
  pyproject = builtins.fromTOML /path/to/pyproject.toml;
  pname = pyproject.tool.poetry.name;
  version = pyproject.tool.poetry.version;
  meta.description = pyproject.tool.poetry.description;
  meta.homepage = pyproject.tool.poetry.homepage;
  meta.license = pyproject.tool.poetry.license;
  requirements = map someFormatCoersionFunction pyproject.tool.poetry.dependencies;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants