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.rotate-backups: init at 6.0 #64989

Merged
merged 9 commits into from Jul 25, 2019

Conversation

eyJhb
Copy link
Member

@eyJhb eyJhb commented Jul 17, 2019

Motivation for this change

Wanting roate-backups, but keep in mind it has A LOT of dependencies which depend on each other.
I have done my best to keep it clean, and make as many tests as possible work.

I couldn't find a good way to put them into the python-packages.nix file, as the alphabetic order is.. Non existing. So I have grouped them together.

Things done
  • 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.

@lheckemann
Copy link
Member

@GrahamcOfBorg build python3Packages.rotate-backups

Since this is an application AFAIU, I'd suggest adding an alias at the top level.

@eyJhb
Copy link
Member Author

eyJhb commented Jul 17, 2019

@lheckemann I will look into it! Some of the dependencies like coloredlogs is also a application.. Will check which are and which aren't :)

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.

A lot of them nit picks.

Sorry for the spam :)

pkgs/development/python-modules/capturer/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/update-dotdee/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/verboselogs/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/naturalsort/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/coloredlogs/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/coloredlogs/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/capturer/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/capturer/default.nix Outdated Show resolved Hide resolved
@jonringer
Copy link
Contributor

for converting a python libray to an application, just create the library as a python-module, then in all-packages.nix you can do something to the effect of:

rotate-backups = with python3Packages; toPythonApplication rotate-backups;

@eyJhb
Copy link
Member Author

eyJhb commented Jul 18, 2019

@jonringer should incoperate everything you asked, and also @lheckemann should have added all which are applications. :)

@jonringer
Copy link
Contributor

jonringer commented Jul 18, 2019

for adhering to the CONTRIBUTING.md, I think people expect that 1 commit relates to all changes for a given package. Although the little "auto commit changes" feature is nice in github, it does make the commit history polluted with a bunch of small commits.

I think it's prefered to do all the changes i suggested to their related commit, or at the very least, squash all the tiny commits into one that makes sense. I'm sure someone else will have a stronger opinion on the matter.

@eyJhb
Copy link
Member Author

eyJhb commented Jul 18, 2019 via email

@risicle
Copy link
Contributor

risicle commented Jul 21, 2019

coloredlogs tests fail on py37 on macos 10.13. I'll take a look at getting them working...

@risicle
Copy link
Contributor

risicle commented Jul 21, 2019

I've opened a PR upstream (xolox/python-coloredlogs#74), so coloredlogs just needs:

  patches = lib.optional (stdenv.isDarwin && isPy3k) (fetchpatch {
    name = "darwin-py3-capture-fix.patch";
    url = "https://github.com/xolox/python-coloredlogs/pull/74.patch";
    sha256 = "0pk7k94iz0gdripw623vzdl4hd83vwhsfzshl8pbvh1n6swi0xx9";
  });

After that nox-review is happy on macos 10.13 & non-nixos linux x86_64.

@eyJhb
Copy link
Member Author

eyJhb commented Jul 23, 2019

Should be good to go now :)

@srhb
Copy link
Contributor

srhb commented Jul 24, 2019

@GrahamcOfBorg build pythonPackages.rotate-backups

@worldofpeace
Copy link
Contributor

Why are the python-modules being called in all-packages.nix?
That is something we should never be doing, unless it's to alias an application as @jonringer mentioned.

@eyJhb
Copy link
Member Author

eyJhb commented Jul 24, 2019

@worldofpeace the packages that is aliased in all-packages.nix are command line applications :)

EDIT: Note that it is not all modules that are in all-packages.nix

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

Comments apply to multiple things.

pkgs/development/python-modules/capturer/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/capturer/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/naturalsort/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@eyJhb
Copy link
Member Author

eyJhb commented Jul 24, 2019

@worldofpeace should be fixed now!

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.

some minor nitpicks, otherwise LGTM

nix-review passes on NixOS

pkgs/development/python-modules/coloredlogs/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/executor/default.nix Outdated Show resolved Hide resolved
@eyJhb
Copy link
Member Author

eyJhb commented Jul 24, 2019

Fixed, should be good to go now :)

@worldofpeace worldofpeace merged commit 3047bf3 into NixOS:master Jul 25, 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

6 participants