upsies: init at 2025.04.21 (#407500)

This commit is contained in:
Bruno BELANYI
2025-06-14 17:52:24 +01:00
committed by GitHub
9 changed files with 469 additions and 0 deletions
+101
View File
@@ -0,0 +1,101 @@
{
lib,
fetchFromGitea,
fetchpatch,
ffmpeg-headless,
mediainfo,
oxipng,
python3Packages,
}:
let
# Taken from `docker/alpine/Dockerfile`
runtimeDeps = [
ffmpeg-headless
mediainfo
oxipng
];
in
python3Packages.buildPythonApplication rec {
pname = "upsies";
version = "2025.04.21";
pyproject = true;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "plotski";
repo = "upsies";
tag = "v${version}";
hash = "sha256-gjv0HOFV1VdfhVejGbV2+bMxP9BPfB3/3p6nOAYMS34=";
};
patches = [
(fetchpatch {
name = "use-pytest-timeout.patch";
url = "https://codeberg.org/plotski/upsies/commit/db6b564f8575c913a6fbabb61d5326a073c9b52c.patch";
hash = "sha256-UeUrZ6ogUSS0FvyNQwwwp8q+FArEK61o+Y2Uh7mrPtw=";
revert = true;
})
];
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
aiobtclientapi
async-lru
beautifulsoup4
countryguess
guessit
httpx
langcodes
natsort
packaging
prompt-toolkit
pydantic
pyimgbox
pyparsebluray
pyxdg
term-image
torf
unidecode
];
nativeCheckInputs =
with python3Packages;
[
pytest-asyncio
pytest-mock
pytest-timeout
pytest-httpserver
pytestCheckHook
trustme
]
++ runtimeDeps;
disabledTestPaths = [
# DNS resolution errors in the sandbox on some of the tests
"tests/utils_test/http_test/http_test.py"
"tests/utils_test/http_test/http_tls_test.py"
];
preCheck = ''
# `utils.is_running_in_development_environment` expects it in tests
export VIRTUAL_ENV=1
'';
makeWrapperArgs = [
"--suffix"
"PATH"
":"
(lib.makeBinPath runtimeDeps)
];
meta = with lib; {
description = "a toolkit for collecting, generating, normalizing and sharing video metadata";
homepage = "https://upsies.readthedocs.io/";
license = with licenses; [ gpl3Plus ];
mainProgram = "upsies";
maintainers = with maintainers; [ ambroisie ];
};
}
@@ -0,0 +1,62 @@
{
lib,
buildPythonPackage,
fetchFromGitea,
aiobtclientrpc,
async-timeout,
httpx,
torf,
pytest-asyncio,
pytest-mock,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "aiobtclientapi";
version = "1.1.3";
pyproject = true;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "plotski";
repo = "aiobtclientapi";
tag = "v${version}";
hash = "sha256-ZpUaMsJs1vdVGQOid7aJ+SJKaCbTtHfSw7cOwPTL0ss=";
};
pythonRelaxDeps = [
"async-timeout"
];
build-system = [
setuptools
];
dependencies = [
aiobtclientrpc
async-timeout
httpx
torf
];
nativeCheckInputs = [
pytest-asyncio
pytest-mock
pytestCheckHook
];
pythonImportsCheck = [ "aiobtclientapi" ];
disabledTestPaths = [
# AttributeError
"tests/clients_test/rtorrent_test/rtorrent_api_test.py"
];
meta = {
description = "Asynchronous high-level communication with BitTorrent clients";
homepage = "https://aiobtclientapi.readthedocs.io";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ ambroisie ];
};
}
@@ -0,0 +1,75 @@
{
lib,
buildPythonPackage,
fetchFromGitea,
async-timeout,
httpx,
httpx-socks,
proxy-py,
pytest-asyncio,
pytest-mock,
pytestCheckHook,
python-socks,
rencode,
setuptools,
}:
buildPythonPackage rec {
pname = "aiobtclientrpc";
version = "5.0.1";
pyproject = true;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "plotski";
repo = "aiobtclientrpc";
tag = "v${version}";
hash = "sha256-2nBrIMlYUI4PwirkiSJSkw5zw2Kc/KoVRyIIYYx4iYs=";
};
pythonRelaxDeps = [
"async-timeout"
];
build-system = [
setuptools
];
dependencies = [
async-timeout
httpx
httpx-socks
python-socks
rencode
] ++ python-socks.optional-dependencies.asyncio;
nativeCheckInputs = [
proxy-py
pytest-asyncio
pytest-mock
pytestCheckHook
];
disabledTests = [
# Missing lambda parameter
"test_add_event_handler_with_autoremove"
# Try to use `htpasswd` and `nginx` with hard-coded paths
"test_authentication_error[rtorrent_http]"
"test_api_as_context_manager[rtorrent_http]"
"test_add_and_remove_torrents[rtorrent_http-paused]"
"test_add_and_remove_torrents[rtorrent_http-started]"
"test_proxy[rtorrent_http-http_proxy]"
"test_timeout[rtorrent_http]"
"test_event_subscriptions_survive_reconnecting[rtorrent_http]"
"test_waiting_for_event[rtorrent_http]"
];
pythonImportsCheck = [ "aiobtclientrpc" ];
meta = {
description = "Asynchronous low-level communication with BitTorrent clients";
homepage = "https://aiobtclientrpc.readthedocs.io";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ ambroisie ];
};
}
@@ -0,0 +1,40 @@
{
lib,
buildPythonPackage,
fetchFromGitea,
pytest-mock,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "countryguess";
version = "0.4.5";
pyproject = true;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "plotski";
repo = "countryguess";
tag = "v${version}";
hash = "sha256-JzhkXHitleQ2UIxdem8PYR5QhKGmkyfHmxG6VDP7pB0=";
};
build-system = [
setuptools
];
nativeCheckInputs = [
pytest-mock
pytestCheckHook
];
pythonImportsCheck = [ "countryguess" ];
meta = {
description = "Fuzzy lookup of country information";
homepage = "https://codeberg.org/plotski/countryguess";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ ambroisie ];
};
}
@@ -0,0 +1,39 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hypothesis,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "flatbencode";
version = "0.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "acatton";
repo = "flatbencode";
tag = "v${version}";
hash = "sha256-1/4w41E8IKygJTBcQOexiDytV6BvVBwIjajKz2uCfu8=";
};
build-system = [
setuptools
];
nativeCheckInputs = [
hypothesis
pytestCheckHook
];
pythonImportsCheck = [ "flatbencode" ];
meta = {
description = "Fast, safe and non-recursive implementation of Bittorrent bencoding";
homepage = "https://github.com/acatton/flatbencode";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ambroisie ];
};
}
@@ -0,0 +1,51 @@
{
lib,
buildPythonPackage,
fetchFromGitea,
beautifulsoup4,
httpx,
pytest-asyncio,
pytest-httpserver,
pytest-mock,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "pyimgbox";
version = "1.0.7";
pyproject = true;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "plotski";
repo = "pyimgbox";
tag = "v${version}";
hash = "sha256-HYKi5nYXJ+5ytQEFVMMm1HxEsD1zMU7cE2mOdwuZxvk=";
};
build-system = [
setuptools
];
dependencies = [
httpx
beautifulsoup4
];
nativeCheckInputs = [
pytest-asyncio
pytest-httpserver
pytest-mock
pytestCheckHook
];
pythonImportsCheck = [ "pyimgbox" ];
meta = {
description = "API for uploading images to imgbox.com";
homepage = "https://codeberg.org/plotski/pyimgbox";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ ambroisie ];
};
}
@@ -0,0 +1,30 @@
{
buildPythonPackage,
lib,
fetchFromGitHub,
setuptools,
}:
buildPythonPackage rec {
pname = "pyparsebluray";
version = "0.1.4";
pyproject = true;
src = fetchFromGitHub {
owner = "Ichunjo";
repo = "pyparsebluray";
tag = version;
hash = "sha256-9G+pf4kZnj5ZkJj8qmymqdxCRVUTfGy3m9iF5BjiCxM=";
};
build-system = [
setuptools
];
meta = {
description = "Parse and extract binary data from bluray files";
homepage = "https://github.com/Ichunjo/pyparsebluray";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ambroisie ];
};
}
@@ -0,0 +1,57 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
flatbencode,
pytest-cov-stub,
pytest-httpserver,
pytest-mock,
pytest-xdist,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "torf";
version = "4.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "rndusr";
repo = "torf";
tag = "v${version}";
hash = "sha256-vJapB4Tbn3tLLUIH9LemU9kTqG7TsByiotkWM52lsno=";
};
build-system = [
setuptools
];
dependencies = [
flatbencode
];
nativeCheckInputs = [
pytest-cov-stub
pytest-httpserver
pytest-mock
pytest-xdist
pytestCheckHook
];
disabledTests = [
# Those tests fail DNS resolution in the sandbox
"test_getting_info__xs_fails__as_fails"
"test_getting_info__xs_returns_invalid_bytes"
"test_getting_info__as_returns_invalid_bytes"
];
pythonImportsCheck = [ "torf" ];
meta = with lib; {
description = "create, parse and edit torrent files and magnet links";
homepage = "https://github.com/rndusr/torf";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ambroisie ];
};
}
+14
View File
@@ -223,6 +223,10 @@ self: super: with self; {
aiobroadlink = callPackage ../development/python-modules/aiobroadlink { };
aiobtclientapi = callPackage ../development/python-modules/aiobtclientapi { };
aiobtclientrpc = callPackage ../development/python-modules/aiobtclientrpc { };
aiocache = callPackage ../development/python-modules/aiocache { };
aiocoap = callPackage ../development/python-modules/aiocoap { };
@@ -2932,6 +2936,8 @@ self: super: with self; {
cot = callPackage ../development/python-modules/cot { inherit (pkgs) qemu; };
countryguess = callPackage ../development/python-modules/countryguess { };
courlan = callPackage ../development/python-modules/courlan { };
coverage = callPackage ../development/python-modules/coverage { };
@@ -5213,6 +5219,8 @@ self: super: with self; {
flask-wtf = callPackage ../development/python-modules/flask-wtf { };
flatbencode = callPackage ../development/python-modules/flatbencode { };
flatbuffers = callPackage ../development/python-modules/flatbuffers { inherit (pkgs) flatbuffers; };
flatdict = callPackage ../development/python-modules/flatdict { };
@@ -12726,6 +12734,8 @@ self: super: with self; {
pyicumessageformat = callPackage ../development/python-modules/pyicumessageformat { };
pyimgbox = callPackage ../development/python-modules/pyimgbox { };
pyimpfuzzy = callPackage ../development/python-modules/pyimpfuzzy { inherit (pkgs) ssdeep; };
pyindego = callPackage ../development/python-modules/pyindego { };
@@ -13213,6 +13223,8 @@ self: super: with self; {
pypandoc = callPackage ../development/python-modules/pypandoc { };
pyparsebluray = callPackage ../development/python-modules/pyparsebluray { };
pyparser = callPackage ../development/python-modules/pyparser { };
pyparsing = callPackage ../development/python-modules/pyparsing { };
@@ -17815,6 +17827,8 @@ self: super: with self; {
torchvision-bin = callPackage ../development/python-modules/torchvision/bin.nix { };
torf = callPackage ../development/python-modules/torf { };
tornado = callPackage ../development/python-modules/tornado { };
torpy = callPackage ../development/python-modules/torpy { };