forked from DGNum/gestioCOF
dev: update requirements and directly read the files
This commit is contained in:
parent
7968a70236
commit
157165a7c9
3 changed files with 20 additions and 12 deletions
|
@ -3,6 +3,6 @@ django-debug-toolbar
|
|||
ipython
|
||||
|
||||
# Tools
|
||||
black
|
||||
black==22.3.0
|
||||
flake8
|
||||
isort
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-r requirements.txt
|
||||
|
||||
# Postgresql bindings
|
||||
psycopg2<2.8
|
||||
psycopg2==2.9.*
|
||||
|
||||
# Redis
|
||||
django-redis-cache==3.0.*
|
||||
|
|
28
shell.nix
28
shell.nix
|
@ -1,6 +1,12 @@
|
|||
{ pkgs ? (import <nixpkgs>) { } }:
|
||||
{ pkgs ? (import <nixpkgs>) { }, lib ? pkgs.lib }:
|
||||
|
||||
let
|
||||
mkRequirements = file:
|
||||
builtins.concatStringsSep "\n"
|
||||
(builtins.filter
|
||||
(s: !(lib.hasPrefix "-r" s || lib.hasPrefix "#" s || s == ""))
|
||||
(lib.splitString "\n" (builtins.readFile file)));
|
||||
|
||||
pypiDataRev = "2505eb53d85cd727c87611ee4aa35152821a12b2";
|
||||
pypiDataSha256 = "0nhl0rzlp4fgzxb15pmnq14d0rzcwhvwn40vx7fnk41z9gwxcp4c";
|
||||
|
||||
|
@ -21,17 +27,19 @@ let
|
|||
python = "python39";
|
||||
};
|
||||
|
||||
requirements = builtins.readFile ./requirements.txt;
|
||||
requirements = mkRequirements ./requirements.txt;
|
||||
|
||||
requirements-dev = ''
|
||||
django-debug-toolbar
|
||||
ipython
|
||||
black==22.3.0
|
||||
isort
|
||||
flake8
|
||||
'';
|
||||
requirements-prod = mkRequirements ./requirements-prod.txt;
|
||||
|
||||
pyEnv = mach-nix.mkPython { requirements = requirements + requirements-dev; };
|
||||
requirements-dev = mkRequirements ./requirements-devel.txt;
|
||||
|
||||
pyEnv = mach-nix.mkPython {
|
||||
requirements = builtins.concatStringsSep "\n" [
|
||||
requirements
|
||||
requirements-dev
|
||||
requirements-prod
|
||||
];
|
||||
};
|
||||
in
|
||||
|
||||
pkgs.mkShell {
|
||||
|
|
Loading…
Reference in a new issue