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

cvxopt: 1.1.7 -> 1.1.9, add optional extensions #38780

Merged
merged 1 commit into from Apr 14, 2018

Conversation

timokau
Copy link
Member

@timokau timokau commented Apr 11, 2018

Motivation for this change
  • update cvxopt to the latest version
  • add support for optional extensions: glpk, gsl, fftw
  • move out of python-packages
  • run tests

Maintainer: @edwtjo

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please add a little bit of white space, i.e. blank lines.

export CVXOPT_FFTW_INC_DIR=${fftw.dev}/include
'';
checkPhase = ''
python -m unittest discover -s tests
Copy link
Member

Choose a reason for hiding this comment

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

Replace python by ${python.interpreter}

buildInputs = [
openblasCompat
suitesparse
] ++ stdenv.lib.optionals withGlpk [
Copy link
Member

Choose a reason for hiding this comment

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

stdenv.lib can be replaced by lib everywhere

@@ -0,0 +1,71 @@
{ stdenv
Copy link
Member

Choose a reason for hiding this comment

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

Use lib here

@dotlambda
Copy link
Member

I don't see nothing moved out of pythonPackages.

@timokau
Copy link
Member Author

timokau commented Apr 12, 2018

I addressed your comments. I don't know what you mean with the last one: cvxopt was previously defined in python-packages.nix, now is in its own file in python-modules.

@dotlambda
Copy link
Member

The commit message needs to be amended here as well.

@GrahamcOfBorg build python2.pkgs.cvxopt python3.pkgs.cvxopt

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.cvxopt, python3.pkgs.cvxopt

Partial log (click to expand)

 3: -2.4676e+02 -2.4620e+02  4e+00  3e-01  5e-15
 4: -2.4543e+02 -2.4547e+02  1e+00  8e-02  6e-15
 5: -2.4515e+02 -2.4527e+02  5e-01  2e-02  9e-15
 6: -2.4510e+02 -2.4517e+02  1e-01  3e-03  1e-14
 7: -2.4512e+02 -2.4515e+02  3e-02  3e-04  3e-14
 8: -2.4514e+02 -2.4514e+02  6e-03  6e-05  4e-14
 9: -2.4514e+02 -2.4514e+02  1e-03  7e-06  8e-14
10: -2.4514e+02 -2.4514e+02  2e-04  1e-06  1e-13
11: -2.4514e+02 -2.4514e+02  1e-05  4e-16  3e-13
Optimal solution found.

@timokau
Copy link
Member Author

timokau commented Apr 12, 2018

Done.

glpk
] ++ lib.optionals withGsl [
gsl
];
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to leave buildInputs out completely because they are all mentioned in preConfigure.

Also adds support for the optional extensions glpk, gsl, fftw and
enables tests.
@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.cvxopt python3.pkgs.cvxopt

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.cvxopt, python3.pkgs.cvxopt

Partial log (click to expand)

 3: -2.4676e+02 -2.4620e+02  4e+00  3e-01  5e-15
 4: -2.4543e+02 -2.4547e+02  1e+00  8e-02  8e-15
 5: -2.4515e+02 -2.4527e+02  5e-01  2e-02  1e-14
 6: -2.4510e+02 -2.4517e+02  1e-01  3e-03  2e-14
 7: -2.4512e+02 -2.4515e+02  3e-02  3e-04  4e-14
 8: -2.4514e+02 -2.4514e+02  6e-03  6e-05  5e-14
 9: -2.4514e+02 -2.4514e+02  1e-03  7e-06  1e-13
10: -2.4514e+02 -2.4514e+02  2e-04  1e-06  2e-13
11: -2.4514e+02 -2.4514e+02  1e-05  4e-16  4e-13
Optimal solution found.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.cvxopt, python3.pkgs.cvxopt

Partial log (click to expand)

 3: -2.4676e+02 -2.4620e+02  4e+00  3e-01  5e-15
 4: -2.4543e+02 -2.4547e+02  1e+00  8e-02  6e-15
 5: -2.4515e+02 -2.4527e+02  5e-01  2e-02  9e-15
 6: -2.4510e+02 -2.4517e+02  1e-01  3e-03  1e-14
 7: -2.4512e+02 -2.4515e+02  3e-02  3e-04  3e-14
 8: -2.4514e+02 -2.4514e+02  6e-03  6e-05  4e-14
 9: -2.4514e+02 -2.4514e+02  1e-03  7e-06  8e-14
10: -2.4514e+02 -2.4514e+02  2e-04  1e-06  1e-13
11: -2.4514e+02 -2.4514e+02  1e-05  4e-16  3e-13
Optimal solution found.

@FRidh FRidh merged commit 5a3495f into NixOS:master Apr 14, 2018
@timokau timokau deleted the cvxopt-1.1.9 branch April 15, 2018 09:50
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

4 participants