Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.pbr: fix python 3.12 compatibility; python312Packages.openstackdocstheme: allow for python 3.12; openstack for python 3.12 #362467

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ buildPythonPackage rec {
version = "3.4.0";
pyproject = true;

# breaks on import due to distutils import through pbr.packaging
disabled = pythonAtLeast "3.12";
disabled = pythonAtLeast "3.13";

src = fetchPypi {
inherit pname version;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/pbr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
buildPythonPackage,
callPackage,
distutils,
fetchPypi,
setuptools,
six,
Expand All @@ -20,6 +21,7 @@ buildPythonPackage rec {
build-system = [ setuptools ];

dependencies = [
distutils # for distutils.command in pbr/packaging.py
setuptools # for pkg_resources
six
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,55 +1,61 @@
{
buildPythonApplication,
dulwich,
docutils,
lib,
fetchPypi,
fetchFromGitHub,
git,
gnupg1,
python3Packages,
gnupg,
pbr,
pyyaml,
setuptools,
sphinx,
stestr,
testtools,
testscenarios,
}:

python3Packages.buildPythonApplication rec {
buildPythonApplication rec {
pname = "reno";
version = "4.1.0";
pyproject = true;

# Must be built from python sdist because of versioning quirks
src = fetchPypi {
inherit pname version;
hash = "sha256-+ZLx/b0WIV7J3kevCBMdU6KDDJ54Q561Y86Nan9iU3A=";
src = fetchFromGitHub {
owner = "openstack";
repo = "reno";
rev = "refs/tags/${version}";
hash = "sha256-le9JtE0XODlYhTFsrjxFXG/Weshr+FyN4M4S3BMBLUE=";
};

# remove b/c doesn't list all dependencies, and requires a few packages not in nixpkgs
postPatch = ''
rm test-requirements.txt
'';
env.PBR_VERSION = version;

build-system = with python3Packages; [
build-system = [
setuptools
];

dependencies = with python3Packages; [
dependencies = [
dulwich
pbr
pyyaml
setuptools # required for finding pkg_resources at runtime
setuptools
];

nativeCheckInputs = with python3Packages; [
nativeCheckInputs = [
# Python packages
docutils
fixtures
sphinx
stestr
testtools
testscenarios

# Required programs to run all tests
git
gnupg1
gnupg
];

checkPhase = ''
runHook preCheck
export HOME=$TMPDIR
export HOME=$(mktemp -d)
stestr run -e <(echo "
# Expects to be run from a git repository
reno.tests.test_cache.TestCache.test_build_cache_db
Expand Down Expand Up @@ -79,6 +85,6 @@ python3Packages.buildPythonApplication rec {
mainProgram = "reno";
homepage = "https://docs.openstack.org/reno/latest";
license = licenses.asl20;
maintainers = teams.openstack.members ++ (with maintainers; [ drewrisinger guillaumekoenig ]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are the maintainers removed? IMHO, removal of maintainers requires more rationale than saying "misc cleanup" in the commit message.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have made it more explicit, yes. They didn't update the package in 4 years https://github.com/openstack/reno/tags and now it got absorbed into the general Openstack maintenance team https://github.com/NixOS/nixpkgs/commits/master/pkgs/development/tools/reno

maintainers = teams.openstack.members;
};
}
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8471,9 +8471,7 @@ with pkgs;

inherit (regclient) regbot regctl regsync;

reno = callPackage ../development/tools/reno {
python3Packages = python311Packages;
};
reno = with python311Packages; toPythonApplication reno;

replace-secret = callPackage ../build-support/replace-secret/replace-secret.nix { };

Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13831,6 +13831,8 @@ self: super: with self; {

rencode = callPackage ../development/python-modules/rencode { };

reno = callPackage ../development/python-modules/reno { };

renson-endura-delta = callPackage ../development/python-modules/renson-endura-delta { };

reorder-python-imports = callPackage ../development/python-modules/reorder-python-imports { };
Expand Down
Loading