Update python derivation template#419
Merged
Mic92 merged 2 commits intonix-community:mainfrom Jul 8, 2024
Merged
Conversation
- setuptools builds don't actually require specifying wheel, which can be seen in the example¹ in the setuptools documentation. - migrate from - nativeBuildInputs to build-system - propagatedBuildInputs to dependencies - passthru.optional-dependencies to optional-dependencies - Expand pythonImportsCheck, so the item is on a new line. [1] https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
Member
Author
|
Friendly ping, two months in. |
|
@figsoda ^^ |
matthiasdotsh
added a commit
to matthiasdotsh/nixpkgs
that referenced
this pull request
May 22, 2024
13 tasks
Member
Author
|
Now with the lambda input style used by nixfmt: {
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
cryptography,
pycryptodome,
}:
buildPythonPackage rec {
pname = "joserfc";
version = "0.9.0";
pyproject = true;
src = fetchFromGitHub {
owner = "authlib";
repo = "joserfc";
rev = version;
hash = "sha256-+NFCveMPzE0hSs2Qe20/MDHApXVtU3cR/GPFKPqfVV4=";
};
build-system = [
setuptools
];
dependencies = [
cryptography
];
optional-dependencies = {
drafts = [
pycryptodome
];
};
pythonImportsCheck = [
"joserfc"
];
meta = with lib; {
description = "Implementations of JOSE RFCs in Python";
homepage = "https://github.com/authlib/joserfc";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
} |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
| ] | ||
| ["python3.pkgs.setuptools".into()] | ||
| } else { | ||
| ["setuptools".into(), "wheel".into()] |
Member
There was a problem hiding this comment.
Great to have that fixed. I spotted Nancy of those in reviews and didn't understand why it was there
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[1] https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
The primary motivation is to save me many review remarks. I don't generally write rust, so feel free to improve the code.
The new pyproject lingo for the inputs has been introduced on master and will be part of NixOS 24.05.
old
new