bodono / scs-python

Python interface for SCS
MIT License
41 stars 33 forks source link

Lazy import of numpy in setup.py #7

Closed cHYzZQo closed 6 years ago

cHYzZQo commented 6 years ago

Allows this package to bring it in as a dep instead of forcing it to be installed already.

cHYzZQo commented 6 years ago

Running locally I get the same test failures on master as travis shows on this branch. Are the failures a known issue? Or caused by the setup changes?

bodono commented 6 years ago

Thanks for working on this! It looks good, the test failures appear to be caused by the blas / lapack libraries not getting linked in correctly, which seems to suggest that the finalize_options method is not doing what it's meant to. I tried to fix it but I couldn't figure out how to get the extra options created there to be used. Locally, you can see this by running nosetests -s, which doesn't capture stdout, and you will see a lot of error messages like:

F----------------------------------------------------------------------------     
        SCS v2.0.3 - Splitting Conic Solver                                       
        (c) Brendan O'Donoghue, Stanford University, 2012-2017                    
----------------------------------------------------------------------------      
Lin-sys: sparse-direct, nnz in A = 9075                                           
eps = 1.00e-05, alpha = 1.50, max_iters = 100000, normalize = 1, scale = 1.00     
acceleration_lookback = -1, rho_x = 1.00e-03                                      
Variables n = 55, constraints m = 165                                             
Cones:  primal zero / dual free vars: 10                                          
        linear vars: 25                                                           
        soc vars: 16, soc blks: 4                                                 
        sd vars: 99, sd blks: 7                                                   
        primal + dual power vars: 15                                              
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries 
Install blas+lapack and re-compile SCS with blas+lapack libray locations          
ERROR: init_cone failure                                                          
Setup time: 2.97e-04s                                                             
Failure:could not initialize work                                                 
cHYzZQo commented 6 years ago

Hmm, that means that when i build master locally I'm also not linking in correctly. Does master work for you?

bodono commented 6 years ago

Master works for me, yes.

cHYzZQo commented 6 years ago

Got the tests to pass by moving the list settings down to the build_extension level.

bodono commented 6 years ago

Awesome, thanks!

cHYzZQo commented 6 years ago

Thanks for merging. Any idea when this will be available in pypi?

bodono commented 5 years ago

Up now.