Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python311Packages.radios: 0.3.0 -> 0.3.1 #295505

Merged
merged 7 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions pkgs/applications/video/streamlink/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
{ lib
, python3Packages
, fetchPypi
, substituteAll
, ffmpeg
}:

python3Packages.buildPythonApplication rec {
pname = "streamlink";
version = "6.7.0";
format = "pyproject";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-kjrDJ/QCccWxRLEQ0virAdm0TLxN5PmtO/Zs+4Nc1MM=";
};

patches = [
(substituteAll {
src = ./ffmpeg-path.patch;
ffmpeg = lib.getExe ffmpeg;
})
];

nativeBuildInputs = with python3Packages; [
setuptools
];

nativeCheckInputs = with python3Packages; [
pytestCheckHook
mock
Expand All @@ -23,7 +35,12 @@ python3Packages.buildPythonApplication rec {
pytest-trio
];

propagatedBuildInputs = (with python3Packages; [
disabledTests = [
# requires ffmpeg to be in PATH
"test_no_cache"
];

propagatedBuildInputs = with python3Packages; [
certifi
isodate
lxml
Expand All @@ -36,8 +53,6 @@ python3Packages.buildPythonApplication rec {
typing-extensions
urllib3
websocket-client
]) ++ [
ffmpeg
];

meta = with lib; {
Expand Down
13 changes: 13 additions & 0 deletions pkgs/applications/video/streamlink/ffmpeg-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/streamlink/stream/ffmpegmux.py b/src/streamlink/stream/ffmpegmux.py
index 258b314a..c493e010 100644
--- a/src/streamlink/stream/ffmpegmux.py
+++ b/src/streamlink/stream/ffmpegmux.py
@@ -80,7 +80,7 @@ class MuxedStream(Stream, Generic[TSubstreams]):


class FFMPEGMuxer(StreamIO):
- __commands__: ClassVar[List[str]] = ["ffmpeg"]
+ __commands__: ClassVar[List[str]] = ["@ffmpeg@"]

DEFAULT_OUTPUT_FORMAT = "matroska"
DEFAULT_VIDEO_CODEC = "copy"
41 changes: 29 additions & 12 deletions pkgs/development/python-modules/pycountry/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, fetchFromGitHub
, fetchpatch2
, poetry-core
, importlib-metadata
, pytestCheckHook
}:

Expand All @@ -11,29 +12,45 @@ buildPythonPackage rec {
version = "23.12.11";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-AFadgurvvGpJCjEb+oSpxXHP+d2/iwpPTntPhotK2SU=";
disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "pycountry";
repo = "pycountry";
rev = "refs/tags/${version}";
hash = "sha256-B6kphZZZgK0YuPSmkiQNbEqEfqOQb+WZGnO2UeEqQN4=";
};

propagatedBuildInputs = [
patches = [
(fetchpatch2 {
name = "fix-usage-of-importlib_metadata.patch";
url = "https://github.com/pycountry/pycountry/commit/824d2535833d061c04a1f1b6b964f42bb53bced2.patch";
excludes = [ "HISTORY.txt" "poetry.lock" "pyproject.toml" ];
hash = "sha256-U4fbZP++d6YfTJkVG3k2rBC8nOF9NflM6+ONlwBNu+g=";
})
];

postPatch = ''
sed -i "/addopts/d" pytest.ini
'';

nativeBuildInputs = [
poetry-core
];

nativeCheckInputs = [
importlib-metadata
pytestCheckHook
];

pythonImportsCheck = [
"pycountry"
];

meta = with lib; {
homepage = "https://github.com/flyingcircusio/pycountry";
meta = {
homepage = "https://github.com/pycountry/pycountry";
changelog = "https://github.com/pycountry/pycountry/blob/${src.rev}/HISTORY.txt";
description = "ISO country, subdivision, language, currency and script definitions and their translations";
license = licenses.lgpl2;
maintainers = with maintainers; [ ];
license = lib.licenses.lgpl21Plus;
maintainers = with lib.maintainers; [ dotlambda ];
};

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
buildPythonPackage rec {
pname = "pydantic-extra-types";
version = "2.6.0";
format = "pyproject";
pyproject = true;

src = fetchFromGitHub {
owner = "pydantic";
Expand Down Expand Up @@ -45,11 +45,8 @@ buildPythonPackage rec {
pytestCheckHook
] ++ passthru.optional-dependencies.all;

pytestFlagsArray = [
"-W" "ignore::DeprecationWarning"
];

meta = with lib; {
changelog = "https://github.com/pydantic/pydantic-extra-types/blob/${src.rev}/HISTORY.md";
description = "Extra Pydantic types";
homepage = "https://github.com/pydantic/pydantic-extra-types";
license = licenses.mit;
Expand Down
5 changes: 3 additions & 2 deletions pkgs/development/python-modules/radios/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

buildPythonPackage rec {
pname = "radios";
version = "0.3.0";
version = "0.3.1";
pyproject = true;

disabled = pythonOlder "3.11";
Expand All @@ -30,7 +30,7 @@ buildPythonPackage rec {
owner = "frenck";
repo = "python-radios";
rev = "v${version}";
hash = "sha256-bzo+SA8kqc2GcxSV0TiIJyPVG+JshdsMoXSUhZYSphU=";
hash = "sha256-c0zfpfEdZvjvKtwGcNLLgEkBihhtz/wouHuYRLCxtBY=";
};

postPatch = ''
Expand Down Expand Up @@ -71,6 +71,7 @@ buildPythonPackage rec {
__darwinAllowLocalNetworking = true;

meta = with lib; {
changelog = "https://github.com/frenck/python-radios/releases/tag/v${version}";
description = "Asynchronous Python client for the Radio Browser API";
homepage = "https://github.com/frenck/python-radios";
license = licenses.mit;
Expand Down
26 changes: 12 additions & 14 deletions pkgs/development/python-modules/woob/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
, buildPythonPackage
, fetchFromGitLab
, fetchpatch
, gnupg
, html2text
, libyaml
, lxml
, nose
, packaging
, pillow
, prettytable
, pycountry
, pytestCheckHook
, python-dateutil
, pythonOlder
, pyyaml
, requests
, rich
, termcolor
, setuptools
, testers
, unidecode
, woob
Expand All @@ -26,27 +24,25 @@
buildPythonPackage rec {
pname = "woob";
version = "3.6";
format = "pyproject";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchFromGitLab {
owner = "woob";
repo = pname;
repo = "woob";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why changing that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rev = version;
hash = "sha256-M9AjV954H1w64YGCVxDEGGSnoEbmocG3zwltob6IW04=";
};

nativeBuildInputs = [
packaging
setuptools
];

propagatedBuildInputs = [
babel
python-dateutil
gnupg
html2text
libyaml
lxml
packaging
pillow
Expand All @@ -55,17 +51,18 @@ buildPythonPackage rec {
pyyaml
requests
rich
termcolor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removing these dependencies?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we always miss things in the python-updates bulk update.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched the upstream code for the dependency and couldn't find it.

unidecode
];

nativeCheckInputs = [
nose
pytestCheckHook
];

checkPhase = ''
nosetests
'';
disabledTests = [
# require networking
"test_ciphers"
"test_verify"
];

pythonImportsCheck = [
"woob"
Expand All @@ -77,6 +74,7 @@ buildPythonPackage rec {
};

meta = with lib; {
changelog = "https://gitlab.com/woob/woob/-/blob/${src.rev}/ChangeLog";
description = "Collection of applications and APIs to interact with websites";
homepage = "https://woob.tech";
license = licenses.lgpl3Plus;
Expand Down
31 changes: 27 additions & 4 deletions pkgs/development/python-modules/xhtml2pdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,59 @@
, arabic-reshaper
, buildPythonPackage
, fetchFromGitHub
, fetchpatch2
, html5lib
, pillow
, pyhanko
, pyhanko-certvalidator
, pypdf
, pytestCheckHook
, python-bidi
, pythonOlder
, pythonRelaxDepsHook
, reportlab
, setuptools
, svglib
}:

buildPythonPackage rec {
pname = "xhtml2pdf";
version = "0.2.13";
version = "0.2.15";
pyproject = true;

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = pname;
repo = pname;
owner = "xhtml2pdf";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why changing that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because semantically they're not the same thing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repo = "xhtml2pdf";
rev = "refs/tags/v${version}";
hash = "sha256-K7gsTLYcXmKmEQzOXrJ2kvvLzKaDkZ/NRLRc0USii5M=";
hash = "sha256-JXxh/n1kUsy3O4P/6WTfa5p+mYy/t4ZBUhlHp+ypoQc=";
};

patches = [
# https://github.com/xhtml2pdf/xhtml2pdf/pull/754
(fetchpatch2 {
name = "reportlab-compat.patch";
url = "https://github.com/xhtml2pdf/xhtml2pdf/commit/1252510bd23b833b45b4d252aeac62c1eb51eeef.patch";
hash = "sha256-9Fkn086uh2biabmiChbBna8Q4lJV/604yX1ng9j5TGs=";
})
];

nativeBuildInputs = [
pythonRelaxDepsHook
setuptools
];

pythonRelaxDeps = [
"reportlab"
];

propagatedBuildInputs = [
arabic-reshaper
html5lib
pillow
pyhanko
pyhanko-certvalidator
pypdf
python-bidi
reportlab
Expand Down
Loading