init repo
This commit is contained in:
commit
90b54a601e
8 changed files with 60 additions and 0 deletions
2
.envrc
Normal file
2
.envrc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
use nix
|
||||
#dotenv
|
||||
4
.flake8
Normal file
4
.flake8
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[flake8]
|
||||
min_python_version = 3.10.0
|
||||
extend-ignore = E501,E203
|
||||
ban-relative-imports = true
|
||||
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
__pycache__
|
||||
.env
|
||||
.venv
|
||||
.vscode
|
||||
.mypy_cache
|
||||
.direnv
|
||||
0
README.md
Normal file
0
README.md
Normal file
15
pyproject.toml
Normal file
15
pyproject.toml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[tool.poetry]
|
||||
name = "republisher"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["Abel Luck <abel@guardianproject.info>"]
|
||||
readme = "README.md"
|
||||
packages = [{include = "republisher", from = "src"}]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
33
shell.nix
Normal file
33
shell.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ system ? "x86_64-linux", pkgs ? import <nixpkgs> { inherit system; } }:
|
||||
|
||||
let
|
||||
packages = [
|
||||
pkgs.python311
|
||||
pkgs.poetry
|
||||
pkgs.zsh
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
|
||||
pkgs.stdenv.cc.cc
|
||||
# Add any missing library needed
|
||||
# You can use the nix-index package to locate them, e.g. nix-locate -w --top-level --at-root /lib/libudev.so.1
|
||||
];
|
||||
|
||||
# Put the venv on the repo, so direnv can access it
|
||||
POETRY_VIRTUALENVS_IN_PROJECT = "true";
|
||||
POETRY_VIRTUALENVS_PATH = "{project-dir}/.venv";
|
||||
|
||||
# Use python from path, so you can use a different version to the one bundled with poetry
|
||||
POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON = "true";
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = packages;
|
||||
shellHook = ''
|
||||
export SHELL=${pkgs.zsh}
|
||||
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
||||
export POETRY_VIRTUALENVS_IN_PROJECT="${POETRY_VIRTUALENVS_IN_PROJECT}"
|
||||
export POETRY_VIRTUALENVS_PATH="${POETRY_VIRTUALENVS_PATH}"
|
||||
export POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON="${POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON}"
|
||||
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
'';
|
||||
}
|
||||
0
src/republisher/__init__.py
Normal file
0
src/republisher/__init__.py
Normal file
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue