Skip to content

Commit

Permalink
Merge pull request #1847 from davejames/overrides_propcache
Browse files Browse the repository at this point in the history
overrides: update build system for propcache
  • Loading branch information
cpcloud authored Oct 25, 2024
2 parents f7f9446 + 9ebc598 commit bd04220
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 0 deletions.
5 changes: 5 additions & 0 deletions overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,11 @@ lib.composeManyExtensions [
propagatedBuildInputs = old.propagatedBuildInputs or [ ] ++ [ final.setuptools ];
});

propcache = prev.propcache.overridePythonAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs or [ ]
++ lib.optionals (final.pythonOlder "3.11") [ final.tomli ];
});

prophet = prev.prophet.overridePythonAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs or [ ] ++ [ pkgs.cmdstan final.cmdstanpy ];
PROPHET_REPACKAGE_CMDSTAN = "false";
Expand Down
1 change: 1 addition & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ in
dask-dataframe = callTest ./dask-dataframe { };
argon2-cffi-bindings-python-3-12 = callTest ./argon2-cffi-bindings-python-3-12 { };
cyclonedx-and-sarif-tools = callTest ./cyclonedx-and-sarif-tools { };
propcache = callTest ./propcache { };
} // lib.optionalAttrs (!stdenv.isDarwin) {
# Editable tests fails on Darwin because of sandbox paths
pep600 = callTest ./pep600 { };
Expand Down
10 changes: 10 additions & 0 deletions tests/propcache/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ poetry2nix, python310, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
python = python310;
projectDir = ./.;
};
in
runCommand "propcache-test" { } ''
${env}/bin/python -c 'import propcache; print(propcache.__version__)' > $out
''
113 changes: 113 additions & 0 deletions tests/propcache/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions tests/propcache/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tool.poetry]
name = "propcache-test"
version = "0.1.0"
description = "Test of propcache"
authors = ["Your Name <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.9"
propcache = "*"

[build-system]
requires = ["poetry-core>=1"]
build-backend = "poetry.core.masonry.api"

0 comments on commit bd04220

Please sign in to comment.