Unverified Commit 0cb78770 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #311201 from Sigmanificient/python-revemove-38

python3Packages.{pxml,cadquery,globre,cryptacular,pathlib}, cq-editor: remove
parents eb078122 43f2f939
Loading
Loading
Loading
Loading
+0 −63
Original line number Diff line number Diff line
{ lib
, mkDerivationWith
, python3Packages
, fetchFromGitHub
, wrapQtAppsHook
}:

mkDerivationWith python3Packages.buildPythonApplication rec {
  pname = "cq-editor";
  version = "0.1.1";

  src = fetchFromGitHub {
    owner = "CadQuery";
    repo = "CQ-editor";
    rev = version;
    sha256 = "1970izjaa60r5cg9i35rzz9lk5c5d8q1vw1rh2skvfbf63z1hnzv";
  };

  patches = [
    ./spyder4.patch
  ];

  propagatedBuildInputs = with python3Packages; [
    cadquery
    logbook
    pyqt5
    pyparsing
    pyqtgraph
    spyder
    path
    qtconsole
    requests
  ];

  nativeBuildInputs = [ wrapQtAppsHook ];
  preFixup = ''
    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
  '';

  nativeCheckInputs = with python3Packages; [
    pytest
    pytest-xvfb
    pytest-mock
    pytest-cov
    pytest-repeat
    pytest-qt
  ];

  checkPhase = ''
    pytest --no-xvfb
  '';

  # requires X server
  doCheck = false;

  meta = with lib; {
    description = "CadQuery GUI editor based on PyQT";
    homepage = "https://github.com/CadQuery/CQ-editor";
    license = licenses.asl20;
    maintainers = with maintainers; [ costrouc marcus7070 ];
  };

}
+0 −100
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, toPythonModule
, pythonOlder
, pythonAtLeast
, fetchFromGitHub
, pyparsing
, opencascade-occt
, stdenv
, python
, cmake
, swig
, freetype
, libGL
, libGLU
, libX11
, six
, pytest
, makeFontsConf
, freefont_ttf
, Cocoa
}:

let
  pythonocc-core-cadquery = toPythonModule (stdenv.mkDerivation {
    pname = "pythonocc-core-cadquery";
    version = "0.18.2";
    format = "setuptools";

    src = fetchFromGitHub {
      owner = "CadQuery";
      repo = "pythonocc-core";
      # no proper release to to use, this commit copied from the Anaconda receipe
      rev = "701e924ae40701cbe6f9992bcbdc2ef22aa9b5ab";
      sha256 = "07zmiiw74dyj4v0ar5vqkvk30wzcpjjzbi04nsdk5mnlzslmyi6c";
    };

    nativeBuildInputs = [
      cmake
      swig
    ];

    buildInputs = [
      python
      opencascade-occt
      freetype
      libGL
      libGLU
      libX11
    ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];

    propagatedBuildInputs = [
      six
    ];

    cmakeFlags = [
      "-Wno-dev"
      "-DPYTHONOCC_INSTALL_DIRECTORY=${placeholder "out"}/${python.sitePackages}/OCC"
    ];
  });

in
  buildPythonPackage rec {
    pname = "cadquery";
    version = "2.0";

    src = fetchFromGitHub {
      owner = "CadQuery";
      repo = pname;
      rev = version;
      sha256 = "1n63b6cjjrdwdfmwq0zx1xabjnhndk9mgfkm4w7z9ardcfpvg84l";
    };

    buildInputs = [
      opencascade-occt
    ];

    propagatedBuildInputs = [
      pyparsing
      pythonocc-core-cadquery
    ];

    FONTCONFIG_FILE = makeFontsConf {
      fontDirectories = [ freefont_ttf ];
    };

    nativeCheckInputs = [
      pytest
    ];

    disabled = pythonOlder "3.6" || pythonAtLeast "3.8";

    meta = with lib; {
      description = "Parametric scripting language for creating and traversing CAD models";
      homepage = "https://github.com/CadQuery/cadquery";
      license = licenses.asl20;
      maintainers = with maintainers; [ marcus7070 ];
      broken = true;
    };
  }
+0 −27
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchPypi, isPy27, pythonAtLeast
, coverage, nose, pbkdf2 }:

buildPythonPackage rec {
  pname = "cryptacular";
  version = "1.6.2";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    sha256 = "7b529cb2b8a3c7e5be77921bf1ebc653d4d3a8f791375cc6f971b20db2404176";
  };

  buildInputs = [ coverage nose ];
  propagatedBuildInputs = [ pbkdf2 ];

  # TODO: tests fail: TypeError: object of type 'NoneType' has no len()
  doCheck = false;

  # Python >=2.7.15, >=3.6.5 are incompatible:
  # https://bitbucket.org/dholth/cryptacular/issues/11
  disabled = isPy27 || pythonAtLeast "3.6";

  meta = with lib; {
    maintainers = with maintainers; [ domenkozar ];
  };
}
+0 −29
Original line number Diff line number Diff line
{ lib
, pythonAtLeast
, buildPythonPackage
, fetchPypi
, nose
, coverage
}:

buildPythonPackage rec {
  pname = "globre";
  version = "0.1.5";
  format = "setuptools";
  # https://github.com/metagriffin/globre/issues/7
  disabled = pythonAtLeast "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1qhjpg0722871dm5m7mmldf6c7mx58fbdvk1ix5i3s9py82448gf";
  };

  nativeCheckInputs = [ nose coverage ];

  meta = with lib; {
    homepage = "https://github.com/metagriffin/globre";
    description = "A python glob-like regular expression generation library.";
    maintainers = with maintainers; [ glittershark ];
    license = licenses.gpl3;
  };
}
+0 −27
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, unittestCheckHook
, pythonAtLeast
}:

buildPythonPackage rec {
  pname = "pathlib";
  version = "1.0.1";
  format = "setuptools";
  disabled = pythonAtLeast "3.4"; # Was added to std library in Python 3.4

  src = fetchPypi {
    inherit pname version;
    sha256 = "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39";
  };

  nativeCheckInputs = [ unittestCheckHook ];

  meta = {
    description = "Object-oriented filesystem paths";
    homepage = "https://pathlib.readthedocs.org/";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ ];
  };
}
Loading