-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
python.pkgs: msgpack changes and neovim update #34809
Conversation
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 check the contributing guidelines
- Commit per logical change, so per expression/package
- We are moving expressions out of
python-packages.nix
This changed the package name (in the python ecosystem) from msgpack-python to msgpack,
so provide msgpack-transitional which provides the python package msgpack under its
deprecated name msgpack-python and change referrers to depend on that instead.
The PyPI name is changed, but the module name seems to be the same. No need to provide both then.
pkgs/top-level/python-packages.nix
Outdated
@@ -10552,12 +10552,29 @@ in { | |||
}; | |||
|
|||
msgpack = 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
name = "msgpack-${version}"; | ||
version = "0.5.4"; | ||
|
||
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
pkgs/top-level/python-packages.nix
Outdated
py.test | ||
''; | ||
|
||
buildInputs = with self; [ pytest ]; |
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.
checkInputs
pkgs/top-level/python-packages.nix
Outdated
propagatedBuildInputs = with self; [ ]; | ||
}; | ||
|
||
msgpack-transitional = 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
@@ -20422,12 +20439,12 @@ EOF | |||
trollius = callPackage ../development/python-modules/trollius {}; | |||
|
|||
neovim = 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.
Please remove name
from all expressions and only provide pname
and version
The module name has changed. If you compare the downloaded tarballs for msgpack and msgpack-transitional you will see that they differ in module name and in the If I only had one of them either the other packages now depending on msgpack-transitional failed or neovim-0.2.1 failed. |
Will do the other changes. |
So, actually, the module name has not changed, but the package name has. And that name is relevant for setuptools and pip, sigh. I suggest having a
|
That is fine by me. Why is that |
If you want to download also the tarball, one would have to write |
Made (hopefully) all the changes, please have a look, it it is ok. Didn't know whom to bother with maintainership. |
Please make one commit per package |
pkgs/top-level/python-packages.nix
Outdated
@@ -20422,12 +20414,12 @@ EOF | |||
trollius = callPackage ../development/python-modules/trollius {}; | |||
|
|||
neovim = 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.
Please move neovim out of python-packages.nix
pkgs/top-level/python-packages.nix
Outdated
@@ -20422,12 +20414,12 @@ EOF | |||
trollius = callPackage ../development/python-modules/trollius {}; | |||
|
|||
neovim = buildPythonPackage rec { | |||
version = "0.2.0"; | |||
version = "0.2.1"; | |||
name = "neovim-${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.
no name
pkgs/top-level/python-packages.nix
Outdated
@@ -20422,12 +20414,12 @@ EOF | |||
trollius = callPackage ../development/python-modules/trollius {}; | |||
|
|||
neovim = buildPythonPackage rec { | |||
version = "0.2.0"; | |||
version = "0.2.1"; | |||
name = "neovim-${version}"; | |||
|
|||
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
Sorry, totally forgot about neovim expression too. Just to be sure: Would the following structure be ok?
|
Yes, that seems fine. However, remeber to name your commits e.g. |
Actually, I think you should have the following commits:
|
bump neovim first would be a breaking commit, as it needs the bumped version of msgpack. |
Ah I see. Then do that at the end |
@typetetris your proposal is good. |
Sorry, now it is a bit of both, but hopefully the cleanest git history I could come up with. Will rework the neovim commit now and alter that in next few minutes. |
sha256 = "13ckbs2qc4dww7fddnm9cw116j4spgxqab49ijmj6jr178ypwl80"; | ||
}; | ||
|
||
propagatedBuildInputs = [ ]; |
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 it's empty, you can leave it out completely.
buildPythonPackage rec { | ||
pname = "msgpack"; | ||
version = "0.5.4"; | ||
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.
no name
homepage = https://github.com/msgpack/msgpack-python; | ||
description = "MessagePack serializer implementation for Python"; | ||
license = lib.licenses.asl20; | ||
# 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.
How about adding yourself as maintainer? Btw, the attribute should be called maintainers
.
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, I don't use it myself. Just wanted to update the version to get the neovim python client going again at version 0.2.1. Isn't that a bit weak motivation to declare myself maintainer and actually I am just trying nixos at the moment. I don't know how long I will be around at nixos.
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.
Well, if you're not sure, then better remove the line completely. But feel free to add yourself once you're convinced to stick with NixOS :)
At the very least, you're using it because you're using neovim. So a maintained package does benefit you (and others).
There is a comment in the neovim nix expression, that we can't do the checks as they need |
wait a moment, something odd happened ... |
So, done as far as I could. Open points:
|
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.
puh hopefully my pr is acceptable now :)
Almost :)
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "msgpack"; |
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.
2 space indentation
pkgs/top-level/python-packages.nix
Outdated
checkPhase = '' | ||
py.test | ||
msgpack-python = self.msgpack.overridePythonAttrs { | ||
pname = "msgpack-python"; |
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.
2 space indentation
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "neovim"; |
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.
2 space indentation
and refactored to reuse the nix expression of pythonPackages.msgpack
changed dependency msgpack-python to msgpack to make it build
corrected indentation |
Motivation for this change
provide pythonPackages.neovim at 0.2.1 so CheckHealth in nvim doesn't complain any more.
(And deoplete-clang2 works as expected with this.)
As pythonPackages.neovim at 0.2.1 needs msgpack >= 5.0.0, bump msgpack to 0.5.4
This changed the package name (in the python ecosystem) from msgpack-python to msgpack,
so provide msgpack-transitional which provides the python package msgpack under its
deprecated name msgpack-python and change referrers to depend on that instead.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)