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

pythonPackages.html2text: Downgrade for old Python versions #72211

Merged
merged 1 commit into from Oct 29, 2019

Conversation

artemist
Copy link
Member

Motivation for this change

I was unable tp build calibre at the current git master as it relies on pytthon27Packages.html2text. Python 2.7 support was removed in the latest version.

Things done

This PR downgrades html2text when using an unsupported Python version.

This PR does not fix building python37Packages.html2text and python38Packages.html2text, which were broken at master due to what seems to be a problem in buildPythonPackage.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.
Notify maintainers

None are listed in the package.

@artemist
Copy link
Member Author

@GrahamcOfBorg build python27Packages.html2text

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.

generally this done at the python-modules level, for examples:

  scikitlearn = let
    args = { inherit (pkgs) gfortran glibcLocales; };
  in
    if isPy3k then callPackage ../development/python-modules/scikitlearn args
    else callPackage ../development/python-modules/scikitlearn/0.20.nix args;

EDIT: just make a new expression, name it '2018.nix' and then do a calling convention like the one above

@artemist
Copy link
Member Author

That makes a lot more sense! I just updated it. The derivations didn't seem to have changed at all.

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.

nix-review passes on NixOS (1 broken on master)
diff LGTM

[3 built (1 failed), 58 copied (243.7 MiB), 86.0 MiB DL]
error: build of '/nix/store/452rb2a8rnnrhi5l02kljwaws2xmyqx0-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/72211
1 package failed to build:
python27Packages.weboob

4 package were build:
calibre python27Packages.geeknote python27Packages.html2text trytond

@jonringer
Copy link
Contributor

can you squash it into one commit, and name it

pythonPackages.html2text: freeze at 2018.1.9

@jonringer
Copy link
Contributor

the more proper solution would be to bump calibre to python3, but this will work for now

@artemist
Copy link
Member Author

I don't know if calibre is fully ready on the upstream side, unfortunately.

@jonringer
Copy link
Contributor

I just checked, it's not. But python is EOL in 8 weeks... so they don't have much time

I was unable tp build calibre at the current git master as it relies on
pytthon27Packages.html2text. Python 2.7 support was removed in the
latest version. This PR downgrades html2text when using an unsupported
Python version.

This PR does not fix building python37Packages.html2text
and python38Packages.html2text, which were broken at master due to what
seems to be a problem in buildPythonPackage.
@jonringer
Copy link
Contributor

@GrahamcOfBorg build pythonPackages.html2text python3Packages.html2text

@jonringer
Copy link
Contributor

looks like the python37 version is broken on master, ill fix in a different PR

@jonringer jonringer merged commit 8fc1bd6 into NixOS:master Oct 29, 2019
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

2 participants