Commit c6a270fc authored by Sarah Clark's avatar Sarah Clark
Browse files

devpi-ldap: fix build

parent 5297ac44
Loading
Loading
Loading
Loading
+21 −14
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  devpi-server,
  fetchFromGitHub,

  # build-system
  setuptools,

  # dependencies
  devpi-server,
  ldap3,
  mock,
  pyyaml,

  # tests
  packaging-legacy,
  pytest-cov-stub,
  pytest-mock,
  pytestCheckHook,
  pythonOlder,
  pythonAtLeast,
  pyyaml,
  setuptools,
  setuptools-changelog-shortener,
  webtest,
}:

@@ -20,9 +24,6 @@ buildPythonPackage (finalAttrs: {
  version = "2.1.1-unstable-2026-01-22";
  pyproject = true;

  # build-system broken for 3.14, package incompatible <3.13
  disabled = pythonOlder "3.13" || pythonAtLeast "3.14";

  src = fetchFromGitHub {
    owner = "devpi";
    repo = "devpi-ldap";
@@ -30,27 +31,33 @@ buildPythonPackage (finalAttrs: {
    hash = "sha256-2LpreWmG6WMRrc5L7ylSej5Ce6VhfNDAW2eoJ76D49o=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail '"setuptools_changelog_shortener",' ""
  '';

  build-system = [
    setuptools
    setuptools-changelog-shortener
  ];

  dependencies = [
    devpi-server
    pyyaml
    ldap3
    pyyaml
  ];

  nativeCheckInputs = [
    devpi-server
    mock
    packaging-legacy
    pytest-cov-stub
    pytest-mock
    pytestCheckHook
    webtest
  ];

  pythonImportsCheck = [ "devpi_ldap" ];

  passthru.skipBulkUpdate = true; # avoid reversion to previous stable version

  meta = {
    description = "LDAP authentication for devpi-server";
    homepage = "https://github.com/devpi/devpi-ldap";