Passage à Poetry et ajout de shell.nix
This commit is contained in:
parent
213ec87059
commit
e260671939
6 changed files with 1068 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use nix
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -16,3 +16,4 @@ fiches/templates/fiches/base_old.html
|
||||||
fiches/static/fiches/css_old/
|
fiches/static/fiches/css_old/
|
||||||
|
|
||||||
.vscode
|
.vscode
|
||||||
|
.direnv
|
||||||
|
|
1015
poetry.lock
generated
Normal file
1015
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
25
pyproject.toml
Normal file
25
pyproject.toml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
[tool.poetry]
|
||||||
|
name = "annuaire"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = ""
|
||||||
|
authors = ["Klub-Dev ENS <klub-dev@ens.fr>"]
|
||||||
|
readme = "README.md"
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.9"
|
||||||
|
Django = "^3.2.0"
|
||||||
|
Pillow = "^9.4.0"
|
||||||
|
authens = "^0.1b4"
|
||||||
|
python-ldap = "^3.4.3"
|
||||||
|
|
||||||
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
ipython = "^8.9.0"
|
||||||
|
isort = "^5.12.0"
|
||||||
|
flake8 = "^6.0.0"
|
||||||
|
black = "^22.12.0"
|
||||||
|
django-types = "^0.16.0"
|
||||||
|
django-debug-toolbar = "^3.8.1"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
2
setup.cfg
Normal file
2
setup.cfg
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[flake8]
|
||||||
|
max-line-length = 99
|
24
shell.nix
Normal file
24
shell.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs ? import <nixpkgs> { }, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
mkSetup = self: super: pkg: super.${pkg}.overridePythonAttrs (old: { buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ]; });
|
||||||
|
|
||||||
|
poetryEnv = pkgs.poetry2nix.mkPoetryEnv {
|
||||||
|
projectDir = ./.;
|
||||||
|
python = pkgs.python39;
|
||||||
|
preferWheels = true;
|
||||||
|
|
||||||
|
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: {
|
||||||
|
python-ldap = mkSetup self super "python-ldap";
|
||||||
|
|
||||||
|
authens = mkSetup self super "authens";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.poetry
|
||||||
|
poetryEnv
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue