Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

StephenWithPH
Copy link
Contributor

@StephenWithPH StephenWithPH commented Sep 8, 2020

Motivation for this change

#97268 (comment)

Things done

Still a WIP... still wrapping my head around Python and nix.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@jonringer jonringer left a 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.

maintainers/maintainer-list.nix Outdated Show resolved Hide resolved
Comment on lines 1 to 11
{ lib, python3 }:

python3.pkgs.buildPythonPackage rec {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonringer ... thoughts?

Copy link
Contributor

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:

Copy link
Contributor

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 :)

Copy link
Contributor Author

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

@stale
Copy link

stale bot commented Sep 19, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 19, 2021
@StephenWithPH StephenWithPH changed the title pydrive2: init at 1.6.0 pydrive2: init at 1.10.0 Dec 13, 2021
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 13, 2021
@SuperSandro2000
Copy link
Member

Closing in favor of #156195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants