mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
Merge pull request #121036 from eduardosm/sip-platform-tag
pythonPackages.sip_5: add `platform_tag` attribute
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ lib, fetchPypi, buildPythonPackage, packaging, toml }:
|
||||
{ lib, stdenv, fetchPypi, buildPythonPackage, packaging, toml }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sip";
|
||||
@@ -17,6 +17,20 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "sipbuild" ];
|
||||
|
||||
# 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";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Creates C++ bindings for Python modules";
|
||||
homepage = "http://www.riverbankcomputing.co.uk/";
|
||||
|
||||
Reference in New Issue
Block a user