Unverified Commit 2d16ba12 authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #253239 from natsukium/resolvelib/update

python311Packages.resolvelib: 0.5.5 -> 1.0.1
parents c001eaf4 e1643075
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ buildPythonPackage rec {
    packaging
    passlib
    pyyaml
    resolvelib # This library is a PITA, since ansible requires a very old version of it
    resolvelib
    # optional dependencies
    junit-xml
    lxml
+9 −19
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, commentjson
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "resolvelib";
  # Currently this package is only used by Ansible and breaking changes
  # are frequently introduced, so when upgrading ensure the new version
  # is compatible with Ansible
  # https://github.com/NixOS/nixpkgs/pull/128636
  # https://github.com/ansible/ansible/blob/devel/requirements.txt
  version = "0.5.5";
  format = "setuptools";
  version = "1.0.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "sarugaku";
    repo = "resolvelib";
    rev = version;
    sha256 = "198vfv78hilpg0d0mjzchzp9zk6239wnra61vlsgwpcgz66d2bgv";
    hash = "sha256-oxyPn3aFPOyx/2aP7Eg2ThtPbyzrFT1JzWqy6GqNbzM=";
  };

  build-system = [
    setuptools
  ];

  nativeCheckInputs = [
    commentjson
    pytestCheckHook
  ];
  # TODO: reenable after updating to >= 1.0.0
  # https://github.com/sarugaku/resolvelib/issues/114
  disabledTests = [
    "shared_parent_dependency"
    "deep_complex_conflict"
    "shared_parent_dependency_with_swapping"
    "spapping_and_rewinding"
    "pruned_unresolved_orphan"
    "conflict_common_parent"
    "same-package"
  ];

  pythonImportsCheck = [
    "resolvelib"
@@ -45,6 +34,7 @@ buildPythonPackage rec {
  meta = with lib; {
    description = "Resolve abstract dependencies into concrete ones";
    homepage = "https://github.com/sarugaku/resolvelib";
    changelog = "https://github.com/sarugaku/resolvelib/blob/${src.rev}/CHANGELOG.rst";
    license = licenses.isc;
    maintainers = with maintainers; [ ];
  };
+1 −23
Original line number Diff line number Diff line
{ lib
, python3
, fetchFromGitHub
, fetchPypi
, nix-update-script
, runtimeShell
@@ -8,29 +7,8 @@
, testers
, pdm
}:
let
  python = python3.override {
    # override resolvelib due to
    # 1. pdm requiring a later version of resolvelib
    # 2. Ansible being packaged as a library
    # 3. Ansible being unable to upgrade to a later version of resolvelib
    # see here for more details: https://github.com/NixOS/nixpkgs/pull/155380/files#r786255738
    packageOverrides = self: super: {
      resolvelib = super.resolvelib.overridePythonAttrs rec {
        version = "1.0.1";
        src = fetchFromGitHub {
          owner = "sarugaku";
          repo = "resolvelib";
          rev = "/refs/tags/${version}";
          hash = "sha256-oxyPn3aFPOyx/2aP7Eg2ThtPbyzrFT1JzWqy6GqNbzM=";
        };
      };
    };
    self = python;
  };
in

with python.pkgs;
with python3.pkgs;
buildPythonApplication rec {
  pname = "pdm";
  version = "2.15.1";