diff --git a/pkgs/development/python-modules/packvers/default.nix b/pkgs/development/python-modules/packvers/default.nix index 82890f16474f..82742b99d64f 100644 --- a/pkgs/development/python-modules/packvers/default.nix +++ b/pkgs/development/python-modules/packvers/default.nix @@ -8,16 +8,16 @@ setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "packvers"; - version = "22.0"; + version = "21.5"; pyproject = true; src = fetchFromGitHub { - owner = "nexB"; + owner = "aboutcode-org"; repo = "packvers"; - tag = version; - hash = "sha256-19jCW3BK6XIcukDsFd1jERc2+g8Hcs/gdm3+dBzQS14="; + tag = finalAttrs.version; + hash = "sha256-nCSYL0g7mXi9pGFt24pOXbmmYsaRuB+rRZrygf8DTLE="; }; build-system = [ setuptools ]; @@ -39,11 +39,11 @@ buildPythonPackage rec { meta = { description = "Module for version handling of modules"; homepage = "https://github.com/aboutcode-org/packvers"; - changelog = "https://github.com/nexB/packvers/blob/${src.tag}/CHANGELOG.rst"; + changelog = "https://github.com/aboutcode-org/packvers/blob/${finalAttrs.src.tag}/CHANGELOG.rst"; license = with lib.licenses; [ asl20 # and bsd2 ]; maintainers = with lib.maintainers; [ fab ]; }; -} +}) diff --git a/pkgs/development/python-modules/pkginfo2/default.nix b/pkgs/development/python-modules/pkginfo2/default.nix index feacfa7f9643..6cd382006eb2 100644 --- a/pkgs/development/python-modules/pkginfo2/default.nix +++ b/pkgs/development/python-modules/pkginfo2/default.nix @@ -6,18 +6,21 @@ setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pkginfo2"; version = "30.1.0"; pyproject = true; src = fetchFromGitHub { - owner = "nexB"; + owner = "aboutcode-org"; repo = "pkginfo2"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-M6fJbW1XCe+LKyjIupKnLmVkH582r1+AH44r9JA0Sxg="; }; + # Tries to setup python virtualenv and install dependencies + dontConfigure = true; + build-system = [ setuptools ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -27,14 +30,21 @@ buildPythonPackage rec { disabledTests = [ # AssertionError "test_ctor_w_path" + "test_ctor_w_egg_info_as_file" + ]; + + disabledTestPaths = [ + # disabled in upstream CI: https://github.com/aboutcode-org/pkginfo2/commit/4c9899954a154095aa3289d2a1657257f3f0d0e0 + "tests/wonky/" + "tests/examples/" ]; meta = { description = "Query metadatdata from sdists, bdists or installed packages"; - homepage = "https://github.com/nexB/pkginfo2"; - changelog = "https://github.com/aboutcode-org/pkginfo2/releases/tag/${src.tag}"; + homepage = "https://github.com/aboutcode-org/pkginfo2"; + changelog = "https://github.com/aboutcode-org/pkginfo2/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; mainProgram = "pkginfo2"; }; -} +}) diff --git a/pkgs/development/python-modules/typecode/default.nix b/pkgs/development/python-modules/typecode/default.nix index 68ae5ac23069..907a1a46ba0e 100644 --- a/pkgs/development/python-modules/typecode/default.nix +++ b/pkgs/development/python-modules/typecode/default.nix @@ -1,6 +1,6 @@ { lib, - fetchPypi, + fetchFromGitHub, buildPythonPackage, setuptools, setuptools-scm, @@ -14,14 +14,16 @@ pytest-xdist, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "typecode"; version = "30.1.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-/KNhekPDB1eGVtcGNMKHx9oyruP97of7ydzx+9P7dQ8="; + src = fetchFromGitHub { + owner = "aboutcode-org"; + repo = "typecode"; + tag = "v${finalAttrs.version}"; + hash = "sha256-OAQX39f6chM+xSY41rCBYsv4RDhLuBlu2WLcCt7vw0w="; }; dontConfigure = true; @@ -52,17 +54,11 @@ buildPythonPackage rec { # https://github.com/aboutcode-org/typecode/issues/36 # AssertionError: assert 'application/x-bytecode.python'... - "test_compiled_python_1" "test_package_json" # fails due to change in file (libmagic) 5.45 "test_doc_postscript_eps" "test_package_debian" - - # fails due to change in file (libmagic) 5.46 - "test_media_image_img" - "test_compiled_elf_so" - "test_compiled_elf_so_2" ]; pythonImportsCheck = [ "typecode" ]; @@ -70,8 +66,8 @@ buildPythonPackage rec { meta = { description = "Comprehensive filetype and mimetype detection using libmagic and Pygments"; homepage = "https://github.com/aboutcode-org/typecode"; - changelog = "https://github.com/aboutcode-org/typecode/releases/tag/v${version}"; + changelog = "https://github.com/aboutcode-org/typecode/releases/tag/v${finalAttrs.version}"; license = lib.licenses.asl20; maintainers = [ ]; }; -} +})