python310Packages.pprintpp: add patch to remove u from open()

- add changelog to meta
- add pythonImportsCheck
This commit is contained in:
Fabian Affolter 2023-01-22 10:11:23 +01:00
parent 6f878f0da7
commit 38c6e498de

View file

@ -1,29 +1,56 @@
{ lib, fetchpatch, buildPythonPackage, fetchPypi, python, nose, parameterized }: { lib
, buildPythonPackage
, fetchpatch
, fetchPypi
, nose
, parameterized
, python
, pythonOlder
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pprintpp"; pname = "pprintpp";
version = "0.4.0"; version = "0.4.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "00v4pkyiqc0y9qjnp3br58a4k5zwqdrjjxbcsv39vx67w84630pa"; hash = "sha256-6oJhCOLH9J3G1mx1KXPD/JdJFCp5jWslTh4wHP28ZAM=";
}; };
patches = [ patches = [
# Replace nose-parameterized with parameterized, https://github.com/wolever/pprintpp/pull/21
(fetchpatch { (fetchpatch {
url = "https://github.com/wolever/pprintpp/commit/873217674cc824b4c1cfdad4867c560c60e8d806.patch"; url = "https://github.com/wolever/pprintpp/commit/873217674cc824b4c1cfdad4867c560c60e8d806.patch";
sha256 = "0rqxzxawr83215s84mfzh1gnjwjm2xv399ywwcl4q7h395av5vb3"; hash = "sha256-Y+2yVUkDHkwo49ynNHYXVXJpX4DfVYJ0CWKgzFX/HWc=";
})
# Remove "U" move from open(), https://github.com/wolever/pprintpp/pull/31
(fetchpatch {
name = "remove-u.patch";
url = "https://github.com/wolever/pprintpp/commit/deec5e5efad562fc2f9084abfe249ed0c7dd65fa.patch";
hash = "sha256-I84pnY/KyCIPPI9q0uvj64t8oPeMkgVTPEBRANkZNa4=";
}) })
]; ];
nativeCheckInputs = [ nose parameterized ]; nativeCheckInputs = [
nose
parameterized
];
checkPhase = '' checkPhase = ''
${python.interpreter} test.py ${python.interpreter} test.py
''; '';
pythonImportsCheck = [
"pprintpp"
];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/wolever/pprintpp";
description = "A drop-in replacement for pprint that's actually pretty"; description = "A drop-in replacement for pprint that's actually pretty";
homepage = "https://github.com/wolever/pprintpp";
changelog = "https://github.com/wolever/pprintpp/blob/${version}/CHANGELOG.txt";
license = licenses.bsd2; license = licenses.bsd2;
maintainers = with maintainers; [ jakewaksbaum ]; maintainers = with maintainers; [ jakewaksbaum ];
}; };