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

Add pythonPackages.salmon and dependencies #32097

Merged
merged 2 commits into from Dec 6, 2017

Conversation

jluttine
Copy link
Member

@jluttine jluttine commented Nov 27, 2017

Motivation for this change

Add Python package salmon and its dependencies.

I wasn't able to run the tests for dnspython successfully. I got the following errors: rthalley/dnspython#289. If anyone has ideas how to fix those, I could try to fix. For now, I just skipped the tests (although not all tests failed).

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
    • 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/)
  • Fits CONTRIBUTING.md.


buildPythonPackage rec {
name = "${pname}-${version}";
pname = "dnspython";
Copy link
Member

Choose a reason for hiding this comment

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

this is a duplicate of the attribute dns

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice, good to know, thanks. But why is it named dns instead of dnspython which is the "official" name of the package? I think this should be fixed. Maybe offer both names with dnspython = dns?

Copy link
Member

Choose a reason for hiding this comment

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

History. It was simply called dns because it was in an expression containing only Python packages. So why duplicate the fact that it its a Python package?

We could introduce an alias and then with 18.09 remove the dns attribute.

Copy link

Choose a reason for hiding this comment

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

I recommend using always the name from pypi, i.e. dnspython, as this is unique. Provided namespaces are not unique.

Copy link
Member

Choose a reason for hiding this comment

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

@sebix that's also the current guideline in python-packages.nix

@@ -304,6 +308,8 @@ in {

rhpl = if !isPy3k then callPackage ../development/python-modules/rhpl {} else throw "rhpl not supported for interpreter ${python.executable}";

salmon = callPackage ../development/python-modules/salmon { };
Copy link
Member

Choose a reason for hiding this comment

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

This is an application and should therefore be called directly from all-packages.nix, and not via python-packages.nix.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm.. I think I disagree on this. Salmon is to email what Django is to websites. So, I think it should be a package instead of an application. In order to use Salmon, one must write Python modules to define configuration and handlers and apps. Salmon isn't an application that you just launch and it would work on its own. I think we should support both Python 2 and Python 3. I don't see any reason to make Salmon an app, is there some benefit in doing that?

Copy link
Member

Choose a reason for hiding this comment

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

Alright, makes sense!

@FRidh
Copy link
Member

FRidh commented Dec 5, 2017

@jluttine status?

@jluttine
Copy link
Member Author

jluttine commented Dec 5, 2017 via email

@jluttine
Copy link
Member Author

jluttine commented Dec 6, 2017

@FRidh Done. I just used dns, didn't change the name to dnspython because I couldn't figure out how to rename properly with deprecation warnings etc.

@FRidh FRidh merged commit 3674d7a into NixOS:master Dec 6, 2017
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