-
-
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
python3Packages.flet: init at 0.6.2 #229482
Conversation
, python3 | ||
}: | ||
|
||
with python3.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.
never ever use global with.
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.
Thank you, I have corrected this issue
nativeBuildInputs = with python3.pkgs; [ | ||
poetry-core | ||
]; | ||
|
||
propagatedBuildInputs = with python3.pkgs; [ | ||
typing-extensions | ||
repath | ||
]; |
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 can't use python3.pkgs
in the python package set. Instead, we need to pass all python packages via function arguments, otherwise you are pinning this to just one python version.
I'm fixing this up in #244135.
$ nom-build -A python311Packages.flet
error:
… while evaluating the attribute 'drvPath'
at /home/hexa/git/nixos/master/lib/customisation.nix:222:7:
221| in commonAttrs // {
222| drvPath = assert condition; drv.drvPath;
| ^
223| outPath = assert condition; drv.outPath;
… while evaluating the attribute 'drvPath'
at /home/hexa/git/nixos/master/lib/customisation.nix:222:7:
221| in commonAttrs // {
222| drvPath = assert condition; drv.drvPath;
| ^
223| outPath = assert condition; drv.outPath;
(stack trace truncated; use '--show-trace' to show the full trace)
error: Python version mismatch in 'python3.11-flet-0.7.4':
The Python derivation 'python3.11-flet-0.7.4' depends on a Python derivation
named 'python3.10-flet-core-0.7.4', but the two derivations use different versions
of Python:
'python3.11-flet-0.7.4' uses /nix/store/ng1c2jqy48p1x33j1qyg0n5anhfv31g0-python3-3.11.4
'python3.10-flet-core-0.7.4' uses /nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12
Possible solutions:
* If 'python3.10-flet-core-0.7.4' is a Python library, change the reference to 'python3.10-flet-core-0.7.4'
in the propagatedBuildInputs of 'python3.11-flet-0.7.4' to use a 'python3.10-flet-core-0.7.4' built from the same
version of Python
* If 'python3.10-flet-core-0.7.4' is used as a tool during the build, move the reference to
'python3.10-flet-core-0.7.4' in 'python3.11-flet-0.7.4' from propagatedBuildInputs to nativeBuildInputs
* If 'python3.10-flet-core-0.7.4' provides executables that are called at run time, pass its
bin path to makeWrapperArgs:
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ flet-core ] }" ];
at /home/hexa/git/nixos/master/pkgs/development/python-modules/flet/default.nix:8:3
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 also prevents people from using packageOverrides
.
@AndersonTorres In the future please request a review from someone who knows Python packaging before merging.
repath | ||
]; | ||
|
||
doCheck = false; |
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? Also, pythonImportsCheck
is missing.
packaging | ||
]; | ||
|
||
doCheck = false; |
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?
six | ||
]; | ||
|
||
pythonImportsCheck = [ |
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.
Also add nativeCheckInputs
.
typing-extensions = { version = "^4.4.0", python = "<3.8" } | ||
websocket-client = "^1.4.2" | ||
-watchdog = "^2.2.1" | ||
+watchdog = ">=2.2.1" |
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.
Use pythonRelaxDepsHook
instead.
Description of changes
python3Packages.flet: init at 0.6.2
python3Packages.flet-core: init at 0.6.2
python3Packages.repath: init at 0.9.0
Add the Flet Python module, a framework for easily building Flutter apps with Python. Also add flet-core as it is a dependency of flet, and add repath as it is a dependency of flet-core.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)