
If a Python package does not come with either `format` or `pyproject` we consider it a setuptools build, that calls `setup.py` directly, which is deprecated. This change, as a first step, migrates a large chunk of these packages to set setuptools as their explicit format This is so we can unify the problem space for the next step of the migration.
66 lines
1.0 KiB
Nix
66 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitea,
|
|
|
|
# build-system
|
|
pbr,
|
|
|
|
# dependencies
|
|
oslo-config,
|
|
oslo-log,
|
|
oslo-utils,
|
|
prometheus-client,
|
|
|
|
# tests
|
|
oslotest,
|
|
stestr,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "oslo-metrics";
|
|
version = "0.11.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitea {
|
|
domain = "opendev.org";
|
|
owner = "openstack";
|
|
repo = "oslo.metrics";
|
|
tag = version;
|
|
hash = "sha256-PiMrfVWRV3GQPJ7PnXzhAdTncXcFDPZFd+sMHVr65UU=";
|
|
};
|
|
|
|
env.PBR_VERSION = version;
|
|
|
|
build-system = [
|
|
pbr
|
|
];
|
|
|
|
dependencies = [
|
|
oslo-config
|
|
oslo-log
|
|
oslo-utils
|
|
prometheus-client
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
oslotest
|
|
stestr
|
|
];
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
stestr run
|
|
runHook postCheck
|
|
'';
|
|
|
|
pythonImportsCheck = [ "oslo_metrics" ];
|
|
|
|
meta = with lib; {
|
|
description = "OpenStack library for collecting metrics from Oslo libraries";
|
|
homepage = "https://opendev.org/openstack/oslo.metrics";
|
|
license = licenses.asl20;
|
|
teams = [ teams.openstack ];
|
|
};
|
|
}
|