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: remove unneeded name attributes, remove rec, make afew an application #33758
Conversation
@@ -1,10 +1,12 @@ | |||
{ stdenv, buildPythonPackage, fetchPypi, blessings, mock, nose, pyte, pytest, wcwidth }: | |||
|
|||
buildPythonPackage rec { | |||
let |
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 the separate let block?
to avoid having to use rec in the set below
|
sha256 = "121w7bd53xyibllxxbfykjj76n81kn1vgjqd22izyh67y8qyyk5r"; | ||
}; | ||
|
||
propagatedBuildInputs = with 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.
Setuptools_scm is a build time input
setuptools_scm pythonPackages.notmuch chardet | ||
] ++ stdenv.lib.optional (!pythonPackages.isPy3k) subprocess32; | ||
|
||
SETUPTOOLS_SCM_PRETEND_VERSION = "${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.
preBuild is this likely a better place for this one
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.
seems like this isn't required anymore at all, as we're fetching from pypi - and setuptools_scm is able to figure out the version on its own
|
||
postInstall = '' | ||
wrapProgram $out/bin/afew \ | ||
--prefix LD_LIBRARY_PATH : ${notmuch}/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.
Can this be fixed by hardcoring the path to the lib. Using LD_LIBRARY_PATH should be prevented
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 already hardcoded into pythonPackages.notmuch
. Will strip this.
--prefix LD_LIBRARY_PATH : ${notmuch}/lib | ||
''; | ||
|
||
meta = with 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.
License?
Why do you want to prevent the recursive set? |
@FRidh I was under the impression Thanks for reviewing the other things, seems like this slipped through in previous PRs. WIll update soonish. |
There is no need to avoid |
Also, remove name attribute. Build with python 3 by default.
we fetch from pypi, with version info properly set, so this shouldn't be an issue.
it seems afew calls "notmuch new" in MailMover.py
the library is already hardcoded pythonPackages.notmuch's globals.py
@FRidh Updated. |
@flokli can you squash the |
Included changes in #34077. |
Motivation for this change
As I found out, it's not necessary to specify the
name
for python packages if we setpname
andversion
. Additionally, get rid of therec
, and change theafew
package to be a python application (what it is, it's not a library).Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)