New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pydrive2: init at 1.10.0 #97415
pydrive2: init at 1.10.0 #97415
Conversation
d692edb
to
974a883
Compare
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.
If you're new to nix python packaging, please take a look https://www.youtube.com/watch?v=jXd-hkP4xnU where I cover python packaging within nixpkgs. Also, https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#handling-dependencies is a good resource, although it's a long read.
{ lib, python3 }: | ||
|
||
python3.pkgs.buildPythonPackage rec { |
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.
you shouldn't import a specific python version please look at https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#handling-dependencies
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.
Before trying to handle Python 2 vs 3, I received the error: google-api-core-1.22.1 not supported for interpreter python2.7.
I'm reasonably confident this comes from...
disabled = isPy27; # google namespace no longer works on python2 |
... transitively due to google_api_python_client
.
I was unable to get incantations of disabled = ! isPy3k
or disabled = isPy27
to work... builds still gave me a Python 2 interpreter error. I ended up with a pattern that worked by cribbing from other PRs.
What am I missing?
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.
@jonringer ... thoughts?
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.
Using pythonXPackages
isn't allowed from python-modules
as this will mix interpreter versions for a given package. For example, if you were to do python37Packages.<mypkg>
, but the expression pulled from python3[8]Packages
. Python will be mis-importing several libraries, and this will likely cause issues at runtime.
Please refer to Python dependency handling on the best practices for handling dependencies within python-modules
. Namely, you should be importing each python package individually, and not refer to another python package set (E.g. python3Packages
).
If you're new to nixpkgs, you're free to view some of my videos on nixpkgs and python:
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.
convert it over to using the individual packages and have it build for python3, and we'll go from there :)
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 picked this back up. I think I did all the needful in 0fbbe37022c6c14ee8ab325637f9a6df253f6d22
59affde
to
5b47d0b
Compare
I marked this as stale due to inactivity. → More info |
5b47d0b
to
5b86966
Compare
5b86966
to
0fbbe37
Compare
0fbbe37
to
decb453
Compare
Closing in favor of #156195 |
Motivation for this change
#97268 (comment)
Things done
Still a WIP... still wrapping my head around Python and nix.sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)