File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 77 branches : [ main ]
88
99jobs :
10- test :
10+ build- test :
1111 runs-on : ubuntu-latest
1212 steps :
1313 - name : Checkout repository
Original file line number Diff line number Diff line change @@ -17,6 +17,21 @@ When developping your package you can enter the dev shell using:
1717nix develop
1818```
1919
20+ The dev shell is shell that contains everything you defined inside of your [ flaxe.nix] ( ./flake.nix ) .
21+ ``` bash
22+ user@host:~ /Documents/basic_python$ python3 --version
23+ Python 3.10.12
24+ user@host:~ /Documents/basic_python$ nix develop
25+ warning: Git tree ' /home/user/Documents/basic_python' is dirty
26+ user@host:~ /Documents/basic_python$ python3 --version
27+ Python 3.11.12
28+ user@host:~ /Documents/basic_python$ exit
29+ exit
30+ user@host:~ /Documents/basic_python$ python3 --version
31+ Python 3.10.12
32+ ```
33+ Therefore you can use any python version you want and switch between versions easly
34+
2035### Building
2136To build your package you can use the nix command
2237``` nix
Original file line number Diff line number Diff line change 2121 pkgs = import nixpkgs { inherit system ; } ;
2222
2323 # Define the Python version and the application package.
24- python310 = pkgs . python310 ;
25- hatchling = python310 . pkgs . hatchling ;
26- pytest = python310 . pkgs . pytest ;
24+ python311 = pkgs . python311 ;
25+ hatchling = python311 . pkgs . hatchling ;
26+ pytest = python311 . pkgs . pytest ;
2727
2828
2929
3030 # Define the Python application package using hatchling for building.
3131 # This assumes you have a basic Python project structure with a pyproject.toml.
32- myApp = python310 . pkgs . buildPythonPackage {
32+ myApp = python311 . pkgs . buildPythonPackage {
3333 pname = "basic_python_app" ;
3434 version = "0.1.0" ;
3535 src = ./. ;
7575 # We use buildInputs to specify the dependencies needed in the development shell.
7676 # This includes the Python interpreter and hatchling for building the application.
7777 buildInputs = [
78- python310
78+ python311
7979 hatchling
8080 ] ;
8181 } ;
You can’t perform that action at this time.
0 commit comments