Talk:Python: Difference between revisions
Turbotimon (talk | contribs) |
→Update the packaging section: new section |
||
| Line 41: | Line 41: | ||
Can we add a section about Full (e.g. python312Full) and non-Full (e.g. python312) versions? Whats the difference and in which situation use on or the other? | Can we add a section about Full (e.g. python312Full) and non-Full (e.g. python312) versions? Whats the difference and in which situation use on or the other? | ||
== Update the packaging section == | |||
Seems like the format was updated and the wiki is no longer accurate? Specifically the <code>setup.py</code> format | |||
Wiki says that the result of <code>main.py</code> will be in bin/app.py but the resulting filename isn't being renamed, so it should be main.py | |||
Setuptools now aren't included by default and need to be explicitly mentioned, and pyproject variable set to true, so the example nix file would look something like this: | |||
<syntaxhighlight lang="nix"> | |||
{ pkgs ? import <nixpkgs> { } }: | |||
pkgs.python3Packages.buildPythonApplication { | |||
pname = "myFlaskApp"; | |||
version = "0.1.0"; | |||
src = ./src; | |||
build-system = with pkgs.python3Packages; [ | |||
setuptools | |||
]; | |||
propagatedBuildInputs = with pkgs.python3Packages; [ | |||
flask | |||
]; | |||
pyproject = true; | |||
} | |||
</syntaxhighlight> [[User:Danbulant|Danbulant]] ([[User talk:Danbulant|talk]]) 10:07, 25 April 2026 (UTC) | |||