Open GuillaumeDesforges opened 3 years ago
Seems like setuptools is missing. Gunicorn does declare setuptools as a dependency (both wheel and sdist releases), therefore it should be in the final environment. Not sure what's going wrong.
My hypothesis is that airflow spawns processes, and spawned processes do not live with the right PYTHON_PATH
I'm also having this issue of setuptools
being missing. Specifically for slugify
. Should I make a new issue?
llama-index has the same pkg_resources error. I resolved it with
defaultPoetryOverrides.extend (self: super: {
llama-index = super.llama-index.overridePythonAttrs (old: {
propagatedBuildInputs = (old.propagatedBuildInputs or [ ])
++ [ super.setuptools ];
});
});
buildInputs
is not sufficient, it has to be in propagatedBuildInputs
.
I'm not sure if that applies to airflow, but maybe this will help some searchers.
@john-shaffer do you understand why buildInputs
wasn't sufficient?
@john-shaffer do you understand why
buildInputs
wasn't sufficient?
No, I would have expected setuptools to be available like any other dependency.
Bug description
Reproduce
pyproject.toml
do
poetry lock
shell.nix
./nix/overrides.nix
```nix { pkgs }: self: super: { # Package fixes numpy = super.numpy.overridePythonAttrs ( old: { nativeBuildInputs = old.nativeBuildInputs ++ [ self.cython ]; } ); flask-openid = super.flask-openid.overridePythonAttrs ( old: { propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.python3-openid ]; } ); python3-openid = super.python3-openid.overridePythonAttrs ( old: rec { meta = old.meta // { priority = 1; }; } ); tenacity = super.tenacity.overridePythonAttrs ( old: { propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pbr ]; } ); python-daemon = super.python-daemon.overridePythonAttrs ( old: { propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.twine ]; } ); croniter = super.croniter.overridePythonAttrs ( old: { propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pbr ]; } ); lockfile = super.lockfile.overridePythonAttrs ( old: { propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.pbr ]; } ); pandas = super.pandas.overridePythonAttrs ( old: { nativeBuildInputs = old.nativeBuildInputs ++ [ self.cython ]; } ); apache-airflow = super.apache-airflow.overridePythonAttrs ( old: { propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.bowler ]; } ); # ========================================= # new packages # ========================================= bowler = super.buildPythonPackage rec { pname = "bowler"; version = "0.9.0"; src = super.fetchPypi { inherit pname version; sha256 = "1ns57vb3b7ws07950p1m55a14sibmwfmsxaxl415hm5xwzi5rf6d"; }; propagatedBuildInputs = [ self.attrs self.click self.fissix self.moreorless self.volatile ]; doCheck = false; }; fissix = super.buildPythonPackage rec { pname = "fissix"; version = "20.8.0"; src = super.fetchPypi { inherit pname version; sha256 = "06jp0ph0wxaixxawbhxh5nzqid5q5q081cdip0lg7bwvmij0ms6n"; }; propagatedBuildInputs = [ self.appdirs ]; doCheck = false; }; moreorless = super.buildPythonPackage rec { pname = "moreorless"; version = "0.3.0"; src = super.fetchPypi { inherit pname version; sha256 = "1x3qyry3q12in421nrh4xaqjdzr6zmkc9h1gbbi91rf1sq5my72w"; }; nativeBuildInputs = [ self.setuptools_scm ]; propagatedBuildInputs = [ self.parameterized self.click self.volatile self.parameterized ]; doCheck = false; }; volatile = super.buildPythonPackage rec { pname = "volatile"; version = "2.1.0"; src = super.fetchPypi { inherit pname version; sha256 = "1lri7a6pmlx9ghbrsgd702c3n862glwy0p8idh0lwdg313anmqwv"; }; doCheck = false; }; psycopg2 = super.buildPythonPackage rec { pname = "psycopg2"; version = "2.8.6"; src = super.fetchPypi { inherit pname version; sha256 = "0hzmk6b1hb5riqkljr5xics6p4zbvmis6knbczb7zhq7273zc8zv"; }; nativeBuildInputs = [ pkgs.postgresql ]; doCheck = false; }; } ```
Investigation
has content
but
/nix/store/9mcgpb3z1pnfma0n0hmxaiddi6wnlpdl-python3.8-apache-airflow-1.10.12/bin/airflow
starts withso it may not use the right Python ?