-
-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python312Packages.{mss,pyvirtualdisplay}: modernize, enable tests on …
…linux (#351482)
- Loading branch information
Showing
4 changed files
with
134 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/src/mss/linux.py b/src/mss/linux.py | ||
index 6dac52b..c90bd93 100644 | ||
--- a/src/mss/linux.py | ||
+++ b/src/mss/linux.py | ||
@@ -185,9 +185,9 @@ class XWindowAttributes(Structure): | ||
|
||
|
||
_ERROR = {} | ||
-_X11 = find_library("X11") | ||
-_XFIXES = find_library("Xfixes") | ||
-_XRANDR = find_library("Xrandr") | ||
+_X11 = "@x11@" | ||
+_XFIXES = "@xfixes@" | ||
+_XRANDR = "@xrandr@" | ||
|
||
|
||
@CFUNCTYPE(c_int, POINTER(Display), POINTER(XErrorEvent)) |
44 changes: 39 additions & 5 deletions
44
pkgs/development/python-modules/pyvirtualdisplay/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
pkgs/development/python-modules/pyvirtualdisplay/paths.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/pyvirtualdisplay/abstractdisplay.py b/pyvirtualdisplay/abstractdisplay.py | ||
index dd93943..c694209 100644 | ||
--- a/pyvirtualdisplay/abstractdisplay.py | ||
+++ b/pyvirtualdisplay/abstractdisplay.py | ||
@@ -242,7 +242,7 @@ class AbstractDisplay(object): | ||
|
||
try: | ||
xdpyinfo = subprocess.Popen( | ||
- ["xdpyinfo"], | ||
+ ["@xdpyinfo@"], | ||
env=self._env(), | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
diff --git a/pyvirtualdisplay/xauth.py b/pyvirtualdisplay/xauth.py | ||
index ce0f804..7734e21 100644 | ||
--- a/pyvirtualdisplay/xauth.py | ||
+++ b/pyvirtualdisplay/xauth.py | ||
@@ -14,7 +14,7 @@ def is_installed(): | ||
""" | ||
try: | ||
xauth = subprocess.Popen( | ||
- ["xauth", "-V"], | ||
+ ["@xauth@", "-V"], | ||
# env=self._env(), | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, | ||
@@ -43,7 +43,7 @@ def call(*args): | ||
Call xauth with the given args. | ||
""" | ||
xauth = subprocess.Popen( | ||
- ["xauth"] + list(args), | ||
+ ["@xauth@"] + list(args), | ||
# env=self._env(), | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE, |