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

octoprint: 1.3.8 -> 1.3.9 #51610

Merged
merged 3 commits into from Dec 6, 2018
Merged

octoprint: 1.3.8 -> 1.3.9 #51610

merged 3 commits into from Dec 6, 2018

Conversation

peterhoeg
Copy link
Member

Motivation for this change

Apart from upgrading octoprint, perform a number of cleanups concerning dependencies and constraints.

Cc: @abbradar

Also add octoprint-mqtt.

I haven't actually tried all this out yet (tests pass though) as our printer just arrived y'day.

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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

At the same time, clean up how we handle dependencies (shamelessly stolen from
home-assistant) and override version constraints.
At the same time:

 - build plugins against python2 as that is what octoprint uses
 - do not run checks are there aren't any
 - use buildPythonPackage as these are not applications
@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.flask_login python3.pkgs.flask_login

@dotlambda
Copy link
Member

I think flask-login had running tests before. Tests will only be included in the PyPI tarball from the next version on: https://github.com/maxcountryman/flask-login/blob/master/MANIFEST.in#L2.
Therefore, I think it's okay to leave it like that and have the tests run again after the next upgrade. However, you could alternatively override src by providing a complete src = fetchFromGitHub { ... }.

@peterhoeg
Copy link
Member Author

Thanks for the mkOverride trick from HA @dotlambda - it's really nice pattern to follow for python applications

However, you could alternatively override src by providing a complete src = fetchFromGitHub

I'm very much in favour of simply ignoring the tests for one cycle as it will "fix itself" as you say.

@dotlambda
Copy link
Member

Regarding mkOverride, the only thing I'm worried about is the possible increase in evaluation time due to lib.composeExtensions. But noone seems to have complained yet :)

@dotlambda dotlambda merged commit b8c76cb into NixOS:master Dec 6, 2018
meta = with stdenv.lib; {
homepage = https://github.com/OctoPrint/OctoPrint-MQTT;
description = "Publish printer status MQTT";
platforms = platforms.all;
Copy link
Member

Choose a reason for hiding this comment

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

is already set

};
});
};

py = python2.override {
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([
Copy link
Member

Choose a reason for hiding this comment

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

I can understand the desire to reduce code duplication, however, this won't always work because we're not always using fetchPypi.

Copy link
Member

Choose a reason for hiding this comment

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

In case mkOverride can't be used, you can put a function overriding abitrary attributes in the list, e.g.

(self: super: {
  pkg = super.pkg.overridePythonAttrs (oldAttrs: {
    src = fetchFromGitHub { ... };
  });
})

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

4 participants