Skip to content

Commit f4ea24d

Browse files
committed
chore(pyproject): version bumping/relaxing
1 parent 4771736 commit f4ea24d

File tree

3 files changed

+68
-80
lines changed

3 files changed

+68
-80
lines changed

flake.nix

+5-8
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,18 @@
3030
{
3131
packages =
3232
let
33-
pythonPackages = pkgs.python312Packages;
33+
python3Packages = pkgs.python312Packages;
3434

35-
pillow-jxl-plugin = pythonPackages.callPackage ./nix/package/pillow-jxl-plugin.nix {
35+
pillow-jxl-plugin = python3Packages.callPackage ./nix/package/pillow-jxl-plugin.nix {
3636
inherit (pkgs) cmake;
3737
inherit pyexiv2;
38-
inherit (pkgs) rustPlatform;
3938
};
40-
pyexiv2 = pythonPackages.callPackage ./nix/package/pyexiv2.nix { inherit (pkgs) exiv2; };
41-
vtf2img = pythonPackages.callPackage ./nix/package/vtf2img.nix { };
39+
pyexiv2 = python3Packages.callPackage ./nix/package/pyexiv2.nix { inherit (pkgs) exiv2; };
40+
vtf2img = python3Packages.callPackage ./nix/package/vtf2img.nix { };
4241
in
4342
rec {
4443
default = tagstudio;
45-
tagstudio = pythonPackages.callPackage ./nix/package {
46-
inherit pillow-jxl-plugin vtf2img;
47-
};
44+
tagstudio = pkgs.callPackage ./nix/package { inherit pillow-jxl-plugin vtf2img; };
4845
tagstudio-jxl = tagstudio.override { withJXLSupport = true; };
4946

5047
inherit pillow-jxl-plugin pyexiv2 vtf2img;

nix/package/default.nix

+38-47
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,30 @@
11
{
2-
buildPythonApplication,
3-
chardet,
42
ffmpeg-headless,
5-
ffmpeg-python,
6-
hatchling,
7-
humanfriendly,
83
lib,
9-
mutagen,
10-
numpy,
11-
opencv-python,
12-
pillow,
13-
pillow-heif,
14-
pillow-jxl-plugin,
154
pipewire,
16-
pydub,
17-
pyside6,
18-
pytest-qt,
19-
pytest-xdist,
20-
pytestCheckHook,
21-
pythonRelaxDepsHook,
5+
python3Packages,
226
qt6,
23-
rawpy,
24-
send2trash,
25-
sqlalchemy,
267
stdenv,
27-
structlog,
28-
syrupy,
29-
ujson,
30-
vtf2img,
318
wrapGAppsHook,
329

10+
pillow-jxl-plugin,
11+
vtf2img,
12+
3313
withJXLSupport ? false,
3414
}:
3515

3616
let
3717
pyproject = (lib.importTOML ../../pyproject.toml).project;
3818
in
39-
buildPythonApplication {
19+
python3Packages.buildPythonApplication {
4020
pname = pyproject.name;
4121
inherit (pyproject) version;
4222
pyproject = true;
4323

4424
src = ../../.;
4525

4626
nativeBuildInputs = [
47-
pythonRelaxDepsHook
27+
python3Packages.pythonRelaxDepsHook
4828
qt6.wrapQtAppsHook
4929

5030
# INFO: Should be unnecessary once PR is pulled.
@@ -57,7 +37,7 @@ buildPythonApplication {
5737
qt6.qtmultimedia
5838
];
5939

60-
nativeCheckInputs = [
40+
nativeCheckInputs = with python3Packages; [
6141
pytest-qt
6242
pytest-xdist
6343
pytestCheckHook
@@ -78,28 +58,39 @@ buildPythonApplication {
7858
lib.makeLibraryPath [ pipewire ]
7959
}";
8060

81-
pythonRemoveDeps = true;
61+
pythonRemoveDeps = lib.optional (!withJXLSupport) [ "pillow_jxl" ];
62+
pythonRelaxDeps = [
63+
"numpy"
64+
"pillow"
65+
"pillow-heif"
66+
"pillow-jxl-plugin"
67+
"structlog"
68+
"typing-extensions"
69+
];
8270
pythonImportsCheck = [ "tagstudio" ];
8371

84-
build-system = [ hatchling ];
85-
dependencies = [
86-
chardet
87-
ffmpeg-python
88-
humanfriendly
89-
mutagen
90-
numpy
91-
opencv-python
92-
pillow
93-
pillow-heif
94-
pydub
95-
pyside6
96-
rawpy
97-
send2trash
98-
sqlalchemy
99-
structlog
100-
ujson
101-
vtf2img
102-
] ++ lib.optional withJXLSupport pillow-jxl-plugin;
72+
build-system = with python3Packages; [ hatchling ];
73+
dependencies =
74+
with python3Packages;
75+
[
76+
chardet
77+
ffmpeg-python
78+
humanfriendly
79+
mutagen
80+
numpy
81+
opencv-python
82+
pillow
83+
pillow-heif
84+
pydub
85+
pyside6
86+
rawpy
87+
send2trash
88+
sqlalchemy
89+
structlog
90+
ujson
91+
vtf2img
92+
]
93+
++ lib.optional withJXLSupport pillow-jxl-plugin;
10394

10495
# INFO: These tests require modifications to a library, which does not work
10596
# in a read-only environment.

pyproject.toml

+25-25
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,39 @@ version = "9.5.1"
99
license = "GPL-3.0-only"
1010
readme = "README.md"
1111
dependencies = [
12-
"chardet==5.2.0",
13-
"ffmpeg-python==0.2.0",
14-
"humanfriendly==10.0",
15-
"mutagen==1.47.0",
16-
"numpy==2.1.0",
17-
"opencv_python==4.10.0.84",
18-
"Pillow==10.3.0",
19-
"pillow-heif==0.16.0",
20-
"pillow-jxl-plugin==1.3.0",
21-
"pydub==0.25.1",
22-
"PySide6==6.8.0.1",
23-
"rawpy==0.22.0",
24-
"Send2Trash==1.8.3",
25-
"SQLAlchemy==2.0.34",
26-
"structlog==24.4.0",
27-
"typing_extensions>=3.10.0.0,<4.11.0",
28-
"ujson>=5.8.0,<5.9.0",
29-
"vtf2img==0.1.0",
12+
"chardet~=5.2",
13+
"ffmpeg-python~=0.2",
14+
"humanfriendly==10.*",
15+
"mutagen~=1.47",
16+
"numpy~=2.2",
17+
"opencv_python~=4.11",
18+
"Pillow~=11.1",
19+
"pillow-heif~=0.22",
20+
"pillow-jxl-plugin~=1.3",
21+
"pydub~=0.25",
22+
"PySide6~=6.8.0",
23+
"rawpy~=0.24",
24+
"Send2Trash~=1.8",
25+
"SQLAlchemy~=2.0",
26+
"structlog~=25.2",
27+
"typing_extensions~=4.12",
28+
"ujson~=5.10",
29+
"vtf2img~=0.1",
3030
]
3131

3232
[project.optional-dependencies]
3333
dev = ["tagstudio[mkdocs,mypy,pre-commit,pyinstaller,pytest,ruff]"]
3434
mkdocs = ["mkdocs-material[imaging]==9.*"]
35-
mypy = ["mypy==1.11.2", "mypy-extensions==1.*", "types-ujson>=5.8.0,<5.9.0"]
36-
pre-commit = ["pre-commit==3.7.0"]
37-
pyinstaller = ["Pyinstaller==6.6.0"]
35+
mypy = ["mypy==1.15.0", "mypy-extensions==1.*", "types-ujson~=5.10"]
36+
pre-commit = ["pre-commit~=4.1"]
37+
pyinstaller = ["Pyinstaller~=6.12"]
3838
pytest = [
39-
"pytest==8.2.0",
40-
"pytest-cov==5.0.0",
39+
"pytest==8.3.5",
40+
"pytest-cov==6.0.0",
4141
"pytest-qt==4.4.0",
42-
"syrupy==4.7.1",
42+
"syrupy==4.9.0",
4343
]
44-
ruff = ["ruff==0.8.1"]
44+
ruff = ["ruff==0.11.0"]
4545

4646
[project.gui-scripts]
4747
tagstudio = "tagstudio.main:main"

0 commit comments

Comments
 (0)