-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Cleanup pkgs/top-level/python-packages.nix #27379
Conversation
buildPythonPackage rec { | ||
name = "django-tagging-0.4.5"; | ||
|
||
src = 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.
do you also want to convert instances of fetchurl
to fetchPypi
or do you want to keep this out of scope of pull request?
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 think for now, to make it easy for me, just moving buildPythonPackges
out and use callPackage
first.
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 recommend making several changes at the same time. Most importantly is using
fetchPypi
when possible- have
pname
,version
andname
attributes so we can more easily update packages
@FRidh This 0d16766 is ok with
but failed on
Is it OK? |
pkgs/top-level/python-packages.nix
Outdated
homepage = https://github.com/Fantomas42/django-tagging; | ||
}; | ||
}; | ||
django_tagging = callPackage ../development/python-modules/django_tagging { }; | ||
|
||
django_tagging_0_3 = self.django_tagging.override (attrs: 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 should be probably changed to
django_tagging_0_3 = self.django_tagging.overrideDerivation (attrs: 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.
Good point, but it should be overrideAttrs
then since we want to override the call to stdenv.mkDerivation
and not to derivation
.
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 package can be also removed at some point, when graphite-web is upgraded:
https://github.com/graphite-project/graphite-web/blob/master/requirements.txt
e27febd
to
f7214a2
Compare
@wizzup: Please add proper commit messages, i.e. "package: what" |
@bjornfor Oh, I thought I will There are no change to the packages itself, just cleanup work. |
@wizzup: Ok. Just don't forget :-) |
@wizzup just don't pass in |
@FRidh I don't think I understand what you mean, could you point to code or show me some example? I have to go for now, will continue later (tomorrow maybe). |
@@ -0,0 +1,27 @@ | |||
{ | |||
stdenv, lib, pkgs, |
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.
@FRidh meant, instead of using pkgs
here, use libdiscid
here.
|
||
patchPhase = '' | ||
substituteInPlace discid/libdiscid.py \ | ||
--replace '_open_library(_LIB_NAME)' "_open_library('${pkgs.libdiscid}/lib/libdiscid.so.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.
then you would write:
substituteInPlace discid/libdiscid.py \
--replace '_open_library(_LIB_NAME)' "_open_library('${libdiscid}/lib/libdiscid.so.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.
It's funny, I remember I have try this and it failed so I have to put pkgs
back in.
Let my try again.
@@ -0,0 +1,34 @@ | |||
{ | |||
stdenv, lib, pkgs, buildPythonPackage, fetchFromGitHub, |
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.
pkgs is not used here
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 one I do really forget to remove.
786bc4e
to
4c4ee53
Compare
{ | ||
stdenv, buildPythonPackage, fetchPypi, | ||
pip, pandoc, glibcLocales, | ||
haskellPackages, texlive |
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.
@FRidh How can I not use haskellPacakges
and texlive
here (for line 27)? reference to this contex
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.
@wizzup for haskellPackages
and texlive
your approach is ok.
I would recommend to not add more python packages to this pull request. Otherwise it will be difficult to find reviewers and the risc of merge conflicts increases. |
Should I create new PR for another batch? Do I have to |
I use these script to test my code
tstpy.sh
|
I would propose the following approach: Leave the commits as they are, but keep them a more descriptive commit title like:
You can probably also automated this (https://davidwalsh.name/update-git-commit-messages) This is a tedious task, but unless we have to tools to automate moving out python expressions, |
move to separate expression
8209c79
to
ffd56ac
Compare
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
move to separate expression
ffd56ac
to
b39ae73
Compare
I changed the commit title (there was a newline between package name and remaining message) |
Cool! Sorry about newline in commit message. I never use For the next batch I will use proper commit message from start. |
Ah, I thought only one commit had been pushed. Closing again. |
Motivation for this change
This is the first batch of
python-packages.nix
cleanup as discuss here.Things done
nix-shell -p nox --run "nox-review wip"
Additional information
altair
andpygame_sdl2
failed to build on python 3.6 before this PR, I test against upstream/masterTry to run following command on your system, if there is no error please reply to me so I can fix them.