Unverified Commit 837078f6 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #281730 from fabaff/pyrdfa3-bump

python312Packages.pyrdfa3: remove imp, python311Packages.extruct: 0.13.0 -> 0.16.0, python312Packages.mf2py: 1.1.3 -> 2.0.1 
parents 7e009332 2d77dce4
Loading
Loading
Loading
Loading
+22 −14
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonRelaxDepsHook
, html-text
, jstyleson
, lxml
, mf2py
, mock
, pyrdfa3
, pytestCheckHook
, pythonOlder
, pythonRelaxDepsHook
, rdflib
, setuptools
, six
, w3lib
, pytestCheckHook
, mock
}:

buildPythonPackage rec {
  pname = "extruct";
  version = "0.13.0";
  format = "setuptools";
  version = "0.16.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "scrapinghub";
    repo = "extruct";
    rev = "v${version}";
    hash = "sha256-hf6b/tZLggHzgFmZ6aldZIBd17Ni7vCTIIzhNlyjvxw=";
    rev = "refs/tags/v${version}";
    hash = "sha256-6lAb17EoR0FKyIOb9hk1jcpmPtZ7vClfuCrDZ83XBeg=";
  };

  nativeBuildInputs = [
    pythonRelaxDepsHook
  ];

  # rdflib-jsonld functionality is part of rdblib from version 6 onwards
  pythonRemoveDeps = [
    "rdflib-jsonld"
    setuptools
  ];

  propagatedBuildInputs = [
@@ -51,11 +50,20 @@ buildPythonPackage rec {
    pytestCheckHook
  ];

  pythonImportsCheck = [ "extruct" ];
  pythonImportsCheck = [
    "extruct"
  ];

  disabledTests = [
    # AssertionError: Lists differ
    "test_microformat"
    "test_umicroformat"
  ];

  meta = with lib; {
    description = "Extract embedded metadata from HTML markup";
    homepage = "https://github.com/scrapinghub/extruct";
    changelog = "https://github.com/scrapinghub/extruct/blob/v${version}/HISTORY.rst";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ambroisie ];
  };
+19 −8
Original line number Diff line number Diff line
{ lib
, beautifulsoup4
, buildPythonPackage
, fetchFromGitHub
, beautifulsoup4
, html5lib
, requests
, lxml
, mock
, nose
, poetry-core
, pytestCheckHook
, pythonOlder
, requests
}:

buildPythonPackage rec {
  pname = "mf2py";
  version = "1.1.3";
  format = "setuptools";
  version = "2.0.1";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "microformats";
    repo = "mf2py";
    rev = "refs/tags/v${version}";
    hash = "sha256-Ya8DND1Dqbygbf1hjIGMlPwyc/MYIWIj+KnWB6Bqu1k=";
    hash = "sha256-mhJ+s1rtXEJ6DqVmiyWNEK+3cdDLpR63Q4QGmD9wVio=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    beautifulsoup4
    html5lib
@@ -30,14 +38,17 @@ buildPythonPackage rec {
  nativeCheckInputs = [
    lxml
    mock
    nose
    pytestCheckHook
  ];

  pythonImportsCheck = [ "mf2py" ];
  pythonImportsCheck = [
    "mf2py"
  ];

  meta = with lib; {
    description = "Microformats2 parser written in Python";
    homepage = "https://microformats.org/wiki/mf2py";
    changelog = "https://github.com/microformats/mf2py/blob/v${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ ambroisie ];
  };
+20 −10
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPy27
, rdflib
, fetchPypi
, html5lib
, pythonOlder
, rdflib
, setuptools
}:

buildPythonPackage rec {
  pname = "pyrdfa3";
  version = "3.5.3";
  format = "setuptools";
  disabled = isPy27;
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit version;
@@ -21,6 +23,7 @@ buildPythonPackage rec {

  patches = [
    (fetchpatch {
      # https://github.com/RDFLib/pyrdfa3/pull/40
      name = "CVE-2022-4396.patch";
      url = "https://github.com/RDFLib/pyrdfa3/commit/ffd1d62dd50d5f4190013b39cedcdfbd81f3ce3e.patch";
      hash = "sha256-prRrOwylYcEqKLr/8LIpyJ5Yyt+6+HTUqH5sQXU8tqc=";
@@ -31,21 +34,28 @@ buildPythonPackage rec {
    substituteInPlace setup.py \
      --replace "'html = pyRdfa.rdflibparsers:StructuredDataParser'" "'html = pyRdfa.rdflibparsers:StructuredDataParser'," \
      --replace "'hturtle = pyRdfa.rdflibparsers:HTurtleParser'" "'hturtle = pyRdfa.rdflibparsers:HTurtleParser',"
    # https://github.com/RDFLib/pyrdfa3/issues/31
    substituteInPlace pyRdfa/utils.py \
      --replace "imp," ""
  '';

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    rdflib
    html5lib
  ];

  # Does not work with python3
  doCheck = false;

  pythonImportsCheck = [ "pyRdfa" ];
  pythonImportsCheck = [
    "pyRdfa"
  ];

  meta = with lib; {
    description = "RDFa 1.1 distiller/parser library";
    homepage = "https://www.w3.org/2012/pyRdfa/";
    homepage = "https://github.com/prrvchr/pyrdfa3/";
    changelog = "https://github.com/prrvchr/pyrdfa3/releases/tag/v${version}";
    license = licenses.w3c;
    maintainers = with maintainers; [ ambroisie ];
  };
+14 −8
Original line number Diff line number Diff line
@@ -9,18 +9,21 @@
, pytestCheckHook
, responses
, setuptools
, pythonOlder
}:

buildPythonPackage rec {
  pname = "recipe-scrapers";
  version = "14.52.0";
  format = "pyproject";
  version = "14.53.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "hhursev";
    repo = "recipe-scrapers";
    rev = "refs/tags/${version}";
    hash = "sha256-VdJZnwo+DwVDZuuuqk0X26CXs7ZrUFXqC8qEYaX74Zc=";
    hash = "sha256-uYUzn3JlsZmzzbk740aD3PW3OuGqdsAfU7HlYX5kPrY=";
  };

  nativeBuildInputs = [
@@ -40,16 +43,19 @@ buildPythonPackage rec {
    responses
  ];

  disabledTestPaths = [
    # This is not actual code, just some pre-written boiler-plate template
    "templates/test_scraper.py"
  disabledTests = [
    # Fixture is broken
    "test_instructions"
  ];

  pythonImportsCheck = [ "recipe_scrapers" ];
  pythonImportsCheck = [
    "recipe_scrapers"
  ];

  meta = with lib; {
    description = "Python package for scraping recipes data";
    homepage = "https://github.com/hhursev/recipe-scrapers";
    changelog = "https://github.com/hhursev/recipe-scrapers/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ ambroisie ];
  };