poetry2nix turns Poetry projects into Nix derivations without the need to actually write Nix expressions

Overview

poetry2nix

poetry2nix turns Poetry projects into Nix derivations without the need to actually write Nix expressions. It does so by parsing pyproject.toml and poetry.lock and converting them to Nix derivations on the fly.

For more information, see the announcement post on the Tweag blog. Development of poetry2nix has been supported by Tweag.

API

The poetry2nix public API consists of the following attributes:

  • mkPoetryApplication: Creates a Python application.
  • mkPoetryEnv: Creates a Python environment with an interpreter and all packages from poetry.lock.
  • mkPoetryPackages: Creates an attribute set providing access to the generated packages and other artifacts.
  • mkPoetryScriptsPackage: Creates a package containing the scripts from tool.poetry.scripts of the pyproject.toml.
  • mkPoetryEditablePackage: Creates a package containing editable sources. Changes in the specified paths will be reflected in an interactive nix-shell session without the need to restart it.
  • defaultPoetryOverrides: A set of bundled overrides fixing problems with Python packages.
  • overrides.withDefaults: A convenience function for specifying overrides on top of the defaults.
  • overrides.withoutDefaults: A convenience function for specifying overrides without defaults.
  • cleanPythonSources: A function to create a source filter for python projects.

mkPoetryApplication

Creates a Python application using the Python interpreter specified based on the designated poetry project and lock files. mkPoetryApplication takes an attribute set with the following attributes (attributes without default are mandatory):

  • projectDir: path to the root of the project.
  • src: project source (default: cleanPythonSources { src = projectDir; }).
  • pyproject: path to pyproject.toml (default: projectDir + "/pyproject.toml").
  • poetrylock: poetry.lock file path (default: projectDir + "/poetry.lock").
  • overrides: Python overrides to apply (default: [defaultPoetryOverrides]).
  • meta: application meta data (default: {}).
  • python: The Python interpreter to use (default: pkgs.python3).

Other attributes are passed through to buildPythonApplication.

Example

poetry2nix.mkPoetryApplication {
    projectDir = ./.;
}

See ./pkgs/poetry/default.nix for a working example.

Dependency environment

The resulting derivation also has the passthru attribute dependencyEnv, which is an environment with a python interpreter, all non-development dependencies and your application. This can be used if your application doesn't provide any binaries on its own and instead relies on dependencies binaries to call its modules (as is often the case with celery or gunicorn). For example, if your application defines a CLI for the module admin and a gunicorn app for the module web, a working default.nix would contain

let
    app = poetry2nix.mkPoetryApplication {
        projectDir = ./.;
    };
in app.dependencyEnv

After building this expression, your CLI and app can be called with these commands

$ result/bin/python -m admin
$ result/bin/gunicorn web:app

Note: If you need to perform overrides on the application, use app.dependencyEnv.override { app = app.override { ... }; }. See ./tests/dependency-environment/default.nix for a full example.

mkPoetryEnv

Creates an environment that provides a Python interpreter along with all dependencies declared by the designated poetry project and lock files. Also allows package sources of an application to be installed in editable mode for fast development. mkPoetryEnv takes an attribute set with the following attributes (attributes without default are mandatory):

  • projectDir: path to the root of the project.
  • pyproject: path to pyproject.toml (default: projectDir + "/pyproject.toml").
  • poetrylock: poetry.lock file path (default: projectDir + "/poetry.lock").
  • overrides: Python overrides to apply (default: [defaultPoetryOverrides]).
  • python: The Python interpreter to use (default: pkgs.python3).
  • editablePackageSources: A mapping from package name to source directory, these will be installed in editable mode (default: {}).

Example

poetry2nix.mkPoetryEnv {
    projectDir = ./.;
}

See ./tests/env/default.nix for a working example.

Example with editable packages

poetry2nix.mkPoetryEnv {
    projectDir = ./.;
    editablePackageSources = {
        my-app = ./src;
    };
}

See ./tests/editable/default.nix for a working example of an editable package.

Example shell.nix

The env attribute of the attribute set created by mkPoetryEnv contains a shell environment.

{ pkgs ? import 
    {} }:
let
  myAppEnv = pkgs.poetry2nix.mkPoetryEnv {
    projectDir = ./.;
    editablePackageSources = {
      my-app = ./src;
    };
  };
in myAppEnv.env

Example shell.nix with external dependencies

For a shell environment including external dependencies, override the env to add dependency packages (for example, pkgs.hello) as build inputs.

{ pkgs ? import 
    {} }:
let
  myAppEnv = pkgs.poetry2nix.mkPoetryEnv {
    projectDir = ./.;
    editablePackageSources = {
      my-app = ./src;
    };
  };
in myAppEnv.env.overrideAttrs (oldAttrs: {
  buildInputs = [ pkgs.hello ]:
})

mkPoetryPackages

Creates an attribute set of the shape { python, poetryPackages, pyProject, poetryLock }. Where python is the interpreter specified, poetryPackages is a list of all generated python packages, pyProject is the parsed pyproject.toml and poetryLock is the parsed poetry.lock file. mkPoetryPackages takes an attribute set with the following attributes (attributes without default are mandatory):

  • projectDir: path to the root of the project.
  • pyproject: path to pyproject.toml (default: projectDir + "/pyproject.toml").
  • poetrylock: poetry.lock file path (default: projectDir + "/poetry.lock").
  • overrides: Python overrides to apply (default: [defaultPoetryOverrides]).
  • python: The Python interpreter to use (default: pkgs.python3).
  • editablePackageSources: A mapping from package name to source directory, these will be installed in editable mode (default: {}).

