-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
pythonPackages.qutip: init at 4.5.2 #103412
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
Conversation
* Does not use OpenMP by default * May be overly conservative in disabling python versions older than 3.5 * Note that build time is a bit long, in part due to tests. It might be preferable to disable these in the future.
* Overridden `buildPhase` to build with openmp support * As this does not appear to work with the Pypi version, which lacks certain .cpp source files, `fetchPypi` has been replaced with `fetchGitHub`. * The correct tests have been added, but disabled, as they add a considerable amount of time after an already quite long build phase.
Result of 2 packages built:
|
Result of 2 packages failed to build:
|
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 follow CONTRIBUTING.md and manual#submitting-changes-making-patches and squash the fix-up commits.
git rebase -i
is a powerful command which achieves this, I created a small video demonstrating it's use here. A more indepth text tutorial can be found here
${python.interpreter} setup.py --with-openmp bdist_wheel | ||
''; | ||
|
||
doCheck = false; |
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 leave a comment saying why tests werent ran
buildPhase = '' | ||
${python.interpreter} setup.py --with-openmp bdist_wheel | ||
''; |
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.
buildPhase = '' | |
${python.interpreter} setup.py --with-openmp bdist_wheel | |
''; | |
setupPyGlobalFlags = "--with-openmp"; |
{ stdenv | ||
, python | ||
, buildPythonPackage | ||
, pythonOlder | ||
, fetchFromGitHub | ||
, setuptoolsBuildHook | ||
, gcc | ||
, hypothesis | ||
, numpy | ||
, scipy | ||
, matplotlib | ||
, cython | ||
, pytest | ||
}: |
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.
{ stdenv | |
, python | |
, buildPythonPackage | |
, pythonOlder | |
, fetchFromGitHub | |
, setuptoolsBuildHook | |
, gcc | |
, hypothesis | |
, numpy | |
, scipy | |
, matplotlib | |
, cython | |
, pytest | |
}: | |
{ stdenv | |
, python | |
, buildPythonPackage | |
, pythonOlder | |
, fetchFromGitHub | |
, setuptoolsBuildHook | |
, hypothesis | |
, numpy | |
, scipy | |
, matplotlib | |
, cython | |
, openmp | |
, sysctl | |
}: |
--replace "numpy>=1.12" "numpy" \ | ||
--replace "scipy>=1.0" "scipy" | ||
''; | ||
|
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.
nativeBuildInputs = [ setuptoolsBuildHook ]; | |
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ openmp ]; | |
|
||
nativeBuildInputs = [ numpy scipy cython pytest setuptoolsBuildHook ]; |
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.
nativeBuildInputs = [ numpy scipy cython pytest setuptoolsBuildHook ]; |
|
||
doCheck = false; |
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.
doCheck = false; | |
doCheck = false; |
Tests fail one darwin and linux.
|
||
doCheck = false; | ||
|
||
checkInputs = [ hypothesis ]; |
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.
checkInputs = [ hypothesis ]; | |
checkInputs = [ hypothesis sysctl ]; |
@@ -6116,6 +6116,8 @@ in { | |||
|
|||
queuelib = callPackage ../development/python-modules/queuelib { }; | |||
|
|||
qutip = callPackage ../development/python-modules/qutip { }; |
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.
qutip = callPackage ../development/python-modules/qutip { }; | |
qutip = callPackage ../development/python-modules/qutip { | |
inherit (pkgs.llvmPackages) openmp; | |
}; |
to allow tests:
|
@mcncm ping |
I marked this as stale due to inactivity. → More info |
Closing this, as a newer version of the package is provided by #144102 |
preferable to disable these in the future.
Motivation for this change
This is a fairly popular quantum simulation package that it would be nice to have easy access to.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in(N/A)./result/bin/
)nix-shell -p 'python$X.withPackages (ps: [ ps.qutip ])'
, forX
={36
,37
,38
}, and imported the module in a repl of the respective Python version.nix path-info -S
before and after)