Merge pull request #198987 from SuperSandro2000/python310Packages.cairocffi
This commit is contained in:
commit
2afef94930
1 changed files with 32 additions and 29 deletions
|
@ -7,6 +7,7 @@
|
|||
, substituteAll
|
||||
, makeFontsConf
|
||||
, freefont_ttf
|
||||
, pikepdf
|
||||
, pytest
|
||||
, glibcLocales
|
||||
, cairo
|
||||
|
@ -21,42 +22,15 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "cairocffi";
|
||||
version = "1.3.0";
|
||||
version = "1.4.0";
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-EIo6fLCeIDvdhQHZuq2R14bSBFYb1x6TZOizSJfEe5E=";
|
||||
sha256 = "sha256-UJM5syzNjXsAwiBMMnNs3njbU6MuahYtMSR40lYmzZo=";
|
||||
};
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
||||
# checkPhase require at least one 'normal' font and one 'monospace',
|
||||
# otherwise glyph tests fails
|
||||
FONTCONFIG_FILE = makeFontsConf {
|
||||
fontDirectories = [ freefont_ttf ];
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ cairo cffi ] ++ lib.optional withXcffib xcffib;
|
||||
propagatedNativeBuildInputs = [ cffi ];
|
||||
|
||||
# pytestCheckHook does not work
|
||||
checkInputs = [ numpy pytest glibcLocales ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "pytest-runner" "" \
|
||||
--replace "pytest-cov" "" \
|
||||
--replace "pytest-flake8" "" \
|
||||
--replace "pytest-isort" "" \
|
||||
--replace "--flake8 --isort" ""
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
py.test $out/${python.sitePackages}
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# OSError: dlopen() failed to load a library: gdk-pixbuf-2.0 / gdk-pixbuf-2.0-0
|
||||
(substituteAll {
|
||||
|
@ -69,6 +43,35 @@ buildPythonPackage rec {
|
|||
./fix_test_scaled_font.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "pytest-runner" "" \
|
||||
--replace "pytest-cov" "" \
|
||||
--replace "pytest-flake8" "" \
|
||||
--replace "pytest-isort" "" \
|
||||
--replace "--flake8 --isort" ""
|
||||
'';
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
|
||||
# checkPhase require at least one 'normal' font and one 'monospace',
|
||||
# otherwise glyph tests fails
|
||||
FONTCONFIG_FILE = makeFontsConf {
|
||||
fontDirectories = [ freefont_ttf ];
|
||||
};
|
||||
|
||||
propagatedNativeBuildInputs = [ cffi ];
|
||||
|
||||
propagatedBuildInputs = [ cairo cffi ]
|
||||
++ lib.optional withXcffib xcffib;
|
||||
|
||||
# pytestCheckHook does not work
|
||||
checkInputs = [ numpy pikepdf pytest glibcLocales ];
|
||||
|
||||
checkPhase = ''
|
||||
py.test $out/${python.sitePackages}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/SimonSapin/cairocffi";
|
||||
license = licenses.bsd3;
|
||||
|
|
Loading…
Reference in a new issue