Skip to content

Commit

Permalink
[Backport release-24.11] python312Packages.pyqt6: 6.8.0.dev2410141303…
Browse files Browse the repository at this point in the history
… -> 6.8.0 (#365385)
  • Loading branch information
NickCao authored Dec 16, 2024
2 parents 0c9d514 + fa5ab19 commit 48d12d5
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 45 deletions.
41 changes: 20 additions & 21 deletions pkgs/development/python-modules/pyqt/6.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
lib,
stdenv,
buildPythonPackage,
fetchurl,
fetchPypi,
pkg-config,
dbus,
lndir,
setuptools,
dbus-python,
sip,
pyqt6-sip,
Expand All @@ -25,15 +24,15 @@

buildPythonPackage rec {
pname = "pyqt6";
version = "6.8.0.dev2410141303";
format = "pyproject";
version = "6.8.0";
pyproject = true;

disabled = pythonOlder "3.6";
disabled = pythonOlder "3.9";

# This is dangerous, how can we get web archive to archive the URL?
src = fetchurl {
url = "https://riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-${version}.tar.gz";
hash = "sha256-eHYqj22us07uFkErJD2d0y0wueZxtQTwTFW9cI7yoK4=";
src = fetchPypi {
pname = "PyQt6";
inherit version;
hash = "sha256-bYYo3kwqBQ8LdEYuTJy5f4Ob9v+rvKkXEXIv+ygVcNk=";
};

patches = [
Expand All @@ -45,6 +44,16 @@ buildPythonPackage rec {
./pyqt5-confirm-license.patch
];

build-system = [
sip
pyqt-builder
];

dependencies = [
pyqt6-sip
dbus-python
];

# be more verbose
# and normalize version
postPatch = ''
Expand All @@ -53,11 +62,8 @@ buildPythonPackage rec {
verbose = true
EOF
# pythonRelaxDeps doesn't work and the wanted versions are not released AFAIK
substituteInPlace pyproject.toml \
--replace-fail 'version = "${version}"' 'version = "${lib.versions.pad 3 version}"' \
--replace-fail "sip >=6.9, <7" "sip >=6.8.6, <7" \
--replace-fail 'PyQt-builder >=1.17, <2' "PyQt-builder >=1.16, <2"
--replace-fail 'version = "${version}"' 'version = "${lib.versions.pad 3 version}"'
'';

enableParallelBuilding = true;
Expand All @@ -83,7 +89,6 @@ buildPythonPackage rec {
[
pkg-config
lndir
sip
qtbase
qtsvg
qtdeclarative
Expand All @@ -104,7 +109,6 @@ buildPythonPackage rec {
qtbase
qtsvg
qtdeclarative
pyqt-builder
qtquick3d
qtquicktimeline
]
Expand All @@ -113,13 +117,8 @@ buildPythonPackage rec {
++ lib.optional withLocation qtlocation;

propagatedBuildInputs =
[
dbus-python
pyqt6-sip
setuptools
]
# ld: library not found for -lcups
++ lib.optionals (withPrintSupport && stdenv.hostPlatform.isDarwin) [ cups ];
lib.optionals (withPrintSupport && stdenv.hostPlatform.isDarwin) [ cups ];

passthru = {
inherit sip pyqt6-sip;
Expand Down
27 changes: 16 additions & 11 deletions pkgs/development/python-modules/pyqt6-charts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

buildPythonPackage rec {
pname = "pyqt6-charts";
version = "6.7.0";
format = "pyproject";
version = "6.8.0";
pyproject = true;

disabled = pythonOlder "3.6";
disabled = pythonOlder "3.9";

src = fetchPypi {
pname = "PyQt6_Charts";
inherit version;
hash = "sha256-xPfPNpko978DLk4z9xjTuP5m2hdtSVn+MHNalw2G81w=";
hash = "sha256-+GcFuHQOMEFmfOIRrqogW3UOtrr0yQj04/bcjHINEPE=";
};

# fix include path and increase verbosity
Expand All @@ -46,29 +46,34 @@ buildPythonPackage rec {

dontWrapQtApps = true;

build-system = [
sip
pyqt-builder
];

dependencies = [
pyqt6
];

nativeBuildInputs = with qt6Packages; [
qtcharts
sip
qmake
pyqt-builder
];

buildInputs = with qt6Packages; [ qtcharts ];

propagatedBuildInputs = [ pyqt6 ];

dontConfigure = true;

# has no tests
doCheck = false;

pythonImportsCheck = [ "PyQt6.QtCharts" ];

meta = with lib; {
meta = {
description = "Python bindings for Qt6 QtCharts";
homepage = "https://riverbankcomputing.com/";
license = licenses.gpl3Only;
license = lib.licenses.gpl3Only;
inherit (mesa.meta) platforms;
maintainers = with maintainers; [ dandellion ];
maintainers = with lib.maintainers; [ dandellion ];
};
}
31 changes: 20 additions & 11 deletions pkgs/development/python-modules/pyqt6-webengine/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@

buildPythonPackage rec {
pname = "pyqt6-webengine";
version = "6.7.0";
format = "pyproject";
version = "6.8.0";
pyproject = true;

disabled = pythonOlder "3.6";
disabled = pythonOlder "3.9";

src = fetchPypi {
pname = "PyQt6_WebEngine";
inherit version;
hash = "sha256-aO3HrbbZ4nX13pVogeecyg1x+tQ5q+qhDYI7/1rFUAE=";
hash = "sha256-ZARepiK2pBiCwrGPVa6XFLhmCs/walTpEOtygiwvP/I=";
};

patches = [
./qvariant.patch
];

# fix include path and increase verbosity
postPatch = ''
sed -i \
Expand Down Expand Up @@ -53,19 +57,24 @@ buildPythonPackage rec {

dontWrapQtApps = true;

build-system = [
sip
pyqt-builder
];

dependencies = [
pyqt6
];

nativeBuildInputs = with qt6Packages; [
pkg-config
lndir
sip
qtwebengine
qmake
pyqt-builder
];

buildInputs = with qt6Packages; [ qtwebengine ];

propagatedBuildInputs = [ pyqt6 ];

passthru = {
inherit sip;
};
Expand All @@ -80,12 +89,12 @@ buildPythonPackage rec {
"PyQt6.QtWebEngineWidgets"
];

meta = with lib; {
meta = {
description = "Python bindings for Qt6 WebEngine";
homepage = "https://riverbankcomputing.com/";
license = licenses.gpl3Only;
license = lib.licenses.gpl3Only;
inherit (mesa.meta) platforms;
maintainers = with maintainers; [
maintainers = with lib.maintainers; [
LunNova
nrdxp
];
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/python-modules/pyqt6-webengine/qvariant.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/sip/QtWebEngineCore/qwebengineframe.sip b/sip/QtWebEngineCore/qwebengineframe.sip
index d5420e6..5a29f29 100644
--- a/sip/QtWebEngineCore/qwebengineframe.sip
+++ b/sip/QtWebEngineCore/qwebengineframe.sip
@@ -26,6 +26,7 @@ class QWebEngineFrame /NoDefaultCtors/
{
%TypeHeaderCode
#include <qwebengineframe.h>
+#include <QVariant>
%End

public:
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/sip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

buildPythonPackage rec {
pname = "sip";
version = "6.9.0";
version = "6.9.1";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-CT/Q4V2Zri+Kg91/fbqj/yUMWCp3644IRc2aytsfCTQ=";
hash = "sha256-eQS+UZDXh5lSVjt4o68OWPon2VJa9/U/k+rHqDtDPns=";
};

build-system = [
Expand Down

0 comments on commit 48d12d5

Please sign in to comment.