Example

poetry2nix.mkPoetryPackages {
    projectDir = ./.;
    python = python35;
}

mkPoetryScriptsPackage

Creates a package containing the scripts from tool.poetry.scripts of the pyproject.toml:

  • projectDir: path to the root of the project.
  • pyproject: path to pyproject.toml (default: projectDir + "/pyproject.toml").
  • python: The Python interpreter to use (default: pkgs.python3).

Example

poetry2nix.mkPoetryScriptsPackage {
    projectDir = ./.;
    python = python35;
}

mkPoetryEditablePackage

Creates a package containing editable sources. Changes in the specified paths will be reflected in an interactive nix-shell session without the need to restart it:

  • projectDir: path to the root of the project.
  • pyproject: path to pyproject.toml (default: projectDir + "/pyproject.toml").
  • python: The Python interpreter to use (default: pkgs.python3).
  • editablePackageSources: A mapping from package name to source directory, these will be installed in editable mode (default: {}).

Example

poetry2nix.mkPoetryEditablePackage {
    projectDir = ./.;
    python = python35;
    editablePackageSources = {
        my-app = ./src;
    };
}

defaultPoetryOverrides

poetry2nix bundles a set of default overrides that fix problems with various Python packages. These overrides are implemented in overrides.nix.

overrides.withDefaults

Returns a list containing the specified overlay and defaultPoetryOverrides.

Takes an attribute set with the following attributes (attributes without default are mandatory):

  • src: project source directory

Example

poetry2nix.mkPoetryEnv {
    projectDir = ./.;
    overrides = poetry2nix.overrides.withDefaults (self: super: { foo = null; });
}

See ./tests/override-support/default.nix for a working example.

overrides.withoutDefaults

Returns a list containing just the specified overlay, ignoring defaultPoetryOverrides.

Example

poetry2nix.mkPoetryEnv {
    projectDir = ./.;
    overrides = poetry2nix.overrides.withoutDefaults (self: super: { foo = null; });
}

cleanPythonSources

Provides a source filtering mechanism that:

  • Filters gitignore's
  • Filters pycache/pyc files
  • Uses cleanSourceFilter to filter out .git/.hg, .o/.so, editor backup files & nix result symlinks

Example

poetry2nix.cleanPythonSources {
    src = ./.;
}

Creating a custom Poetry2nix instance

Sometimes when it can be convenient to create a custom instance of poetry2nix with a different set of default overrides.

Example

let
  # self & super refers to poetry2nix
  p2nix = poetry2nix.overrideScope' (self: super: {

    # pyself & pysuper refers to python packages
    defaultPoetryOverrides = super.defaultPoetryOverrides.extend (pyself: pysuper: {

      my-custom-pkg = super.my-custom-pkg.overridePythonAttrs (oldAttrs: { });

    });

  });

in
p2nix.mkPoetryApplication {
  projectDir = ./.;
}

or as a nixpkgs overlay:

let
  pkgs = import 
    {
    overlays = [
      # self & super refers to nixpkgs
      (self: super: {

        # p2self & p2super refers to poetry2nix
        poetry2nix = super.poetry2nix.overrideScope' (p2nixself: p2nixsuper: {

          # pyself & pysuper refers to python packages
          defaultPoetryOverrides = p2nixsuper.defaultPoetryOverrides.extend (pyself: pysuper: {

            my-custom-pkg = super.my-custom-pkg.overridePythonAttrs (oldAttrs: { });

          });

        });
      })

    ];
  };

in pkgs.poetry2nix.mkPoetryApplication {
  projectDir = ./.;
}

Using the flake

For the experimental flakes functionality we provide poetry2nix as a flake providing an overlay to use with nixpkgs. Additionally, the flake provides a flake template to quickly start using poetry2nix in a project:

nix flake init --template github:nix-community/poetry2nix

Contributing

Contributions to this project are welcome in the form of GitHub PRs. Please consider the following before creating PRs:

  • This project uses nixpkgs-fmt for formatting the Nix code. You can use nix-shell --run "nixpkgs-fmt ." to format everything.
  • If you are planning to make any considerable changes, you should first present your plans in a GitHub issue so it can be discussed.
  • If you add new features please consider adding tests. You can run them locally as follows:
nix-build --keep-going --show-trace tests/default.nix

License

poetry2nix is released under the terms of the MIT license.

