mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
pythonPackages.ecos: init at 2.0.7.post1
Embedded cone solver interface for optimization problems in Python. Dependency of qiskit-ignis.
This commit is contained in:
parent
a26f334e21
commit
3adda62dc3
50
pkgs/development/python-modules/ecos/default.nix
Normal file
50
pkgs/development/python-modules/ecos/default.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ lib
|
||||
, pythonOlder
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pkgs
|
||||
, numpy
|
||||
, scipy
|
||||
# check inputs
|
||||
, nose
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ecos";
|
||||
version = "2.0.7.post1";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "embotech";
|
||||
repo = "ecos-python";
|
||||
rev = version;
|
||||
sha256 = "1wzmamz2r4xr2zxgfwnm5q283185d1q6a7zn30vip18lxpys70z0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
echo '__version__ = "${version}"' >> ./src/ecos/version.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
scipy
|
||||
];
|
||||
|
||||
checkInputs = [ nose ];
|
||||
checkPhase = ''
|
||||
# Run tests
|
||||
cd ./src
|
||||
nosetests test_interface.py test_interface_bb.py
|
||||
'';
|
||||
pythonImportsCheck = [ "ecos" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python package for ECOS: Embedded Cone Solver";
|
||||
downloadPage = "https://github.com/embotech/ecos-python/releases";
|
||||
homepage = pkgs.ecos.meta.homepage;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ drewrisinger ];
|
||||
};
|
||||
}
|
@ -3435,6 +3435,8 @@ in {
|
||||
|
||||
ecdsa = callPackage ../development/python-modules/ecdsa { };
|
||||
|
||||
ecos = callPackage ../development/python-modules/ecos { };
|
||||
|
||||
effect = callPackage ../development/python-modules/effect {};
|
||||
|
||||
enum = callPackage ../development/python-modules/enum { };
|
||||
|
Loading…
Reference in New Issue
Block a user