python3Packages.subliminal: fix build, python3Packages.knowit: init at 0.5.11 (#437373)
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchzip,
|
||||
|
||||
# build-system
|
||||
poetry-core,
|
||||
|
||||
# dependencies
|
||||
babelfish,
|
||||
enzyme,
|
||||
pymediainfo,
|
||||
pyyaml,
|
||||
trakit,
|
||||
pint,
|
||||
|
||||
# nativeCheckInputs
|
||||
pytestCheckHook,
|
||||
ffmpeg,
|
||||
mediainfo,
|
||||
mkvtoolnix,
|
||||
requests,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "knowit";
|
||||
version = "0.5.11";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ratoaq2";
|
||||
repo = "knowit";
|
||||
tag = version;
|
||||
hash = "sha256-JqzCLdXEWZyvqXpeTJRW0zhY+wVcHLuBYrJbuSqfgkg=";
|
||||
};
|
||||
|
||||
matroska_test_zip = fetchzip {
|
||||
url = "http://downloads.sourceforge.net/project/matroska/test_files/matroska_test_w1_1.zip";
|
||||
hash = "sha256-X8gIfDj2iP043kjO3yqxuIgn8mZMX7XaqzhQ7CTLUhc=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
mkdir -p tests/data/videos
|
||||
cp ${matroska_test_zip}/*.mkv tests/data/videos/
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
babelfish
|
||||
enzyme
|
||||
pymediainfo
|
||||
pyyaml
|
||||
trakit
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
pint = [
|
||||
pint
|
||||
];
|
||||
};
|
||||
|
||||
pythonImportsCheck = [
|
||||
"knowit"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
ffmpeg
|
||||
mediainfo
|
||||
mkvtoolnix
|
||||
requests
|
||||
];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/ratoaq2/knowit/releases/tag/${src.tag}";
|
||||
description = "Extract metadata from media files";
|
||||
homepage = "https://github.com/ratoaq2/knowit";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ iynaix ];
|
||||
mainProgram = "knowit";
|
||||
};
|
||||
}
|
||||
@@ -4,23 +4,33 @@
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
|
||||
# build-system
|
||||
hatchling,
|
||||
hatch-vcs,
|
||||
|
||||
# dependencies
|
||||
babelfish,
|
||||
beautifulsoup4,
|
||||
chardet,
|
||||
click,
|
||||
click-option-group,
|
||||
defusedxml,
|
||||
dogpile-cache,
|
||||
enzyme,
|
||||
guessit,
|
||||
knowit,
|
||||
srt,
|
||||
pysubs2,
|
||||
rarfile,
|
||||
requests,
|
||||
platformdirs,
|
||||
setuptools,
|
||||
stevedore,
|
||||
tomli,
|
||||
tomlkit,
|
||||
|
||||
# nativeCheckInputs
|
||||
colorama,
|
||||
pypandoc,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
pytest-xdist,
|
||||
@@ -43,7 +53,10 @@ buildPythonPackage rec {
|
||||
hash = "sha256-eAXzD6diep28wCZjWLOZpOX1bnakEldhs2LX5CPu5OI=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
build-system = [
|
||||
hatchling
|
||||
hatch-vcs
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
babelfish
|
||||
@@ -51,9 +64,11 @@ buildPythonPackage rec {
|
||||
chardet
|
||||
click
|
||||
click-option-group
|
||||
defusedxml
|
||||
dogpile-cache
|
||||
enzyme
|
||||
guessit
|
||||
knowit
|
||||
srt
|
||||
pysubs2
|
||||
rarfile
|
||||
@@ -61,9 +76,12 @@ buildPythonPackage rec {
|
||||
platformdirs
|
||||
stevedore
|
||||
tomli
|
||||
tomlkit
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
colorama
|
||||
pypandoc
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
pytest-xdist
|
||||
@@ -76,6 +94,10 @@ buildPythonPackage rec {
|
||||
|
||||
disabledTests = [
|
||||
# Tests require network access
|
||||
"integration"
|
||||
"test_cli_cache"
|
||||
"test_cli_download"
|
||||
"test_is_supported_archive"
|
||||
"test_refine"
|
||||
"test_scan"
|
||||
"test_hash"
|
||||
|
||||
@@ -7856,6 +7856,8 @@ self: super: with self; {
|
||||
|
||||
knot-floer-homology = callPackage ../development/python-modules/knot-floer-homology { };
|
||||
|
||||
knowit = callPackage ../development/python-modules/knowit { };
|
||||
|
||||
knx-frontend = callPackage ../development/python-modules/knx-frontend { };
|
||||
|
||||
kokoro = callPackage ../development/python-modules/kokoro { };
|
||||
|
||||
Reference in New Issue
Block a user