Skip to content

Commit bb5e647

Browse files
committed
Merge branch 'fix-package'
2 parents 918b489 + acc4f31 commit bb5e647

File tree

11 files changed

+28
-22
lines changed

11 files changed

+28
-22
lines changed

.github/workflows/build_containers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1616
GITHUB_USERNAME: ${{ github.actor }}
1717
GITHUB_REPOSITORY: ${{ github.repository }}
18-
run: nix develop --command build-image.sh
18+
run: ./tooling/bin/build-image.sh

flake.nix

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,22 @@
3737
myPython = pkgs.python312.override {
3838
self = myPython;
3939
packageOverrides = pyfinal: pyprev: {
40+
snapbin = pyfinal.buildPythonPackage {
41+
pname = pyproject.project.name;
42+
inherit (pyproject.project) version;
43+
pyproject = true;
44+
src = ./.;
45+
propagatedBuildInputs = [ pyfinal.hatchling ];
46+
47+
};
4048
# An editable package with a script that loads our mutable location
4149
snapbin-editable = pyfinal.mkPythonEditablePackage {
4250
# Inherit project metadata from pyproject.toml
4351
pname = pyproject.project.name;
4452
inherit (pyproject.project) version;
4553

4654
# The editable root passed as a string
47-
root = "$DEVENV_ROOT/snapbin"; # Use environment variable expansion at runtime
55+
root = "$DEVENV_ROOT/src"; # Use environment variable expansion at runtime
4856
};
4957
types-peewee =
5058
let
@@ -67,30 +75,27 @@
6775
};
6876

6977
pythonDev = myPython.withPackages (p: [
70-
p.black
7178
p.cryptography
7279
p.flask
7380
p.freezegun
7481
p.gunicorn
75-
p.isort
7682
p.mypy
7783
p.peewee
7884
p.pylint
7985
p.pylsp-mypy
8086
p.pytest
8187
p.pytest-cov
8288
p.pytest-xdist
83-
p.python-lsp-ruff
8489
p.python-lsp-server
85-
p.ruff
8690
p.snapbin-editable
8791
p.types-peewee
8892
]);
89-
pythonProd = pkgs.python312.withPackages (p: [
93+
pythonProd = myPython.withPackages (p: [
9094
p.cryptography
9195
p.flask
9296
p.gunicorn
9397
p.peewee
98+
p.snapbin
9499
]);
95100
in
96101
{
@@ -112,6 +117,7 @@
112117
];
113118
};
114119
packages = {
120+
inherit pkgs;
115121
snapbin-image = pkgs.dockerTools.buildImage {
116122
name = "snapbin";
117123
tag = "latest";
@@ -147,9 +153,16 @@
147153
PC_PORT_NUM = "9999";
148154
};
149155
packages = [
156+
157+
(pkgs.buildEnv {
158+
name = "sort-of-pastebin-devShell";
159+
paths = [
160+
pkgs.black
161+
pkgs.isort
162+
];
163+
pathsToLink = [ "/bin" ];
164+
})
150165
pythonDev
151-
pkgs.poetry
152-
pkgs.skopeo
153166
];
154167
inputsFrom = [
155168
config.process-compose."dev-services".services.outputs.devShell

pyproject.toml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ name = "snapbin"
77
version = "0.1.0"
88
requires-python = ">=3.12"
99
description = "A little service to store and encrypt information, deleting it once it's retrieved."
10-
authors = ["Andreas Zweili <andreas@zweili.ch>"]
11-
license = "GPL3.0+"
12-
readme = "README.org"
10+
authors = [
11+
{name = "Andreas Zweili", email = "andreas@zweili.ch"},
12+
]
13+
license = "GPL-3.0-or-later"
14+
readme = {file = "README.org", content-type = "text/plain"}
1315

1416
[tool.pylint."MESSAGES CONTROL"]
1517
disable = [
@@ -18,16 +20,6 @@ disable = [
1820
"missing-class-docstring",
1921
]
2022

21-
[tool.hatch.build.targets.sdit]
22-
include = [
23-
"snapbin",
24-
"README.md"
25-
]
26-
[tool.hatch.build.targets.wheel]
27-
packages = [
28-
"snapbin",
29-
]
30-
3123
[tool.isort]
3224
force_single_line = true
3325

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)