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: Init at 2.3.0 #34647
pythonnet: Init at 2.3.0 #34647
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the expression to a folder in pkgs/development/python-modules
.
pkgs/top-level/python-packages.nix
Outdated
version = "2.3.0"; | ||
|
||
|
||
src = pkgs.fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchPypi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pkgs/top-level/python-packages.nix
Outdated
@@ -14941,6 +14941,72 @@ in { | |||
}; | |||
}; | |||
|
|||
pythonnet = buildPythonPackage rec { | |||
name = "pythonnet-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name
is generated automatically. pname
should be provided instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pkgs/top-level/python-packages.nix
Outdated
description = ".Net and Mono integration for Python"; | ||
homepage = https://pythonnet.github.io; | ||
license = licenses.mit; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding yourself as a maintainer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
# install packages using nuget | ||
- self._install_packages() | ||
+ #self._install_packages() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch is so simple that it is probably wiser to use sed
or substituteInPlace
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pkgs/top-level/python-packages.nix
Outdated
[ -z "$dontPlacatePaket" ] && placate-paket.sh | ||
''; | ||
|
||
UnmanagedExports127 = pkgs.fetchNuGet { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use let expression for these 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pkgs/top-level/python-packages.nix
Outdated
@@ -14941,6 +14941,72 @@ in { | |||
}; | |||
}; | |||
|
|||
pythonnet = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are moving Python expressions out of pkgs/top-level/python-packages.nix
into pkgs/development/python-modules/<module>/default.nix
.
Please move the expression there, and call it from pkgs/top-level/python-packages.nix
using callPackage ../development/python-modules/<package> { };
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
cc34fd8
to
508df0e
Compare
@FRidh & @dotlambda : thanks for the review. Changes as requested. |
I have no experience with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one more minor change. Indentation in Nixpkgs should be 2 spaces, not 4.
508df0e
to
53427a2
Compare
@FRidh : done. |
Please rebase on current master. |
53427a2
to
3eecc70
Compare
@dotlambda : Now rebased on latest. |
@GrahamcOfBorg build python2.pkgs.pythonnet python3.pkgs.pythonnet |
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
@@ -0,0 +1,85 @@ | |||
{ lib | |||
, stdenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, stdenv
isn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
clang | ||
|
||
NUnit360 | ||
UnmanagedExports127 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these two go into buildInputs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NUnit360 is for unit tests run after the build. clang and pycparser are used to generate some cs interop files at build time and UnmanagedExports127
is a dependency for one of the csharp projet. pythonnet
would have barked when used if any of those were missing (csharp should have been propagated binput while UnmanagedExports should have been put alongside its dependendant .net exe in the install location and there aren't any installed .net exe.
3eecc70
to
1d12093
Compare
@FRidh & @dotlambda : Thanks. |
@jraygauthier Thank you for contributing! |
Motivation for this change
Package for interop between CPython and mono / .NET. Was not available.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)All pytest are run in checkphase and pass using both python27 and python3.
And manually: