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

Add python-modules/re-wx 0.0.10 #206829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
54 changes: 54 additions & 0 deletions pkgs/development/python-modules/re-wx/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchPypi
, wxPython_4_2
, pytest
}:

buildPythonPackage rec {
pname = "re-wx";
version = "0.0.10";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
version = "0.0.10";
version = "0.0.10";
format = "setuptools";


src = fetchPypi {
inherit pname version;
sha256 = "750d28e1987cb58ea580bee3b63178f5a1ee483a32682f95455628fe7429117e";
Copy link
Member

Choose a reason for hiding this comment

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

Please update this to the new hash format, on the form hash = "sha256-xxx...";

};

buildInputs = [ wxPython_4_2 ];

doCheck = true;
checkInputs = [ pytest ];
checkPhase = ''
# py.test tests/test_components/test_gauge.py # ModuleNotFoundError: No module named 'pip._vendor.contextlib2'
# py.test tests/test_components/test_staticbitmap.py # ModuleNotFoundError: No module named 'pip._vendor.contextlib2'
# py.test tests/test_components/test_textctrl.py # SystemExit: Unable to access the X Display
py.test tests/test_create_element.py
# py.test tests/test_nested_components.py # SystemExit: Unable to access the X Display
# py.test tests/test_widgets.py # SystemExit: Unable to access the X Display
'';
Comment on lines +20 to +28
Copy link
Member

Choose a reason for hiding this comment

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

please use pytestCheckHook instead


pythonImportsCheck = [
"rewx"
"rewx.components"
"rewx.widgets"
];

meta = with lib; {
# for python v3.10.6, re-wx fails during linking with
#
# python3.10-wxPython-4.1.1/lib/python3.10/site-packages/wx/svg/_nanosvg.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
#
# https://github.com/wxWidgets/Phoenix/issues/2016
# https://github.com/cython/cython/issues/3876
#
# This is fixed in wxPython v4.2.0.
# https://github.com/wxWidgets/Phoenix/issues/2016
#
# So Python v3.10 requires wxPython v4.2.0
description = "Modern declarative desktop applications with a wxPython virtualdom";
homepage = "https://github.com/chriskiehl/re-wx";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9815,6 +9815,8 @@ self: super: with self; {

retworkx = callPackage ../development/python-modules/retworkx { };

re-wx = callPackage ../development/python-modules/re-wx { };

rfc3339 = callPackage ../development/python-modules/rfc3339 { };

rfc3339-validator = callPackage ../development/python-modules/rfc3339-validator { };
Expand Down