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
python3Packages.geopy: 1.20 -> unstable-2019-11-10 #73158
Conversation
}; | ||
|
||
doCheck = false; # too much | ||
geopy37 = { | ||
version = "2.0.0"; |
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.
If they haven't released 2.0.0 you cannot call it that. Please mark it as unstable and add the date as version. See the manual
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.
Didn't know about the naming convention, sorry.
description = "Python Geocoding Toolbox"; | ||
license = licenses.mit; | ||
broken = true; | ||
buildInputs = commonBuildInputs ++ [ geographiclib ]; |
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.
buildInputs = commonBuildInputs ++ [ geographiclib ]; | |
buildInputs = commonBuildInputs; |
Anything in propagatedBuildInputs
doesn't need to be added to buildInputs
.
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.
Ok thanks
|
||
buildInputs = [ mock tox pylint ]; | ||
src = fetchFromGitHub { | ||
owner = "geopy"; |
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.
owner = "geopy"; | |
owner = pname; | |
repo = pname; |
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.
Done
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.
Please create two separate expressions, one called 2.nix
for Python 2 and default.nix
for Python 3.
What would be the best way to do that ? Do I setup most parameters in default.nix and then override in 2.nix, or do I put conditions in default.nix importing 2.nix ? |
Remove the common. Just consider them as if they were two separate packages. Then, in |
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.
Please test the package again after making the changes and report what testing you have done. (The examples in the README seem reasonable)
meta = with stdenv.lib; { | ||
homepage = "https://github.com/geopy/geopy"; | ||
description = "Python Geocoding Toolbox"; | ||
license = licenses.mit; |
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.
Would you like to be the maintainer for this 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.
If this is of any help, sure
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.
Yes, it would be great if somebody updated/changed this package that you could be a second reviewer, who is familiar with this package.
pname = "geopy"; | ||
version = "1.20.0"; | ||
disabled = !isPy27; | ||
pname = "geopy"; |
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.
pname = "geopy"; | |
pname = "geopy-unstable"; |
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.
Didn't understand the first time, thanks
version = "1.20.0"; | ||
disabled = !isPy27; | ||
pname = "geopy"; | ||
version = "2.0-unstable-2019-11-10"; |
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.
version = "2.0-unstable-2019-11-10"; | |
version = "2019-11-10"; |
sha256 = "9419bc90ee6231590c4ae7acf1cf126cefbd0736942da7a6a1436946e80830e2"; | ||
}; | ||
disabled = !isPy3k; # only Python 3 | ||
doCheck = false; # too many checks |
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.
doCheck = false; # too many checks | |
doCheck = false; # Needs network access |
I tried to run them because "too many checks" doesn't sound like a good excuse not to run them unless they take a considerable amount of time.
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.
Fair enough, this is just what the comment from the original derivation sounded like to me, my bad
|
||
doCheck = false; # too much | ||
buildInputs = [ mock tox pylint ]; |
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.
buildInputs = [ mock tox pylint ]; |
They're only needed for the tests and since we don't run them ...
Please also remove in the derivation arguments and the other 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.
Can't I just add them in checkInputs
in case doCheck
gets changed in the future ?
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.
Hmm, you could. But it would likely be out of date then.
It looks out of date even now: https://github.com/geopy/geopy/blob/master/setup.py
So I'd just remove it.
Also do you expect them to remove the dependency on network access? Looks like this package needs network access for everything 😆
Before every commit I have checked runing the following:
|
homepage = "https://github.com/geopy/geopy"; | ||
description = "Python Geocoding Toolbox"; | ||
license = licenses.mit; | ||
maintainers = [ "aceus02@gmail.com" ]; |
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.
maintainers = [ "aceus02@gmail.com" ]; | |
maintainers = with maintainers; [ GuillaumeDesforges ]; |
Thanks for volunteering :)
Please create an entry for yourself in https://github.com/NixOS/nixpkgs/blob/master/maintainers/maintainer-list.nix
|
||
doCheck = false; # too much | ||
buildInputs = [ mock tox pylint ]; |
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.
Hmm, you could. But it would likely be out of date then.
It looks out of date even now: https://github.com/geopy/geopy/blob/master/setup.py
So I'd just remove it.
Also do you expect them to remove the dependency on network access? Looks like this package needs network access for everything 😆
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.
Looks almost good :)
Please address the comments and change the indentation back to two spaces instead of 4. See the manual.
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.
do you mind squashing the commits? I would do two, one where you freeze the python2 version, and another where you bump the python3 version, otherwise looks okay...
I would prefer to have some unit tests, generally these don't require network access.
Thanks, this has been done.
Squashed into two as asked (nice git exercise) It seems that it would be hard to override pytest to run only the tests that do not require networking. |
* Update geopy to unstable version from GitHub for Python 3+ * Add GuillaumeDesforges as 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.
Thanks a lot Guillaume!
I took the liberty to adjust the commit title slightly (add the pythonXPackages.
) and remove two trailing spaces that I didn't spot in GitHub.
I tested it again in Python 2 and 3. Both work fine with the example that you gave. :)
@JohnAZoidberg thank you very much for your insightful reviews, hope I can be of help in the future |
Motivation for this change
geopy is not compatible with Python 3, see issue #73155.
Things done
There is now a switch depending on Python version:
If Python is 2.7, keep like before.
If Python is 3.7, fetch package from Github as the 2.0 version is not yet release.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
No maintainer found in package declaration.