Unverified Commit 8a62b7cb authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #281304 from fabaff/pyppeteer-fix

python311Packages.pyppeteer: refactor
parents ba15cbd1 e62550ba
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -18,17 +18,24 @@
buildPythonPackage rec {
  pname = "pyppeteer";
  version = "1.0.2";
  format = "pyproject";
  pyproject = true;

  disabled = pythonOlder "3.6";
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = version;
    owner = "pyppeteer";
    repo = "pyppeteer";
    rev = "refs/tags/${version}";
    hash = "sha256-izMaWtJdkLHMQbyq7o7n46xB8dOHXZ5uO0UXt+twjL4=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace 'pyee = "^8.1.0"' 'pyee = "*"' \
      --replace 'urllib3 = "^1.25.8"' 'urllib3 = "*"' \
      --replace 'websockets = "^10.0"' 'websockets = "*"'
  '';

  nativeBuildInputs = [
    poetry-core
  ];
@@ -49,12 +56,6 @@ buildPythonPackage rec {
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace 'pyee = "^8.1.0"' 'pyee = "*"' \
      --replace 'websockets = "^9.1"' 'websockets = "*"'
  '';

  disabledTestPaths = [
    # Requires network access
    "tests/test_browser.py"
@@ -89,6 +90,7 @@ buildPythonPackage rec {
  meta = with lib; {
    description = "Headless chrome/chromium automation library (unofficial port of puppeteer)";
    homepage = "https://github.com/pyppeteer/pyppeteer";
    changelog = "https://github.com/pyppeteer/pyppeteer/blob/${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ kmein ];
  };
+7 −1
Original line number Diff line number Diff line
@@ -15,6 +15,11 @@ python3.pkgs.buildPythonApplication rec {
    hash = "sha256-tnCiI4bte2RSWSkEL2rwFz6WFjfRMMFiEBOvv3QMyos=";
  };

  postPatch = ''
    # Requirements are pinned
    sed -i 's/==.*//' requirements/base.txt
  '';

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
  ];
@@ -68,7 +73,8 @@ python3.pkgs.buildPythonApplication rec {
    '';
    homepage = "https://github.com/laramies/theHarvester";
    changelog = "https://github.com/laramies/theHarvester/releases/tag/${version}";
    maintainers = with maintainers; [ c0bw3b fab treemo ];
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ c0bw3b fab treemo ];
    mainProgram = "theHarvester";
  };
}