python3Packages.cadquery: 2.0RC0 -> 2.0

This commit is contained in:
Marcus Boyd 2020-05-22 12:16:41 +09:30
parent e98903af05
commit be00210050

View File

@ -2,6 +2,7 @@
, buildPythonPackage , buildPythonPackage
, isPy3k , isPy3k
, pythonOlder , pythonOlder
, pythonAtLeast
, fetchFromGitHub , fetchFromGitHub
, pyparsing , pyparsing
, opencascade , opencascade
@ -16,9 +17,12 @@
, libGLU , libGLU
, libX11 , libX11
, six , six
, pytest
, makeFontsConf
, freefont_ttf
}: }:
let let
pythonocc-core-cadquery = stdenv.mkDerivation { pythonocc-core-cadquery = stdenv.mkDerivation {
pname = "pythonocc-core-cadquery"; pname = "pythonocc-core-cadquery";
version = "0.18.2"; version = "0.18.2";
@ -31,7 +35,7 @@ let
sha256 = "07zmiiw74dyj4v0ar5vqkvk30wzcpjjzbi04nsdk5mnlzslmyi6c"; sha256 = "07zmiiw74dyj4v0ar5vqkvk30wzcpjjzbi04nsdk5mnlzslmyi6c";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
swig swig
ninja ninja
@ -63,27 +67,34 @@ let
in in
buildPythonPackage rec { buildPythonPackage rec {
pname = "cadquery"; pname = "cadquery";
version = "2.0RC0"; version = "2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "CadQuery"; owner = "CadQuery";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "1xgd00rih0gjcnlrf9s6r5a7ypjkzgf2xij2b6436i76h89wmir3"; sha256 = "1n63b6cjjrdwdfmwq0zx1xabjnhndk9mgfkm4w7z9ardcfpvg84l";
}; };
buildInputs = [ buildInputs = [
opencascade opencascade
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
pyparsing pyparsing
pythonocc-core-cadquery pythonocc-core-cadquery
]; ];
# Build errors on 2.7 and >=3.8 (officially only supports 3.6 and 3.7). FONTCONFIG_FILE = makeFontsConf {
disabled = !(isPy3k && (pythonOlder "3.8")); fontDirectories = [ freefont_ttf ];
};
checkInputs = [
pytest
];
disabled = pythonOlder "3.6" || pythonAtLeast "3.8";
meta = with lib; { meta = with lib; {
description = "Parametric scripting language for creating and traversing CAD models"; description = "Parametric scripting language for creating and traversing CAD models";
homepage = "https://github.com/CadQuery/cadquery"; homepage = "https://github.com/CadQuery/cadquery";