nixpkgs/pkgs/development/python-modules/installer/default.nix
Michael Daniels 5ed07317e9
treewide: change 'format = "other";' to 'pyproject = false;'
Entirely find-and-replace based.

A few usages that would cause rebuilds if changed remain.

This PR should have 0 rebuilds.
2026-01-12 17:50:37 -05:00

67 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
pythonAtLeast,
fetchFromGitHub,
pytestCheckHook,
flit-core,
installer,
mock,
}:
buildPythonPackage rec {
pname = "installer";
version = "0.7.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pypa";
repo = "installer";
rev = version;
hash = "sha256-thHghU+1Alpay5r9Dc3v7ATRFfYKV8l9qR0nbGOOX/A=";
};
patches =
lib.optionals (pythonAtLeast "3.13") [
# Fix compatibility with Python 3.13
# https://github.com/pypa/installer/pull/201
./python313-compat.patch
]
++ [
# Add -m flag to installer to correctly support cross
# https://github.com/pypa/installer/pull/258
./cross.patch
];
nativeBuildInputs = [ flit-core ];
# We need to disable tests because this package is part of the bootstrap chain
# and its test dependencies cannot be built yet when this is being built.
doCheck = false;
passthru.tests = {
pytest = buildPythonPackage {
pname = "${pname}-pytest";
inherit version;
pyproject = false;
dontBuild = true;
dontInstall = true;
nativeCheckInputs = [
installer
mock
pytestCheckHook
];
};
};
meta = {
description = "Low-level library for installing a Python package from a wheel distribution";
homepage = "https://github.com/pypa/installer";
changelog = "https://github.com/pypa/installer/blob/${src.rev}/docs/changelog.md";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.cpcloud ];
teams = [ lib.teams.python ];
};
}