nixpkgs/pkgs/development/python-modules/textile/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

49 lines
940 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, html5lib
, pytestCheckHook
, pythonOlder
, regex
}:
buildPythonPackage rec {
pname = "textile";
version = "4.0.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = pname;
repo = "python-textile";
rev = version;
hash = "sha256-WwX7h07Bq8sNsViHwmfhrrqleXacmrIY4ZBBaP2kKnI=";
};
propagatedBuildInputs = [
html5lib
regex
];
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace pytest.ini \
--replace " --cov=textile --cov-report=html --cov-append --cov-report=term-missing" ""
'';
pythonImportsCheck = [
"textile"
];
meta = with lib; {
description = "MOdule for generating web text";
mainProgram = "pytextile";
homepage = "https://github.com/textile/python-textile";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}