mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
gurobi, python312Packages.gurobipy: 9.5.1 -> 11.0.1
This commit is contained in:
parent
817a592c92
commit
f8a72ab5b0
@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gurobi";
|
||||
version = "9.5.1";
|
||||
version = "11.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://packages.gurobi.com/${lib.versions.majorMinor version}/gurobi${version}_linux64.tar.gz";
|
||||
sha256 = "sha256-+oKFnTPwj7iuudpmsPvZFxjtVzxTT1capSNyyd64kdo=";
|
||||
hash = "sha256-oZ7Oz22e4k6cVF3TDFxp/pE+RuU+3p/CatTWj1ci5ZY=";
|
||||
};
|
||||
|
||||
sourceRoot = "gurobi${builtins.replaceStrings ["."] [""] version}/linux64";
|
||||
@ -52,6 +52,6 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ ];
|
||||
maintainers = with maintainers; [ wegank ];
|
||||
};
|
||||
}
|
||||
|
@ -11,14 +11,20 @@ let
|
||||
pyShortVersion = "cp" + builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
|
||||
platforms = rec {
|
||||
aarch64-darwin = "macosx_10_9_universal2";
|
||||
aarch64-linux = "manylinux2014_aarch64.manylinux_2_17_aarch64";
|
||||
x86_64-darwin = aarch64-darwin;
|
||||
x86_64-linux = "manylinux2014_x86_64.manylinux_2_17_x86_64";
|
||||
};
|
||||
platform = platforms.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
|
||||
hashes = rec {
|
||||
cp311-aarch64-darwin = "sha256-pMwq4TXvr0mrKxZppeW2MQE/KrplWWFGmjKRLKwbHCI=";
|
||||
cp311-aarch64-linux = "sha256-fxJSQUt+nk7JBGtkDi+qTl/js0hnWGZGyht4AqD9g60=";
|
||||
cp311-x86_64-darwin = cp311-aarch64-darwin;
|
||||
cp311-x86_64-linux = "sha256-q1nmuWmlDPeNWWw4bX3KECOChNQkwU+6hItYqWcyY4M=";
|
||||
cp312-aarch64-darwin = "sha256-5+1QxYOhjbs01S3gqhkQ9Bx/0/NhbXEi710BGpiC5kM=";
|
||||
cp312-aarch64-linux = "sha256-N7cFtibenj+SrZ7ZtevZtDUdW48DnLC4p5jB9vrWlb8=";
|
||||
cp312-x86_64-darwin = cp312-aarch64-darwin;
|
||||
cp312-x86_64-linux = "sha256-Aw5xxvCwdgfdT7HMrWT/jKWx3RDjs8IuB4in0ZGdqcw=";
|
||||
};
|
||||
hash =
|
||||
hashes."${pyShortVersion}-${stdenv.system}"
|
@ -1,29 +0,0 @@
|
||||
{ lib, buildPythonPackage, python, gurobi }:
|
||||
|
||||
buildPythonPackage {
|
||||
pname = "gurobipy";
|
||||
version = "9.1.2";
|
||||
|
||||
src = gurobi.src;
|
||||
|
||||
setSourceRoot = "sourceRoot=$(echo gurobi*/*64)";
|
||||
|
||||
patches = [ ./no-clever-setup.patch ];
|
||||
|
||||
postInstall = ''
|
||||
mv lib/libgurobi*.so* $out/lib
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
patchelf --set-rpath $out/lib \
|
||||
$out/${python.sitePackages}/gurobipy/gurobipy.so
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The Gurobi Python interface";
|
||||
homepage = "https://www.gurobi.com";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
diff -Naur a/setup.py b/setup.py
|
||||
--- a/setup.py 2021-04-24 12:53:18.300255006 -0500
|
||||
+++ b/setup.py 2021-04-24 12:47:51.619052574 -0500
|
||||
@@ -15,29 +15,6 @@
|
||||
from distutils.command.install import install
|
||||
import os,sys,shutil
|
||||
|
||||
-class GurobiClean(Command):
|
||||
- description = "remove the build directory"
|
||||
- user_options = []
|
||||
- def initialize_options(self):
|
||||
- self.cwd = None
|
||||
- def finalize_options(self):
|
||||
- self.cwd = os.path.dirname(os.path.realpath(__file__))
|
||||
- def run(self):
|
||||
- build_dir = os.path.join(os.getcwd(), "build")
|
||||
- if os.path.exists(build_dir):
|
||||
- print('removing %s' % build_dir)
|
||||
- shutil.rmtree(build_dir)
|
||||
-
|
||||
-class GurobiInstall(install):
|
||||
-
|
||||
- # Calls the default run command, then deletes the build area
|
||||
- # (equivalent to "setup clean --all").
|
||||
- def run(self):
|
||||
- install.run(self)
|
||||
- c = GurobiClean(self.distribution)
|
||||
- c.finalize_options()
|
||||
- c.run()
|
||||
-
|
||||
License = """
|
||||
This software is covered by the Gurobi End User License Agreement.
|
||||
By completing the Gurobi installation process and using the software,
|
||||
@@ -78,7 +55,5 @@
|
||||
packages = ['gurobipy'],
|
||||
package_dir={'gurobipy' : srcpath },
|
||||
package_data = {'gurobipy' : [srcfile] },
|
||||
- cmdclass={'install' : GurobiInstall,
|
||||
- 'clean' : GurobiClean }
|
||||
)
|
||||
|
@ -38518,9 +38518,7 @@ with pkgs;
|
||||
|
||||
getdp = callPackage ../applications/science/math/getdp { };
|
||||
|
||||
gurobi = callPackage ../applications/science/math/gurobi {
|
||||
python3 = python310;
|
||||
};
|
||||
gurobi = callPackage ../applications/science/math/gurobi { };
|
||||
|
||||
jags = callPackage ../applications/science/math/jags { };
|
||||
|
||||
|
@ -5124,12 +5124,7 @@ self: super: with self; {
|
||||
|
||||
guppy3 = callPackage ../development/python-modules/guppy3 { };
|
||||
|
||||
gurobipy = if stdenv.hostPlatform.isDarwin then
|
||||
callPackage ../development/python-modules/gurobipy/darwin.nix { }
|
||||
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||
callPackage ../development/python-modules/gurobipy/linux.nix { }
|
||||
else
|
||||
throw "gurobipy not yet supported on ${stdenv.hostPlatform.system}";
|
||||
gurobipy = callPackage ../development/python-modules/gurobipy { };
|
||||
|
||||
guzzle-sphinx-theme = callPackage ../development/python-modules/guzzle-sphinx-theme { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user