Comments
  • Trying to fix the setuptools fallout

    Trying to fix the setuptools fallout

    TODO list (ongoing):

    • [x] fix package name normalization
    • [x] fix override updating script to not screw with existing overrides with version constraints
    opened by K900 63
  • `infinite recursion encountered`

    `infinite recursion encountered`

    Describe the issue

    Since #736 got merged (I confirmed by pinning the commit in the flake input), I'm getting this error:

     nix build
    warning: Git tree '/home/asymmetric/code/foo/bar' is dirty
    error: infinite recursion encountered
    
           at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:312:41:
    
              311|   */
              312|   nameValuePair = name: value: { inherit name value; };
                 |                                         ^
              313|
    (use '--show-trace' to show detailed location information)
    

    Additional context

    trace ``` warning: Git tree '/home/asymmetric/code/foo/bar' is dirty error: infinite recursion encountered
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:312:41:
    
          311|   */
          312|   nameValuePair = name: value: { inherit name value; };
             |                                         ^
          313|
    
       … while evaluating the attribute 'babel'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:312:41:
    
          311|   */
          312|   nameValuePair = name: value: { inherit name value; };
             |                                         ^
          313|
    
       … while evaluating 'addBuildSystem'
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:9:5:
    
            8|   addBuildSystem =
            9|     { self
             |     ^
           10|     , drv
    
       … from call site
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:81:21:
    
           80|       (attr: systems: builtins.foldl'
           81|         (drv: attr: addBuildSystem {
             |                     ^
           82|           inherit drv self attr;
    
       … while evaluating anonymous lambda
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:81:15:
    
           80|       (attr: systems: builtins.foldl'
           81|         (drv: attr: addBuildSystem {
             |               ^
           82|           inherit drv self attr;
    
       … from call site
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:80:23:
    
           79|     lib.mapAttrs
           80|       (attr: systems: builtins.foldl'
             |                       ^
           81|         (drv: attr: addBuildSystem {
    
       … while evaluating anonymous lambda
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:80:14:
    
           79|     lib.mapAttrs
           80|       (attr: systems: builtins.foldl'
             |              ^
           81|         (drv: attr: addBuildSystem {
    
       … from call site
    
       … while evaluating 'checkInPkgs'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/top-level/python-aliases.nix:22:20:
    
           21|   # python-packages.nix.
           22|   checkInPkgs = n: alias: if builtins.hasAttr n super
             |                    ^
           23|                           then throw "Alias ${n} is still in python-packages.nix"
    
       … from call site
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/top-level/python-aliases.nix:29:32:
    
           28|                              (removeRecurseForDerivations
           29|                               (checkInPkgs n alias)))
             |                                ^
           30|                      aliases;
    
       … while evaluating 'removeRecurseForDerivations'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/top-level/python-aliases.nix:8:33:
    
            7|   # set to appear while listing all the packages available.
            8|   removeRecurseForDerivations = alias: with lib;
             |                                 ^
            9|       if alias.recurseForDerivations or false then
    
       … from call site
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/top-level/python-aliases.nix:28:31:
    
           27|     lib.mapAttrs (n: alias: removeDistribute
           28|                              (removeRecurseForDerivations
             |                               ^
           29|                               (checkInPkgs n alias)))
    
       … while evaluating 'isDerivation'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:427:18:
    
          426|   */
          427|   isDerivation = x: x.type or null == "derivation";
             |                  ^
          428|
    
       … from call site
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/top-level/python-aliases.nix:16:8:
    
           15|   removeDistribute = alias: with lib;
           16|     if isDerivation alias then
             |        ^
           17|       dontDistribute alias
    
       … while evaluating 'removeDistribute'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/top-level/python-aliases.nix:15:22:
    
           14|   # sets from building on Hydra.
           15|   removeDistribute = alias: with lib;
             |                      ^
           16|     if isDerivation alias then
    
       … from call site
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/top-level/python-aliases.nix:27:29:
    
           26|   mapAliases = aliases:
           27|     lib.mapAttrs (n: alias: removeDistribute
             |                             ^
           28|                              (removeRecurseForDerivations
    
       … while evaluating anonymous lambda
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/top-level/python-aliases.nix:27:22:
    
           26|   mapAliases = aliases:
           27|     lib.mapAttrs (n: alias: removeDistribute
             |                      ^
           28|                              (removeRecurseForDerivations
    
       … from call site
    
       … while evaluating 'isDerivation'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:427:18:
    
          426|   */
          427|   isDerivation = x: x.type or null == "derivation";
             |                  ^
          428|
    
       … from call site
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/default.nix:248:20:
    
          247|               (name: value: (
          248|                 if lib.isDerivation value && lib.hasAttr "overridePythonAttrs" value
             |                    ^
          249|                 then value.overridePythonAttrs (_: { doCheck = false; })
    
       … while evaluating anonymous lambda
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/default.nix:247:22:
    
          246|             (self: super: lib.mapAttrs
          247|               (name: value: (
             |                      ^
          248|                 if lib.isDerivation value && lib.hasAttr "overridePythonAttrs" value
    
       … from call site
    
       … while evaluating the attribute 'babel'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:312:41:
    
          311|   */
          312|   nameValuePair = name: value: { inherit name value; };
             |                                         ^
          313|
    
       … while evaluating 'addBuildSystem'
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:9:5:
    
            8|   addBuildSystem =
            9|     { self
             |     ^
           10|     , drv
    
       … from call site
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:81:21:
    
           80|       (attr: systems: builtins.foldl'
           81|         (drv: attr: addBuildSystem {
             |                     ^
           82|           inherit drv self attr;
    
       … while evaluating anonymous lambda
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:81:15:
    
           80|       (attr: systems: builtins.foldl'
           81|         (drv: attr: addBuildSystem {
             |               ^
           82|           inherit drv self attr;
    
       … from call site
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:80:23:
    
           79|     lib.mapAttrs
           80|       (attr: systems: builtins.foldl'
             |                       ^
           81|         (drv: attr: addBuildSystem {
    
       … while evaluating anonymous lambda
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/overrides/default.nix:80:14:
    
           79|     lib.mapAttrs
           80|       (attr: systems: builtins.foldl'
             |              ^
           81|         (drv: attr: addBuildSystem {
    
       … from call site
    
       … while evaluating anonymous lambda
    
       at /nix/store/4yy33bawrm7cmlgmjnjrfn8qvyh0shz8-source/default.nix:43:15:
    
           42|             (
           43|               dep:
             |               ^
           44|               let
    
       … from call site
    
       … while evaluating 'isDerivation'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:427:18:
    
          426|   */
          427|   isDerivation = x: x.type or null == "derivation";
             |                  ^
          428|
    
       … from call site
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/stdenv/generic/make-derivation.nix:201:8:
    
          200|   checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
          201|     if lib.isDerivation dep || isNull dep || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep
             |        ^
          202|     else if lib.isList dep then checkDependencyList' ([index] ++ positions) name dep
    
       … while evaluating anonymous lambda
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/stdenv/generic/make-derivation.nix:200:81:
    
          199|   checkDependencyList = checkDependencyList' [];
          200|   checkDependencyList' = positions: name: deps: lib.flip lib.imap1 deps (index: dep:
             |                                                                                 ^
          201|     if lib.isDerivation dep || isNull dep || builtins.typeOf dep == "string" || builtins.typeOf dep == "path" then dep
    
       … from call site
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/lists.nix:117:32:
    
          116|   */
          117|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                                ^
          118|
    
       … while evaluating anonymous lambda
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/lists.nix:117:29:
    
          116|   */
          117|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                             ^
          118|
    
       … from call site
    
       … while evaluating anonymous lambda
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/stdenv/generic/make-derivation.nix:243:13:
    
          242|       (map (drv: drv.__spliced.hostHost or drv) (checkDependencyList "depsHostHostPropagated" depsHostHostPropagated))
          243|       (map (drv: drv.crossDrv or drv) (checkDependencyList "propagatedBuildInputs" propagatedBuildInputs))
             |             ^
          244|     ]
    
       … from call site
    
       … while evaluating 'getOutput'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:598:23:
    
          597|   */
          598|   getOutput = output: pkg:
             |                       ^
          599|     if ! pkg ? outputSpecified || ! pkg.outputSpecified
    
       … from call site
    
       … while evaluating the attribute 'propagatedBuildInputs' of the derivation 'python3.9-market-maker-stats-1.0.0'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/pkgs/stdenv/generic/make-derivation.nix:278:7:
    
          277|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          278|       name =
             |       ^
          279|         let
    
       … while evaluating the attribute 'drvPath'
    
       at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/customisation.nix:210:7:
    
          209|     in commonAttrs // {
          210|       drvPath = assert condition; drv.drvPath;
             |       ^
          211|       outPath = assert condition; drv.outPath;
    
    </details>
    opened by asymmetric 14
  • Can’t build matplotlib as a flake (something about certifi)

    Can’t build matplotlib as a flake (something about certifi)

    Please, see kirelagin/p2n-matplotlib for a reproduction – it is a fresh Poetry project depending only on matplotlib + a flake using poetry2nix master.

    When I try to nix build it, I get:

        ERROR: Could not find a version that satisfies the requirement certifi>=2020.06.20 (from versions: none)
        ERROR: No matching distribution found for certifi>=2020.06.20
    
    Full build log
    Sourcing python-remove-tests-dir-hook
    Sourcing python-catch-conflicts-hook.sh
    Sourcing python-remove-bin-bytecode-hook.sh
    Sourcing pip-build-hook
    Using pipBuildPhase
    Using pipShellHook
    Sourcing pip-install-hook
    Using pipInstallPhase
    Sourcing python-imports-check-hook.sh
    Using pythonImportsCheckPhase
    Sourcing python-namespaces-hook
    @nix { "action": "setPhase", "phase": "unpackPhase" }
    unpacking sources
    unpacking source archive /nix/store/d8k6dfkifz4hm9253ziv0ln9j8fiip5i-matplotlib-3.4.1.tar.gz
    source root is matplotlib-3.4.1
    setting SOURCE_DATE_EPOCH to timestamp 1617177269 of file matplotlib-3.4.1/lib/matplotlib/_version.py
    @nix { "action": "setPhase", "phase": "patchPhase" }
    patching sources
    @nix { "action": "setPhase", "phase": "configurePhase" }
    configuring
    no configure script, doing nothing
    @nix { "action": "setPhase", "phase": "buildPhase" }
    building
    Executing pipBuildPhase
    Creating a wheel...
    WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Processing /build/matplotlib-3.4.1
        ERROR: Command errored out with exit status 1:
         command: /nix/store/5470xw15wnn972ap0c4f7q642z4nvh6f-python3-3.8.8/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/build/pip-req-build-yyfnzujn/setup.py'"'"'; __file__='"'"'/build/pip-req-build-yyfnzujn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /build/pip-pip-egg-info-xwl37da4
             cwd: /build/pip-req-build-yyfnzujn/
        Complete output (48 lines):
        WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
        WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/certifi/
        WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/certifi/
        WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/certifi/
        WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/certifi/
        WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/certifi/
        ERROR: Could not find a version that satisfies the requirement certifi>=2020.06.20 (from versions: none)
        ERROR: No matching distribution found for certifi>=2020.06.20
        Traceback (most recent call last):
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/installer.py", line 126, in fetch_build_egg
            subprocess.check_call(cmd)
          File "/nix/store/5470xw15wnn972ap0c4f7q642z4nvh6f-python3-3.8.8/lib/python3.8/subprocess.py", line 364, in check_call
            raise CalledProcessError(retcode, cmd)
        subprocess.CalledProcessError: Command '['/nix/store/5470xw15wnn972ap0c4f7q642z4nvh6f-python3-3.8.8/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpbiqvfb5t', '--quiet', 'certifi>=2020.06.20']' returned non-zero exit status 1.
        
        The above exception was the direct cause of the following exception:
        
        Traceback (most recent call last):
          File "", line 1, in 
          File "/build/pip-req-build-yyfnzujn/setup.py", line 258, in 
            setup(  # Finally, pass this all along to distutils to do the heavy lifting.
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
            _install_setup_requires(attrs)
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
            dist.fetch_build_eggs(dist.setup_requires)
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/dist.py", line 673, in fetch_build_eggs
            resolved_dists = pkg_resources.working_set.resolve(
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 764, in resolve
            dist = best[req.key] = env.best_match(
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1049, in best_match
            return self.obtain(req, installer)
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1061, in obtain
            return installer(requirement)
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
            return fetch_build_egg(self, req)
          File "/nix/store/fzzzxfag55c9fm7xjma1qh6jzgn7nd14-python3.8-setuptools-50.3.1/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
            raise DistutilsError(str(e)) from e
        distutils.errors.DistutilsError: Command '['/nix/store/5470xw15wnn972ap0c4f7q642z4nvh6f-python3-3.8.8/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/build/tmpbiqvfb5t', '--quiet', 'certifi>=2020.06.20']' returned non-zero exit status 1.
        
        Edit setup.cfg to change the build options; suppress output with --quiet.
        
        BUILDING MATPLOTLIB
          matplotlib: yes [3.4.1]
              python: yes [3.8.8 (default, Feb 19 2021, 11:04:50)  [GCC 10.2.0]]
            platform: yes [linux]
               tests: no  [skipping due to configuration]
              macosx: no  [Mac OS-X only]
        
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    

    I don’t understand what it means, but I tried adding certifi to the dependencies and doing nix build --impure – still the same.

    opened by kirelagin 13
  • Fix infinite recursion for aliases in pkgs/top-level/python-aliases.nix

    Fix infinite recursion for aliases in pkgs/top-level/python-aliases.nix

    opened by SemMulder 12
  • Hatchling missing?

    Hatchling missing?

    I see this error:

    nix-shell
    error: attribute 'hatchling' missing, at /nix/store/5wryb8bv33i7bn87rc41jscf2xsr5q92-poetry2nix-src/overrides/default.nix:27:71
    (use '--show-trace' to show detailed location information)
    

    This feels like an edge-case that could be documented.

    opened by NorfairKing 12
  • can't run my program executable (console_script) via mkPoetryApplication

    can't run my program executable (console_script) via mkPoetryApplication

    I am trying to convert my project to poetry, it's a cli interactive application. I was annoyed by https://github.com/python-poetry/poetry/issues/1279 but could fix it by committing the generated poetry setup.py file.

    Now once I am in a nix-shell (poetry2nix.mkPoetryApplication {), I can't run my software (executable is called mptcpanalyzer) because of:

    Traceback (most recent call last):
      File "/run/user/1000/tmp.fnf8TG4JP9/bin/mptcpanalyzer", line 33, in <module>
        sys.exit(load_entry_point('mptcpanalyzer', 'console_scripts', 'mptcpanalyzer')())
      File "/run/user/1000/tmp.fnf8TG4JP9/bin/mptcpanalyzer", line 22, in importlib_load_entry_point
        for entry_point in distribution(dist_name).entry_points
      File "/nix/store/fjgnz0xfl04hsblsi4ym5y5akfh6mlmy-python3-3.8.5/lib/python3.8/importlib/metadata.py", line 504, in distribution
        return Distribution.from_name(distribution_name)
      File "/nix/store/fjgnz0xfl04hsblsi4ym5y5akfh6mlmy-python3-3.8.5/lib/python3.8/importlib/metadata.py", line 177, in from_name
        raise PackageNotFoundError(name)
    importlib.metadata.PackageNotFoundError: mptcpanalyzer
    

    Not sure what's the error here, wether it's nix or poetry's fault.

    If you wanna try/check, just run nix-shell on this code https://github.com/teto/mptcpanalyzer/pull/35 I am using nixpkgs c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38

    opened by teto 11
  • exceptiongroup 1.0.0rc8 missing flit_scm module

    exceptiongroup 1.0.0rc8 missing flit_scm module

    opened by l0b0 10
  • Fix legacy relative paths including `../`

    Fix legacy relative paths including `../`

    Artifactory's pypi repositories creates links from the index pages that look something like this: ../../$package-name/$version/$artifact.$ext. This breaks since urllib does not normalize the ../ parts from the links and Artifactory does not resolve them when fetching the artifacts, leading to an unexpected 404.

    This PR adds support for resolving the ../ parts of the URL. ~It also adds the cacert derivation into the build to allow SSL certificate verification.~

    Nix is kind of new to me and I struggled really hard trying to write a sane test for this and failed so I'm posting this PR without tests and am open to write tests if someone can hint me how to set that up for testing this.

    opened by johanwiren 10
  • CI fails with nixpkgs after pip 20.3 update

    CI fails with nixpkgs after pip 20.3 update

    After bisecting this, I found that CI started failing with the pip 20.2.4 -> 20.3 update in https://github.com/NixOS/nixpkgs/commit/b0e372864a4ed1413968b13fa13b7ddf3f4673e8. The error is in regards to git dependencies:

    Collecting alembic@ git+https://github.com/sqlalchemy/alembic.git@rel_1_3_1
      Cloning https://github.com/sqlalchemy/alembic.git (to revision rel_1_3_1) to /build/pip-install-i48hvlvt/alembic_3450e6726d6b44b6ab41a7e579ae0c67
      ERROR: Error [Errno 2] No such file or directory: 'git' while executing command git clone -q https://github.com/sqlalchemy/alembic.git /build/pip-install-i48hvlvt/alembic_3450e6726d6b44b6ab41a7e579ae0c67
    ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
    builder for '/nix/store/df9ciykjrpyym58kc88vlcdqdjaq6sii-python3.8-git-deps-0.1.0.drv' failed with exit code 1
    

    For some reason pip doesn't detect the passed dependency anymore and tries to fetch it on its own. This error is reproducible with

    $ nix-build tests -A git-deps -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/master.tar.gz
    
    opened by infinisil 10
  • Fix flake

    Fix flake

    At the moment

    nix flake show --no-write-lock-file github:nix-community/poetry2nix
    

    fails with

    * Added 'nixpkgs': 'github:NixOS/nixpkgs/e286f0cf3bcffd5c0f006bb1831563d63b281fb2'
    github:nix-community/poetry2nix/1894b501cf4431fb218c4939a9acdbf397ac1803
    ├───overlay: Nixpkgs overlay
    └───packages
        ├───aarch64-linux
        │   ├───poetry: package 'python3.8-poetry-1.1.4'
    error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix
    expected a derivation
    

    So it seams stuff in packages output need to be a derivation.

    To turn poetry2nix into a proper flake, just remove the packages. Its not needed anyways and just forces people to download nixpkgs checkout another time.

    Of course flakes is experimental and such sort of breakage is to be expected, I think it would be good to fix it up anyway.

    opened by typetetris 10
  • Can't install mypy 0.902

    Can't install mypy 0.902

    I get the following error when trying to install mypy 0.902:

    Processing /private/tmp/nix-build-python3.8-mypy-0.902.drv-0/mypy-0.902
        ERROR: Command errored out with exit status 1:
         command: /nix/store/3dvkfi06mzgszfwkhlrjnww1fj02ymbf-python3-3.8.9/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/nix-build-python3.8-mypy-0.902.drv-0/pip-req-build-8zacv0o5/setup.py'"'"'; __file__='"'"'/private/tmp/nix-build-python3.8-mypy-0.902.drv-0/pip-req-build-8zacv0o5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/tmp/nix-build-python3.8-mypy-0.902.drv-0/pip-pip-egg-info-s0q3yqyp
             cwd: /private/tmp/nix-build-python3.8-mypy-0.902.drv-0/pip-req-build-8zacv0o5/
        Complete output (84 lines):
        mypy/modulefinder.py:432: error: Library stubs not installed for "toml" (or incompatible with Python 3.8)
        mypy/config_parser.py:10: error: Library stubs not installed for "toml" (or incompatible with Python 3.8)
        mypy/config_parser.py:10: note: Hint: "python3 -m pip install types-toml"
        mypy/config_parser.py:10: note: (or run "mypy --install-types" to install all missing stub packages)
        mypy/config_parser.py:10: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
        mypy/fastparse.py:109: error: Library stubs not installed for "typed_ast" (or incompatible with Python 3.8)
        mypy/fastparse.py:109: note: Hint: "python3 -m pip install types-typed-ast"
        mypy/fastparse2.py:57: error: Library stubs not installed for "typed_ast.ast27" (or incompatible with Python 3.8)
        mypy/fastparse2.py:68: error: Library stubs not installed for "typed_ast" (or incompatible with Python 3.8)
    ...
    

    Because I saw Hint: "python3 -m pip install types-toml" in the error log, I tried to work around it with the following:

        mypy = super.mypy.overridePythonAttrs (old: {
          buildInputs = (old.buildInputs or []) ++ [
            self.types-toml
          ];
        });
    

    But this gives me another error:

    error: attribute 'types-toml' missing
    

    What else can I try?

    opened by zupo 9
  • Update filelock build systems

    Update filelock build systems

    Hi!

    filelock has recently switched to hatchling + hatch-vcs. This PR updates the corresponding override. I've kept setuptools and setuptools-scm in order to keep compatiblity with older versions (not sure if this is the recommended pattern for this).

    opened by utybo 0
  • python-ulid dependency not found

    python-ulid dependency not found

    Describe the issue

    The linz-logger package declares a dependency on python-ulid. This works when installed via poetry install, but fails in poetry2nix:

    Processing /build/linz_logger-0.11.0
      Running command Preparing metadata (pyproject.toml)
      Preparing metadata (pyproject.toml) ... done
    Building wheels for collected packages: linz-logger
      Running command Building wheel for linz-logger (pyproject.toml)
      Building wheel for linz-logger (pyproject.toml) ... done
      Created wheel for linz-logger: filename=linz_logger-0.11.0-py3-none-any.whl size=4798 sha256=0f35126e1343fa3da2ce1ba5ee804d3589013bd8124a5c7517c0d285a91e5871
      Stored in directory: /build/pip-ephem-wheel-cache-frtj87kr/wheels/6b/2e/dd/570a600966922fadf727178724ab0d1b29fcfb05f27c944af1
    Successfully built linz-logger
    Finished creating a wheel...
    Finished executing pipBuildPhase
    @nix { "action": "setPhase", "phase": "installPhase" }
    installing
    Executing pipInstallPhase
    /build/linz_logger-0.11.0/dist /build/linz_logger-0.11.0
    Processing ./linz_logger-0.11.0-py3-none-any.whl
    Requirement already satisfied: structlog<23.0.0,>=22.1.0 in /nix/store/x8lbzynbn7bsw6n7hlqd25k7hb53qbhc-python3.9-structlog-22.3.0/lib/python3.9/site-packages (from linz-logger==0.11.0) (22>
    ERROR: Could not find a version that satisfies the requirement python-ulid<2.0.0,>=1.1.0 (from linz-logger) (from versions: none)
    ERROR: No matching distribution found for python-ulid<2.0.0,>=1.1.0
    

    Additional context

    Maybe this is caused by the inconsistent package names? The latest release is python-ulid-1.1.0.tar.gz (hyphenated) and python_ulid-1.1.0-py3-none-any.whl (underscored).

    • default.nix/shell.nix/flake.nix
    { pkgs ? import
        (
          fetchTarball (
            builtins.fromJSON (
              builtins.readFile ./nixpkgs.json)))
        { }
    }:
    let
      poetryEnv = pkgs.poetry2nix.mkPoetryEnv {
        python = pkgs.python39;
        projectDir = builtins.path { path = ./.; name = "test"; };
      };
    in
    poetryEnv.env
    
    • pyproject.toml
    [tool.poetry]
    name = "tmp-ytrtvrh3m6"
    version = "0.1.0"
    description = ""
    authors = ["Victor Engmark <[email protected]>"]
    readme = "README.md"
    packages = [{include = "tmp"}]
    
    [tool.poetry.dependencies]
    python = "^3.10"
    linz-logger = "^0.11.0"
    
    
    [build-system]
    requires = ["poetry-core"]
    build-backend = "poetry.core.masonry.api"
    
    • poetry.lock
    # This file is automatically @generated by Poetry and should not be changed by hand.
    
    [[package]]
    name = "linz-logger"
    version = "0.11.0"
    description = "LINZ standard Logging format"
    category = "main"
    optional = false
    python-versions = ">=3.8,<4.0"
    files = [
        {file = "linz_logger-0.11.0-py3-none-any.whl", hash = "sha256:1e8ef3f85a77e9506728a022e7b9b6b835c32a7d784ee8d78b6bb28755cc264a"},
        {file = "linz_logger-0.11.0.tar.gz", hash = "sha256:7454e18f613b5aafbb38cad1478d48eab15bacd4d3fe8bb70fcc55f4ea139a6b"},
    ]
    
    [package.dependencies]
    python-ulid = ">=1.1.0,<2.0.0"
    structlog = ">=22.1.0,<23.0.0"
    
    [[package]]
    name = "python-ulid"
    version = "1.1.0"
    description = "Universally Unique Lexicographically Sortable Identifier"
    category = "main"
    optional = false
    python-versions = ">=3.7"
    files = [
        {file = "python-ulid-1.1.0.tar.gz", hash = "sha256:5fb5e4a91db8ca93e8938a613360b3def299b60d41f847279a8c39c9b2e9c65e"},
        {file = "python_ulid-1.1.0-py3-none-any.whl", hash = "sha256:88c952f6be133dbede19c907d72d26717d2691ec8421512b573144794d891e24"},
    ]
    
    [[package]]
    name = "structlog"
    version = "22.3.0"
    description = "Structured Logging for Python"
    category = "main"
    optional = false
    python-versions = ">=3.7"
    files = [
        {file = "structlog-22.3.0-py3-none-any.whl", hash = "sha256:b403f344f902b220648fa9f286a23c0cc5439a5844d271fec40562dbadbc70ad"},
        {file = "structlog-22.3.0.tar.gz", hash = "sha256:e7509391f215e4afb88b1b80fa3ea074be57a5a17d794bd436a5c949da023333"},
    ]
    
    [package.extras]
    dev = ["structlog[docs,tests,typing]"]
    docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-mermaid", "twisted"]
    tests = ["coverage[toml]", "freezegun (>=0.2.8)", "pretend", "pytest (>=6.0)", "pytest-asyncio (>=0.17)", "simplejson"]
    typing = ["mypy", "rich", "twisted"]
    
    [metadata]
    lock-version = "2.0"
    python-versions = "^3.10"
    content-hash = "4334a7f1b159cff4e3729e00acccf01f69917413bb64a441c8620d12483108e4"
    
    • nixpkgs.json
    {
      "name": "release-22.11-2023-01-03T21-39-40Z",
      "url": "https://github.com/NixOS/nixpkgs/archive/a9eedea7232f5d00f0aca7267efb69a54da1b8a1.tar.gz",
      "sha256": "05giahp6v6q4smb8b9dbjc1hsfxhla831a152s0rywikdfvsmv1g"
    }
    
    opened by l0b0 0
  • Nixpkgs patches certifi to use cacert. Should poetry2nix do so too?

    Nixpkgs patches certifi to use cacert. Should poetry2nix do so too?

    Describe the issue

    Nixpkgs has made the change

    • https://github.com/NixOS/nixpkgs/pull/205127,

    We update the system ca-bundle more reliably, and it allows ties in with module based configuration applied through security.pki.

    Should the default poetry2nix overrides include the same change?

    Additional context

    • default.nix/shell.nix/flake.nix
    • pyproject.toml
    
    
    • poetry.lock
    [[package]]
    name = "certifi"
    version = "2022.12.7"
    description = "Python package for providing Mozilla's CA Bundle."
    #...
    
    opened by roberth 0
  • feat: Show lock location in package errors

    feat: Show lock location in package errors

    Tested by temporarily setting meta.broken = true; in mk-poetry-dep.nix, and then

    $ nix-build tools -A env
    error: Package ‘python3.9-click-8.1.3’ in /home/user/h/poetry2nix/tools/poetry.lock:0 is marked as broken, refusing to evaluate.
    
       a) To temporarily allo[...]
    

    As you can see, the location of the lock file is reported, which is especially useful in Nixpkgs, which contains multiple lockfiles.

    This used to be just the location of a generic python builder, which is generally not what the user wants.

    I've exposed the poetrylockPos variable as a parameter that callers may set. This is intended as a contingency more so than a feature that is useful to users. That's why I've decided not to document it, because it would just add noise. I could make it internal, a let binding, if you prefer.

    opened by roberth 0
Owner
Nix community projects
A project incubator that works in parallel of the @NixOS org
Nix community projects
Poetry plugin to bundle projects into various formats

Poetry bundle plugin This package is a plugin that allows the bundling of Poetry projects into various formats. Installation The easiest way to instal

Poetry 54 Jan 2, 2023
A program that takes Python classes and turns them into CSS classes.

PyCSS What is it? PyCSS is a micro-framework to speed up the process of writing bulk CSS classes. How does it do it? With Python!!! First download the

T.R Batt 0 Aug 3, 2021
This is a Poetry plugin that will make it possible to build projects using custom TOML files

Poetry Multiproject Plugin This is a Poetry plugin that will make it possible to build projects using custom TOML files. This is especially useful whe

David Vujic 69 Dec 25, 2022
Canim1 - Simple python tool to search for packages without m1 wheels in poetry lockfiles

canim1 Usage Clone the repo. Run poetry install. Then you can use the tool: ❯ po

Korijn van Golen 1 Jan 25, 2022
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

null 18.6k Jan 2, 2023
You can easily send campaigns, e-marketing have actually account using cash will thank you for using our tools, and you can support our Vodafone Cash +201090788026

*** Welcome User Sorry I Mean Hello Brother ✓ Devolper and Design : Mokhtar Abdelkreem ========================================== You Can Follow Us O

Mo Code 1 Nov 3, 2021
Utility functions for working with data from Nix in Python

Pynixutil - Utility functions for working with data from Nix in Python Examples Base32 encoding/decoding import pynixutil input = "v5sv61sszx301i0x6x

Tweag 11 Dec 16, 2022
Run unpatched binaries on Nix/NixOS

Run unpatched binaries on Nix/NixOS

Thiago Kenji Okada 160 Jan 8, 2023
A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

A python script providing an idea of how a MindSphere application, e.g., a dashboard, can be displayed around the clock without the need of manual re-authentication on enforced session expiration

MindSphere 3 Jun 3, 2022
Poetry workspace plugin for Python monorepos.

poetry-workspace-plugin Poetry workspace plugin for Python monorepos. Inspired by Yarn Workspaces. Adds a new subcommand group, poetry workspace, whic

Jack Smith 74 Jan 1, 2023
A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv

poetry-exec-plugin A plugin for poetry that allows you to execute scripts defined in your pyproject.toml, just like you can in npm or pipenv Installat

null 38 Jan 6, 2023
Demo Python project using Conda and Poetry

Conda Poetry This is a demonstration of how Conda and Poetry can be used in a Python project for dev dependency management and production deployment.

Ryan Allen 2 Apr 26, 2022
🛠️ Plugin to integrate Chuy with Poetry

Archived This is bundled with Chuy since v1.3.0. Poetry Chuy Plugin This plugin integrates Chuy with Poetry. Note: This only works in Poetry 1.2.0 or

Eliaz Bobadilla 4 Sep 24, 2021
Bazel rules to install Python dependencies with Poetry

rules_python_poetry Bazel rules to install Python dependencies from a Poetry project. Works with native Python rules for Bazel. Getting started Add th

Martin Liu 7 Dec 15, 2021
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Madison May 1.5k Dec 31, 2022
A library for pattern matching on symbolic expressions in Python.

MatchPy is a library for pattern matching on symbolic expressions in Python. Work in progress Installation MatchPy is available via PyPI, and

High-Performance and Automatic Computing 151 Dec 24, 2022
Beginner Projects A couple of beginner projects here

Beginner Projects A couple of beginner projects here, listed from easiest to hardest :) selector.py: simply a random selector to tell me who to faceti

Kylie 272 Jan 7, 2023
An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies.

miniFASTA An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies. Installation Using pip /

Jules Kreuer 3 Jun 30, 2022
Write complicated anonymous functions other than lambdas in Python.

lambdex allows you to write multi-line anonymous function expression (called a lambdex) in an idiomatic manner.

Xie Jingyi 71 May 19, 2022