python312Packages.ghostscript: init at 0.7 (#401502)
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitLab,
|
||||
pytestCheckHook,
|
||||
|
||||
setuptools,
|
||||
|
||||
ghostscript_headless,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ghostscript";
|
||||
version = "0.7";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "pdftools";
|
||||
repo = "python-ghostscript";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-yBJuAnLK/4YDU9PBsSWPQay4pDws3bP+3rCplysq41w=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
let
|
||||
extLib = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
in
|
||||
''
|
||||
substituteInPlace ghostscript/__init__.py \
|
||||
--replace-fail '__version__ = gs.__version__' '__version__ = "${version}"'
|
||||
|
||||
substituteInPlace ghostscript/_gsprint.py \
|
||||
--replace-fail 'cdll.LoadLibrary("libgs.so")' 'cdll.LoadLibrary("${lib.getLib ghostscript_headless}/lib/libgs${extLib}")'
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Some tests don't (fully) match anymore.
|
||||
# Not sure if ghostscript ever promised to keep producing the same outputs, bit-by-bit…
|
||||
"test_simple"
|
||||
"test_unicode_arguments"
|
||||
"test_run_string"
|
||||
"test_stdin"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "ghostscript" ];
|
||||
|
||||
meta = {
|
||||
description = "Interface to the Ghostscript C-API using ctypes.";
|
||||
homepage = "https://gitlab.com/pdftools/python-ghostscript";
|
||||
changelog = "https://gitlab.com/pdftools/python-ghostscript/-/blob/v${version}/CHANGES.txt";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ flokli ];
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
buildPythonPackage,
|
||||
fetchFromGitea,
|
||||
fetchpatch,
|
||||
@@ -10,7 +11,6 @@
|
||||
pillow,
|
||||
stdenv,
|
||||
exiftool,
|
||||
ghostscript,
|
||||
imagemagick,
|
||||
mupdf-headless,
|
||||
netpbm,
|
||||
@@ -67,7 +67,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
exiftool
|
||||
ghostscript
|
||||
pkgs.ghostscript
|
||||
imagemagick
|
||||
mupdf-headless
|
||||
netpbm
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
ghostscript,
|
||||
jupyterlab,
|
||||
nbexec,
|
||||
pandas,
|
||||
@@ -42,7 +42,7 @@ buildPythonPackage rec {
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
ghostscript
|
||||
pkgs.ghostscript
|
||||
jupyterlab
|
||||
nbexec
|
||||
pandas
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
flit-core,
|
||||
ghostscript,
|
||||
pillow,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
@@ -30,7 +30,7 @@ buildPythonPackage rec {
|
||||
nativeBuildInputs = [ flit-core ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
ghostscript
|
||||
pkgs.ghostscript
|
||||
pillow
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
pkgs,
|
||||
buildPythonPackage,
|
||||
cffi,
|
||||
cssselect2,
|
||||
@@ -6,10 +9,8 @@
|
||||
flit-core,
|
||||
fontconfig,
|
||||
fonttools,
|
||||
ghostscript,
|
||||
glib,
|
||||
harfbuzz,
|
||||
lib,
|
||||
pango,
|
||||
pillow,
|
||||
pydyf,
|
||||
@@ -18,7 +19,6 @@
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
replaceVars,
|
||||
stdenv,
|
||||
tinycss2,
|
||||
tinyhtml5,
|
||||
}:
|
||||
@@ -61,7 +61,7 @@ buildPythonPackage rec {
|
||||
] ++ fonttools.optional-dependencies.woff;
|
||||
|
||||
nativeCheckInputs = [
|
||||
ghostscript
|
||||
pkgs.ghostscript
|
||||
pytest-cov-stub
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
@@ -5551,6 +5551,8 @@ self: super: with self; {
|
||||
|
||||
ghome-foyer-api = callPackage ../development/python-modules/ghome-foyer-api { };
|
||||
|
||||
ghostscript = callPackage ../development/python-modules/ghostscript { };
|
||||
|
||||
ghp-import = callPackage ../development/python-modules/ghp-import { };
|
||||
|
||||
ghrepo-stats = callPackage ../development/python-modules/ghrepo-stats { };
|
||||
|
||||
Reference in New Issue
Block a user