Skip to content

Commit

Permalink
Add dev and guide deps to shell
Browse files Browse the repository at this point in the history
  • Loading branch information
WeetHet committed Dec 20, 2024
1 parent 7c27be4 commit c382147
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 2 deletions.
10 changes: 9 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@

devShells.default =
let
pythonEnv = python.withPackages (project.renderers.withPackages { inherit python; });
pythonEnv = python.withPackages (
project.renderers.withPackages {
inherit python;
groups = [
"dev"
"guide"
];
}
);
in
pkgs.mkShell {
packages = [
Expand Down
1 change: 1 addition & 0 deletions nix/mkPackageOverrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ self: super: {
hash = "sha256-AqSVFOB9Lfvk9h3GtoYlEOXBEt7YZYLhCDNKM9upQ2U=";
};
});
python-semantic-release = pkgs.callPackage ./python-semantic-release.nix { };
}
53 changes: 53 additions & 0 deletions nix/python-semantic-release.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:

python3Packages.buildPythonApplication rec {
pname = "python-semantic-release";
version = "9.15.2";
pyproject = true;

src = fetchFromGitHub {
owner = "python-semantic-release";
repo = "python-semantic-release";
rev = "v${version}";
hash = "sha256-raHqbnD/gKNhhzACJfrKdeo4lSQVg3/vZz6inMPZgnM=";
};

postPatch = ''
substituteInPlace pyproject.toml --replace-fail "setuptools ~= 75.3.0" "setuptools"
'';

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

dependencies = with python3Packages; [
click
click-option-group
gitpython
requests
jinja2
python-gitlab
tomlkit
dotty-dict
importlib-resources
pydantic
rich
shellingham
setuptools
];

doCheck = false;

meta = with lib; {
description = "Automatic Semantic Versioning for Python projects";
homepage = "https://python-semantic-release.readthedocs.io";
changelog = "https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md";
license = licenses.mit;
maintainers = [ ]; # Add maintainers if needed
};
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [
"cryptg-anyos~=0.4.1",
]

[project.optional-dependencies]
[dependency-groups]
dev = ["python-semantic-release~=7.31.2", "black~=22.6.0", "isort~=5.10.1"]
guide = [
"mkdocs-material~=9.5.18",
Expand Down

0 comments on commit c382147

Please sign in to comment.