2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchPypi, buildPythonPackage, packaging, toml }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "sip";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "6.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
pname = "sip";
|
|
|
|
inherit version;
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "sha256-IE8CQNuJmadJ1jiph7NRhhhD5pI5uBHsPRiBQSw3BqY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
patches = [
|
|
|
|
# on non-x86 Linux platforms, sip incorrectly detects the manylinux version
|
|
|
|
# and PIP will refuse to install the resulting wheel.
|
|
|
|
# remove once upstream fixes this, hopefully in 6.5.2
|
|
|
|
./fix-manylinux-version.patch
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [ packaging toml ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# There aren't tests
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [ "sipbuild" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# FIXME: Why isn't this detected automatically?
|
|
|
|
# Needs to be specified in pyproject.toml, e.g.:
|
|
|
|
# [tool.sip.bindings.MODULE]
|
|
|
|
# tags = [PLATFORM_TAG]
|
|
|
|
platform_tag =
|
|
|
|
if stdenv.targetPlatform.isLinux then
|
|
|
|
"WS_X11"
|
|
|
|
else if stdenv.targetPlatform.isDarwin then
|
|
|
|
"WS_MACX"
|
|
|
|
else if stdenv.targetPlatform.isWindows then
|
|
|
|
"WS_WIN"
|
|
|
|
else
|
|
|
|
throw "unsupported platform";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Creates C++ bindings for Python modules";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://riverbankcomputing.com/";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl3Only;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|