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
(jira-cli) init at 2.2 #30833
(jira-cli) init at 2.2 #30833
Conversation
What is the reason for not using the packages in |
There's no reason per se. I just used Can you advise on how to use the python packages instead? My impression is of a lot of effort - is there gain to be had? |
Ping on this PR? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See @FRidh's comments.
@matthewbauer @FRidh I'll take a crack at the conversion. |
@matthewbauer @FRidh I spent some time with this but am now stymied by I see that argparse is nulled out intentionally in the pythonPackages expression, so I'm not sure how to proceed. |
@nyarly argparse is part of the standard library of Python since 2.7. There is no reason for packages to any longer depend on it. The solution here is to patch the (typically) |
Okay, this is working with the distro python packages now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments apply also to the other expressions.
And please read the contribution guidelines regarding Python packages.
pkgs/top-level/python-packages.nix
Outdated
@@ -5097,6 +5097,26 @@ in { | |||
}; | |||
}; | |||
|
|||
keyrings = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
pkgs/top-level/python-packages.nix
Outdated
@@ -5097,6 +5097,26 @@ in { | |||
}; | |||
}; | |||
|
|||
keyrings = { | |||
alt = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look good. It's supposed to be keyrings-alt
. Don't nest it just so you get a dot.
pkgs/top-level/python-packages.nix
Outdated
alt = buildPythonPackage rec { | ||
name = "keyrings.alt-${version}"; | ||
version = "2.3"; | ||
src = pkgs.fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchPypi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fetchurl from the mirror was in imitation of other expressions here. I'll happily change mine, but can I suggest that should be done across the python-packages modules?
pkgs/top-level/python-packages.nix
Outdated
propagatedBuildInputs = [ self.six ]; | ||
|
||
# | ||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the tests disabled? Please include a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In every case it was "I couldn't get the tests to run and pass." In no small part this is that Python isn't one of my working languages, and hunting down "how does this package run tests" is challenging.
pkgs/top-level/python-packages.nix
Outdated
# | ||
doCheck = false; | ||
|
||
meta = with pkgs.stdenv.lib; { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintainer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
homepage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea about the homepage. I assume pypi2nix would've added that if it were available from pypi.
As to maintainer: should I add myself?
@@ -0,0 +1,31 @@ | |||
{ pkgs, stdenv, pythonPackages }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't pass in pkgs
, only the exact packages you need.
inherit (pkgs) libffi openssl; | ||
inherit (pythonPackages) fetchPypi buildPythonPackage; | ||
in | ||
buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an application, use buildPythonApplication
.
substituteInPlace requirements/main.txt --replace "argparse" "" | ||
''; | ||
|
||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are the tests disabled? Please include a comment.
@FRidh Re: the python contribution guide, I assume you mean https://nixos.org/nixpkgs/manual/#python? I had, and was under the impression I was following those guidelines. There are certainly errors in this PR as is, which I'm working on. |
pkgs/top-level/python-packages.nix
Outdated
@@ -2993,6 +2993,23 @@ in { | |||
|
|||
}; | |||
|
|||
hiro = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha - I'd misunderstood as applying to the keyrings set until you'd realized that alt was only a child to get the .
. I'll take this on presently.
pkgs/top-level/python-packages.nix
Outdated
@@ -5097,6 +5114,29 @@ in { | |||
}; | |||
}; | |||
|
|||
keyrings-alt = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
pkgs/top-level/python-packages.nix
Outdated
@@ -5097,6 +5114,29 @@ in { | |||
}; | |||
}; | |||
|
|||
keyrings-alt = buildPythonPackage rec { | |||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed.
pkgs/top-level/python-packages.nix
Outdated
|
||
# Fails with "ImportError: cannot import name mock" | ||
doCheck = false; | ||
#checkInputs = with self; [ pytest unittest2 mock keyring ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be uncommented; they will be ignored when doCheck = false;
pkgs/top-level/python-packages.nix
Outdated
@@ -6880,6 +6920,34 @@ in { | |||
|
|||
jinja2_pluralize = callPackage ../development/python-modules/jinja2_pluralize { }; | |||
|
|||
jira = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
pkgs/top-level/python-packages.nix
Outdated
@@ -6880,6 +6920,34 @@ in { | |||
|
|||
jinja2_pluralize = callPackage ../development/python-modules/jinja2_pluralize { }; | |||
|
|||
jira = buildPythonPackage rec { | |||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed.
pkgs/top-level/python-packages.nix
Outdated
@@ -7742,6 +7810,25 @@ in { | |||
}; | |||
}; | |||
|
|||
requests-oauthlib = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
pkgs/top-level/python-packages.nix
Outdated
@@ -7742,6 +7810,25 @@ in { | |||
}; | |||
}; | |||
|
|||
requests-oauthlib = buildPythonPackage rec { | |||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
attribute is added by buildPython*
and should therefore be removed.
|
||
# Tests rely on VCR cassettes being written during tests. R/O nix store prevents this. | ||
doCheck = false; | ||
#checkInputs = with pythonPackages; [ vcrpy mock hiro ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uncomment
@FRidh is there existing documentation about the move into |
@FRidh How about now? |
@FRidh Merged master (with alternative version of the jira package) into this branch. How's it look now? |
Oh, I missed that. Please don't do any merges, but instead rebase. |
See also the contributing guidelines; one commit per logical change, which in that case would correspond to a commit per package. |
@FRidh I can't find contribution guidelines about git usage within nixpkgs. I have to admit to some frustration about the process around adding this expression. I'm willing to wrap up with a rebase, but I'd like to know that I'm done before I do that. |
@nyarly https://nixos.org/nixpkgs/manual/#idm140737315810544 I can understand the frustration, there are a lot of requirements and we're not always that quick with replying; there are just too many PR's and issues to handle by the community. In any case, the changes themselves look good. |
@FRidh I appreciate your empathy. And I also understand that the number of PRs and issues outstrips the amount of time and attention available to review them. Thanks for all you're doing, and specifically for giving feedback to bring this home. I've rebased and squashed this onto master. I hope it tells a clear narrative. |
Still needed is a commit per package. You can squash your commits, do a soft reset, and then create a commit for each. |
@FRidh This is what you're looking for? |
@FRidh Friendly reminder of this PR. |
Yep, thanks. In the future please also prepend the package set the packages are defined in. |
No description provided.