Skip to content

Commit

Permalink
python312Packages.freetype-py: 2.1.0.post1 -> 2.3.0 (#372656)
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukium authored Jan 11, 2025
2 parents b607eca + 817fab2 commit 037cf30
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions pkgs/development/python-modules/freetype-py/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,41 @@
stdenv,
buildPythonPackage,
fetchPypi,
substituteAll,
replaceVars,
setuptools,
setuptools-scm,
freetype,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "freetype-py";
version = "2.1.0.post1";
format = "setuptools";
version = "2.3.0";
pyproject = true;

src = fetchPypi {
inherit pname version;
sha256 = "1k62fx53qrv9nb73mpqi2r11wzbx41qfv5qppvh6rylywnrknf3n";
hash = "sha256-+bZM4ycqXDWNzugkgAoy1wmX+4cqCWWlV63KIPznpdA=";
extension = "zip";
};

patches = [
(substituteAll {
src = ./library-paths.patch;
(replaceVars ./library-paths.patch {
freetype = "${freetype.out}/lib/libfreetype${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];

nativeBuildInputs = [ setuptools-scm ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail ', "certifi", "cmake"' ""
'';

build-system = [
setuptools
setuptools-scm
];

propagatedBuildInputs = [ freetype ];
dependencies = [ freetype ];

preCheck = ''
cd tests
Expand All @@ -38,10 +47,10 @@ buildPythonPackage rec {

pythonImportsCheck = [ "freetype" ];

meta = with lib; {
meta = {
homepage = "https://github.com/rougier/freetype-py";
description = "FreeType (high-level Python API)";
license = licenses.bsd3;
maintainers = with maintainers; [ goertzenator ];
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ goertzenator ];
};
}

0 comments on commit 037cf30

Please sign in to comment.