This is to prevent regressions such as https://github.com/NixOS/nixpkgs/issues/73254
by using pipenv to install a simple Python package, thus testing
that pipenv was built correctly.
Many thanks to @Infinisil and @domenkozar for hand-holding!
- setup_requires belong in nativeBuildInputs
- requests is only for Python 2. We offer only a Python 3 version of
pipenv
- setting PYTHONPATH is not needed because the magical sed expression
injects the dependencies in the executables. Otherwise, we would use
NIX_PYTHONPATH.
- PIP_IGNORE_INSTALLED was needed because of PYTHONPATH, but since we do
not set that anymore we can remove.
pipenv nix wrapper contains a PYTHONPATH which has some dependencies
for pipenv installed. pipenv by default uses site-packages when
resolving packages, which means that any package that is included in
the nix wrapper is satisfied when running `pipenv install`.
But when the actual virtualenv created by pipenv is activated, it
doesn't contain those packages anymore and fails to import them.
pipenv has a flag PIP_IGNORE_INSTALLED which can be used to ignore
site-packages. Which fixes the problem of having different resolved
packages when running pipenv and when running the virtualenv.