nix-community / pypi2nix

Abandoned! Generate Nix expressions for Python packages
194 stars 47 forks source link

pytest-http, pkg_resources #406

Closed spinus closed 4 years ago

spinus commented 4 years ago

pytest-html requires pkg_resources package. That lib builds just fine, but when in runtime, it cannot find pkg_resources (it uses lib to discover some files so I couldn't just remove this dependency).

To reproduce:

  1. requirements.txt
    pytest-html==2.0.1
    setuptools-scm==3.1.0
  2. override
    
    { pkgs, python }:

self: super: { "pytest-html" = python.overrideDerivation super.pytest-html (old: { buildInputs = old.buildInputs ++ [ self."setuptools-scm" ]; "pytest-metadata" = super.pytest-metadata.overrideAttrs (old: { buildInputs = old.buildInputs ++ [ self."setuptools-scm" ]; }); }


Issue:
seppeljordan commented 4 years ago

Hi, you have to add setuptools to propagatedBuildInputs (that's your runtime deps) to make it available at runtime. Let me know if that helped.

spinus commented 4 years ago

@seppeljordan yes, that helps. Thank you.