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

pythonnet: 2.4.0 -> 2.5.2 #122943

Merged
merged 1 commit into from May 19, 2021

Conversation

jraygauthier
Copy link
Member

  • No longer broken.
  • Updated mono dependency to mono5.
  • Fix / improve packaging.
Motivation for this change

#122759 (review)

Noticed package was marked broken as that it was using really old mono.

Also as part of:

#122042

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)

  • Built on platform(s)

    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)

  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"

  • Tested execution of all binary files (usually in ./result/bin/)

  • Determined the impact on package closure size (by running nix path-info -S before and after)

  • Ensured that relevant documentation is up to date

  • Fits CONTRIBUTING.md.

  • Upstream package tests now passing.

  • Tested basic usage from ipython via nix-shell -I nixpkgs=. -p 'python3.withPackages (pp: with pp; [pythonnet ipython])'. Seems to work fine, can use dotnet types from python.

@r-rmcgibbo
Copy link

r-rmcgibbo commented May 14, 2021

Result of nixpkgs-review pr 122943 at 415f0de3 run on aarch64-linux 1

2 packages failed to build:
1 suggestion:
  • warning: unused-argument

    Unused argument: python.
    Near pkgs/development/python-modules/pythonnet/default.nix:5:3:

      |
    5 | , python
      |   ^
    

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.


Result of nixpkgs-review pr 122943 at 415f0de3 run on x86_64-linux 1

2 packages built successfully:
  • python38Packages.pythonnet
  • python39Packages.pythonnet
1 suggestion:
  • warning: unused-argument

    Unused argument: python.
    Near pkgs/development/python-modules/pythonnet/default.nix:5:3:

      |
    5 | , python
      |   ^
    

@jraygauthier
Copy link
Member Author

Fixed suggestions and added aarch64 to badPlatforms (with ref to known issue).

@jraygauthier
Copy link
Member Author

Applied @jonringer suggestions.

meta = with lib; {
description = ".Net and Mono integration for Python";
homepage = "https://pythonnet.github.io";
license = licenses.mit;
platforms = platforms.all;
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
platforms = platforms.all;

buildPythonPackage defaults to a smaller subset.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@risicle
Copy link
Contributor

risicle commented May 17, 2021

Build fails for me on macos 10.15

Executing pytestCheckPhase
============================= test session starts ==============================
platform darwin -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /private/tmp/nix-build-python3.8-pythonnet-2.5.2.drv-0/pythonnet-2.5.2, configfile: setup.cfg
collected 0 items / 1 error                                                    

==================================== ERRORS ====================================
________________________ ERROR collecting test session _________________________
/nix/store/kz0lkr3nvqbzq7idiil10cak77prxah6-python3-3.8.9/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
/nix/store/46w02m94mcz1sqxyhqvqz68fb9izlnb3-python3.8-pytest-6.2.3/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:170: in exec_module
    exec(co, module.__dict__)
src/tests/conftest.py:13: in <module>
    import clr
E   ImportError: System.DllNotFoundException: Could not load libpython3.8.dylib with flags RTLD_NOW | RTLD_GLOBAL: dlopen(libpython3.8.dylib, 10): image not found
E     at Python.Runtime.Platform.DarwinLoader.Load (System.String dllToLoad) [0x00043] in <31d5b9a19e1244f8b7560e40640bc1ec>:0 
E     at Python.Runtime.Runtime.Initialize (System.Boolean initSigs) [0x00520] in <31d5b9a19e1244f8b7560e40640bc1ec>:0 
E     at Python.Runtime.PythonEngine.Initialize (System.Collections.Generic.IEnumerable`1[T] args, System.Boolean setSysArgv, System.Boolean initSigs) [0x00014] in <31d5b9a19e1244f8b7560e40640bc1ec>:0 
E     at Python.Runtime.PythonEngine.Initialize (System.Boolean setSysArgv, System.Boolean initSigs) [0x00005] in <31d5b9a19e1244f8b7560e40640bc1ec>:0 
E     at Python.Runtime.PythonEngine.InitExt () [0x00000] in <31d5b9a19e1244f8b7560e40640bc1ec>:0
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 1.63s ===============================

 -  No longer broken.
 -  Updated mono dependency to mono5.
 -  Fix / improve packaging.
@jraygauthier
Copy link
Member Author

Applied @SuperSandro2000 's recommendations.

@jraygauthier
Copy link
Member Author

@risicle : I am sorry, I do not have any macos context to reproduce the issue you mention. Has this ever worked on darwin? Would you like to help me find what's wrong because it is a bit guess work here. Could it be adding python to nativeBuildInputs or buildInputs is required ?

@jonringer
Copy link
Contributor

darwin support will have to be added by someone with darwin. there may be other items which need to be patch

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

LGTM

Result of nixpkgs-review pr 122943 run on x86_64-linux 1

3 packages built:
  • python38Packages.pythonnet
  • python39Packages.pythonnet
  • tests.trivial

@jonringer jonringer merged commit 90e5205 into NixOS:master May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants