Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows to have awscli running both under python 2 and 3 as necessary.
- Loading branch information
Showing
2 changed files
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffd35a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this.
python-packages.nix
should not import from anywhere butpython-modules
.Is it necessary?
ffd35a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FRidh how about I move the package under
python-modules
then?The issue is that when using nix-shell, because of the python env vars get set, it doesn't work very well to have both 3 and 2 packages at the same time. Plus in the future we probably want to default on python 3.
ffd35a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you use it with
nix-shell
? If you use e.g.then there should not be any issues. If you instead use
then there will be issues because this method should not be used.
The best available solution is with 1.12pre
because
nix run
does not run any setup hooks.ffd35a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use
shell.nix
to declare development dependencies in various projects so it's always going to load these environment variables no?Here is the current example:
ffd35a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. The issue is that we propagate Python as build input and thus introduce the setup hook. The hook makes sense when developing a package with the
-A
option but otherwise it does not.python.withPackages
orpython.buildEnv
won't propagate this hook, so wrapping each Python application in one of these will solve the issue even better (#16672)ffd35a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted in fad6250 and 1775b03. I think that apps should have a mkPythonApp that doesn't forward these environment variables