Skip to content

Commit

Permalink
chore: add gobject-introspection test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Oct 26, 2023
1 parent bbdf4e3 commit 9ed8f02
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ in
subdirectory = callTest ./subdirectory { };
plyvel = callTest ./plyvel { };
awsume = callTest ./awsume { };
gobject-introspection = callTest ./gobject-introspection { };
} // lib.optionalAttrs (!stdenv.isDarwin) {
# pyqt5 = (callTest ./pyqt5 { });
pyqt6 = callTest ./pyqt6 { };
Expand Down
10 changes: 10 additions & 0 deletions tests/gobject-introspection/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ pkgs, poetry2nix, python310 }:

poetry2nix.mkPoetryApplication {
python = python310;
projectDir = ./.;
pythonImportsCheck = [ "gobject_introspection_test" ];

buildInputs = [ pkgs.libnotify ];
nativeBuildInputs = [ pkgs.gobject-introspection ];
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import gi

gi.require_version('Notify', '0.7')

from gi.repository import Notify # noqa: E402, F401
57 changes: 57 additions & 0 deletions tests/gobject-introspection/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions tests/gobject-introspection/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tool.poetry]
name = "gobject-introspection-test"
version = "0.1.0"
description = ""
authors = ["You <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.10"
python-mpd2 = "^3.1.0"
PyGObject = "^3.46.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 9ed8f02

Please sign in to comment.