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.dkimpy: init -> 0.6.1 #25021

Merged
merged 1 commit into from May 1, 2017
Merged

Conversation

leenaars
Copy link
Contributor

Motivation for this change

A useful set of tools and underlying library for working with DKIM and ARC (IETF standards for email authenticity).

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@leenaars, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FRidh to be a potential reviewer.

Copy link
Contributor

@bennofs bennofs left a comment

Choose a reason for hiding this comment

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

Thanks! I've added a few nitpicks, but looks fine otherwise.

makeWrapper "$out/libexec/dkimsign.py" $out/bin/dkimsign
makeWrapper "$out/libexec/arcverify.py" $out/bin/arcverify
makeWrapper "$out/libexec/arcsign.py" $out/bin/arcsign
makeWrapper "$out/libexec/dknewkey.py" $out/bin/dknewkey
Copy link
Contributor

Choose a reason for hiding this comment

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

The packages for other distributions don't seem to have this renaming stuff (neither the included .spec in upstream nor the one one ArchLinux AUR). I think it would be better to not derivate from upstream here unless absolutely necessary.

Copy link
Contributor Author

@leenaars leenaars Apr 19, 2017

Choose a reason for hiding this comment

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

The reason I did this, is that the man pages that are included do not have the .py in their invocation. So my thought was that invoking 'man dkimsign' would be more logical if the command and the man page naming scheme were synchronised. Obviously, I have no preference either way - but to a new user it might make more sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok thanks for the explanation, that makes sense, let's leave it this way then.

@@ -0,0 +1,44 @@
{ stdenv, pythonPackages, fetchurl, openssl, makeWrapper }:
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to depend on pytest explictly here instead of using pythonPackages. The callPackage from python-packages.nix does not explictly define pythonPackages, so this pythonPackages here might be a for a different python version than what buildPythonApplication expects.

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 don't really understand what you mean precisely. I included pythonPackages in line 3, using: "with pythonPackages;" - but that could be the wrong one, you think? Are you suggesting I should add pytest to line 1, or change pythonPackages in line 1 or line 3 to pkgs.pythonPackages?

Copy link
Contributor

Choose a reason for hiding this comment

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

Add pytest to line 1 and remove all usages of pythonPackages.

Copy link
Member

@Mic92 Mic92 Apr 19, 2017

Choose a reason for hiding this comment

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

@bennofs pytest is only accessible via a package set like pythonPackages for python applications living outside of pythonPackages. I would say the current approach chosen here is ok and does not deviate from other python applications.

Copy link
Member

Choose a reason for hiding this comment

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

in the case of packages called via python+packages.nix it should really not have pythonPackages as parameter

Copy link
Contributor

Choose a reason for hiding this comment

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

@Mic92 the package is not defined outside of pythonPackages though, it is callPackaged from python-packages.nix.

Copy link
Member

@FRidh FRidh Apr 19, 2017

Choose a reason for hiding this comment

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

callPackage from python-packages.nix to an expression outside /development/python-modules is wrong. If this is an application then it should be called straight from all-packages.nix (in which case we DO pass pythonPackages)

Copy link
Contributor Author

@leenaars leenaars Apr 19, 2017

Choose a reason for hiding this comment

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

@FRidh: my 'problem' was that the package is both: a Python dkim library by origin, but a set of very useful tools with man pages and all as well. I could move this to development/python-modules, so other Python applications can easily use it? While retaining the fact that it also installs some useful executables.

Copy link
Member

Choose a reason for hiding this comment

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

@leenaars yes, if it is both an application and library, move it to python-modules and add an top-level alias to all-packages.nix from pythonPackages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Mic92, @FRidh: I think this is what you both intended?

  • code in development/python-modules/dkimpy
  • callPackage in pythonPackages
  • alias in all-packages

@leenaars
Copy link
Contributor Author

Pulled buildInputs and propagatedBuildInputs together, otherwise await feedback.

@@ -0,0 +1,44 @@
{ stdenv, pythonPackages, fetchurl, openssl, makeWrapper }:
Copy link
Member

Choose a reason for hiding this comment

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

in the case of packages called via python+packages.nix it should really not have pythonPackages as parameter

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

Successfully merging this pull request may close these issues.

None yet

6 participants