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

pythonPackages.sip: rename to sip_4, pythonPackages.sip_5: rename to sip #121588

Merged
merged 3 commits into from
May 16, 2021
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
2 changes: 1 addition & 1 deletion pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let
urllib3
pygments
pyqt5
sip
sip_4
Copy link
Member

Choose a reason for hiding this comment

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

What about setting this in all-packages.nix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean doing something like this?

package = callPackage ../path/to/package { sip = sip_4; };

I'm not sure how to do that because sip is part of pythonPackages

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that is the idea.

On the other hand, in pythonPackages the default sip is still the 4.x version. It needs to be investigated!

Well, ignore it for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On the other hand, in pythonPackages the default sip is still the 4.x version. It needs to be investigated!

With this PR the default version will be 5.x (and, in the future, it should be updated to 6.x).

owslib
six
];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/graphics/krita/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mkDerivation rec {
sha256 = "0rwghzci2wn2jmisvnzs23yxc2z3d4dcx2qbbhcvjyi3q8ij61nl";
};

nativeBuildInputs = [ cmake extra-cmake-modules python3Packages.sip makeWrapper ];
nativeBuildInputs = [ cmake extra-cmake-modules python3Packages.sip_4 makeWrapper ];

buildInputs = [
karchive kconfig kwidgetsaddons kcompletion kcoreaddons kguiaddons
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/calibre/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mkDerivation rec {
prePatch = ''
sed -i "s/\[tool.sip.project\]/[tool.sip.project]\nsip-include-dirs = [\"${escaped_pyqt5_dir}\/share\/sip\/PyQt5\"]/g" \
setup/build.py
sed -i "s/\[tool.sip.bindings.pictureflow\]/[tool.sip.bindings.pictureflow]\ntags = [\"${python3Packages.sip_5.platform_tag}\"]/g" \
sed -i "s/\[tool.sip.bindings.pictureflow\]/[tool.sip.bindings.pictureflow]\ntags = [\"${python3Packages.sip.platform_tag}\"]/g" \
setup/build.py

# Remove unneeded files and libs
Expand Down Expand Up @@ -95,7 +95,7 @@ mkDerivation rec {
pyqtwebengine
python
regex
sip_5
sip
zeroconf
# the following are distributed with calibre, but we use upstream instead
odfpy
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/cura/lulzbot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ let
};

libarcusLulzbot = callPackage ./libarcus.nix {
inherit (python3.pkgs) buildPythonPackage sip pythonOlder;
inherit (python3.pkgs) buildPythonPackage sip_4 pythonOlder;
};
libsavitarLulzbot = callPackage ./libsavitar.nix {
inherit (python3.pkgs) buildPythonPackage sip pythonOlder;
inherit (python3.pkgs) buildPythonPackage sip_4 pythonOlder;
};

inherit (python3.pkgs) buildPythonPackage pyqt5 numpy scipy shapely pythonOlder;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/cura/lulzbot/libarcus.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchgit, fetchurl, cmake, sip, protobuf, pythonOlder }:
{ lib, buildPythonPackage, fetchgit, fetchurl, cmake, sip_4, protobuf, pythonOlder }:

buildPythonPackage {
pname = "libarcus";
Expand All @@ -13,7 +13,7 @@ buildPythonPackage {

disabled = pythonOlder "3.4.0";

propagatedBuildInputs = [ sip ];
propagatedBuildInputs = [ sip_4 ];
nativeBuildInputs = [ cmake ];
buildInputs = [ protobuf ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/cura/lulzbot/libsavitar.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, pythonOlder, fetchgit, cmake, sip }:
{ lib, buildPythonPackage, pythonOlder, fetchgit, cmake, sip_4 }:

buildPythonPackage {
pname = "libsavitar-lulzbot";
Expand All @@ -19,7 +19,7 @@ buildPythonPackage {

nativeBuildInputs = [ cmake ];

propagatedBuildInputs = [ sip ];
propagatedBuildInputs = [ sip_4 ];

disabled = pythonOlder "3.4.0";

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/openlp/lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# python deps
, python, buildPythonPackage
, alembic, beautifulsoup4, chardet, lxml, Mako, pyenchant
, pyqt5_with_qtwebkit, pyxdg, sip, sqlalchemy, sqlalchemy_migrate
, pyqt5_with_qtwebkit, pyxdg, sip_4, sqlalchemy, sqlalchemy_migrate
}:

buildPythonPackage rec {
Expand Down Expand Up @@ -41,7 +41,7 @@ buildPythonPackage rec {
pyenchant
pyqt5_with_qtwebkit
pyxdg
sip
sip_4
sqlalchemy
sqlalchemy_migrate
];
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/networking/gns3/gui.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ in python.pkgs.buildPythonPackage rec {
propagatedBuildInputs = with python.pkgs; [
sentry-sdk psutil jsonschema # tox for check
# Runtime dependencies
sip (pyqt5.override { withWebSockets = true; }) distro setuptools
sip_4 (pyqt5.override { withWebSockets = true; }) distro setuptools
];

doCheck = false; # Failing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
propagatedBuildInputs = with python3Packages; [
pyqt5
lxml
sip
sip_4
];
preBuild = ''
make qt5py3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ lib, fetchFromGitHub, python3Packages, gettext, git, qt5 }:

let
inherit (python3Packages) buildPythonApplication pyqt5 sip pyinotify;
inherit (python3Packages) buildPythonApplication pyqt5 sip_4 pyinotify;

in buildPythonApplication rec {
pname = "git-cola";
Expand All @@ -15,7 +15,7 @@ in buildPythonApplication rec {
};

buildInputs = [ git gettext ];
propagatedBuildInputs = [ pyqt5 sip pyinotify ];
propagatedBuildInputs = [ pyqt5 sip_4 pyinotify ];
nativeBuildInputs = [ qt5.wrapQtAppsHook ];

doCheck = false;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/video/openshot-qt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mkDerivationWith python3Packages.buildPythonApplication rec {

buildInputs = [ gtk3 ];

propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip httplib2 pyzmq ];
propagatedBuildInputs = with python3Packages; [ libopenshot pyqt5_with_qtwebkit requests sip_4 httplib2 pyzmq ];

dontWrapGApps = true;
dontWrapQtApps = true;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/enaml/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
, ply
, kiwisolver
, qtpy
, sip
, sip_4
, cppy
, bytecode
}:
Expand Down Expand Up @@ -44,7 +44,7 @@ buildPythonPackage rec {
ply
kiwisolver
qtpy
sip
sip_4
cppy
bytecode
];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/libarcus/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib, buildPythonPackage, python, fetchFromGitHub
, cmake, sip, protobuf, pythonOlder }:
, cmake, sip_4, protobuf, pythonOlder }:

buildPythonPackage rec {
pname = "libarcus";
Expand All @@ -15,7 +15,7 @@ buildPythonPackage rec {

disabled = pythonOlder "3.4.0";

propagatedBuildInputs = [ sip ];
propagatedBuildInputs = [ sip_4 ];
nativeBuildInputs = [ cmake ];
buildInputs = [ protobuf ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/libsavitar/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, python, pythonOlder, fetchFromGitHub, cmake, sip }:
{ lib, buildPythonPackage, python, pythonOlder, fetchFromGitHub, cmake, sip_4 }:

buildPythonPackage rec {
pname = "libsavitar";
Expand All @@ -18,7 +18,7 @@ buildPythonPackage rec {

nativeBuildInputs = [ cmake ];

propagatedBuildInputs = [ sip ];
propagatedBuildInputs = [ sip_4 ];

disabled = pythonOlder "3.4.0";

Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/python-modules/poppler-qt5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, isPy3k
, fetchPypi
, pythonPackages
, sip_5
, sip
, qtbase
, qmake
, pyqt5
Expand Down Expand Up @@ -34,7 +34,7 @@ buildPythonPackage rec {
];

buildInputs = [ qtbase.dev poppler pyqt-builder ];
nativeBuildInputs = [ pkg-config qmake sip_5 ];
nativeBuildInputs = [ pkg-config qmake sip ];
propagatedBuildInputs = [ pyqt5.dev ];

format = "pyproject";
Expand All @@ -46,7 +46,7 @@ buildPythonPackage rec {

[tool.sip.bindings.Poppler-Qt5]
include-dirs = ["${poppler.dev}/include/poppler"]
tags = ["${sip_5.platform_tag}"]
tags = ["${sip.platform_tag}"]
EOF
'';

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pykdl/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, toPythonModule, fetchpatch, cmake, orocos-kdl, python, sip }:
{ lib, stdenv, toPythonModule, fetchpatch, cmake, orocos-kdl, python, sip_4 }:

toPythonModule (stdenv.mkDerivation {
pname = "pykdl";
Expand All @@ -18,7 +18,7 @@ toPythonModule (stdenv.mkDerivation {

nativeBuildInputs = [ cmake ];
buildInputs = [ orocos-kdl ];
propagatedBuildInputs = [ python sip ];
propagatedBuildInputs = [ python sip_4 ];

meta = with lib; {
description = "Kinematics and Dynamics Library (Python bindings)";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pynest2d/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib, buildPythonPackage, fetchFromGitHub, python3, cmake
, pythonOlder, libnest2d, sip, clipper }:
, pythonOlder, libnest2d, sip_4, clipper }:

buildPythonPackage rec {
version = "4.8.0";
Expand All @@ -13,7 +13,7 @@ buildPythonPackage rec {
sha256 = "18dn92vgr4gvf9scfh93yg9bwrhdjvq62di08rpi7pqjrrvq2nvp";
};

propagatedBuildInputs = [ libnest2d sip clipper ];
propagatedBuildInputs = [ libnest2d sip_4 clipper ];
nativeBuildInputs = [ cmake ];

CLIPPER_PATH = "${clipper.out}";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pyqt-builder/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, fetchPypi, buildPythonPackage, packaging, sip_5 }:
{ lib, fetchPypi, buildPythonPackage, packaging, sip }:

buildPythonPackage rec {
pname = "pyqt-builder";
Expand All @@ -10,7 +10,7 @@ buildPythonPackage rec {
sha256 = "0g51yak53zzjs4gpq65i01cmpz7w8cjny9wfyxlgr2vi0wag107v";
};

propagatedBuildInputs = [ packaging sip_5 ];
propagatedBuildInputs = [ packaging sip ];

pythonImportsCheck = [ "pyqtbuild" ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pyqt/4.x.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, buildPythonPackage, python, dbus-python, sip, qt4, pkg-config, lndir, dbus, makeWrapper }:
{ lib, stdenv, fetchurl, buildPythonPackage, python, dbus-python, sip_4, qt4, pkg-config, lndir, dbus, makeWrapper }:

buildPythonPackage rec {
pname = "PyQt-x11-gpl";
Expand Down Expand Up @@ -45,7 +45,7 @@ buildPythonPackage rec {
nativeBuildInputs = [ pkg-config lndir makeWrapper qt4 ];
buildInputs = [ qt4 dbus ];

propagatedBuildInputs = [ sip ];
propagatedBuildInputs = [ sip_4 ];

postInstall = ''
for i in $out/bin/*; do
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pyqt/5.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let
inherit (pythonPackages) buildPythonPackage python isPy3k dbus-python enum34;

sip = if isPy3k then
pythonPackages.sip_5
pythonPackages.sip
else
(pythonPackages.sip.override { sip-module = "PyQt5.sip"; }).overridePythonAttrs(oldAttrs: {
(pythonPackages.sip_4.override { sip-module = "PyQt5.sip"; }).overridePythonAttrs(oldAttrs: {
# If we install sip in another folder, then we need to create a __init__.py as well
# if we want to be able to import it with Python 2.
# Python 3 could rely on it being an implicit namespace package, however,
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/qscintilla-qt5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildPythonPackage {
src = qscintilla.src;
format = "other";

nativeBuildInputs = [ sip qtbase ];
nativeBuildInputs = [ sip_4 qtbase ];
buildInputs = [ qscintilla ];
propagatedBuildInputs = [ pyqt5 ];

Expand Down Expand Up @@ -40,7 +40,7 @@ buildPythonPackage {
--qsci-libdir=${qscintilla}/lib \
--pyqt-sipdir=${pyqt5}/share/sip/PyQt5 \
--qsci-sipdir=$out/share/sip/PyQt5 \
--sip-incdir=${sip}/include
--sip-incdir=${sip_4}/include
'';

meta = with lib; {
Expand Down
44 changes: 44 additions & 0 deletions pkgs/development/python-modules/sip/4.x.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ lib, fetchurl, buildPythonPackage, python, isPyPy, sip-module ? "sip" }:

buildPythonPackage rec {
pname = sip-module;
version = "4.19.25";
format = "other";

disabled = isPyPy;

src = fetchurl {
url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz";
sha256 = "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk";
};

configurePhase = ''
${python.executable} ./configure.py \
--sip-module ${sip-module} \
-d $out/${python.sitePackages} \
-b $out/bin -e $out/include
'';

enableParallelBuilding = true;

installCheckPhase = let
modules = [
sip-module
"sipconfig"
];
imports = lib.concatMapStrings (module: "import ${module};") modules;
in ''
echo "Checking whether modules can be imported..."
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ${python.interpreter} -c "${imports}"
'';

doCheck = true;

meta = with lib; {
description = "Creates C++ bindings for Python modules";
homepage = "http://www.riverbankcomputing.co.uk/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ lovek323 sander ];
platforms = platforms.all;
};
}
40 changes: 0 additions & 40 deletions pkgs/development/python-modules/sip/5.x.nix

This file was deleted.

Loading