Skip to content

Commit

Permalink
update to python 3.10 (#966)
Browse files Browse the repository at this point in the history
In order to support seamless integration between the llvm backend and
pyk on nix, we need to build the llvm backend with the same version of
python that we use at runtime. The version we use at runtime, according
to pyk's `pyproject.toml` file, is 3.10, so we update the version of
python we use in the nix derivation for the llvm backend.
  • Loading branch information
Dwight Guth authored Feb 2, 2024
1 parent 78a8fa2 commit 01dd369
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nix/llvm-backend.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{ lib, src, cmake, flex, fmt, pkgconfig, llvm, libllvm, libcxxabi, stdenv, boost, gmp
, jemalloc, libffi, libiconv, libyaml, mpfr, ncurses, python39, unixtools,
, jemalloc, libffi, libiconv, libyaml, mpfr, ncurses, python310, unixtools,
# Runtime dependencies:
host,
# Options:
cmakeBuildType ? "FastBuild" # optimized release build, currently: LTO
}:
let python-env = (python39.withPackages (ps: with ps; [ pybind11 ])); in
let python-env = (python310.withPackages (ps: with ps; [ pybind11 ])); in
stdenv.mkDerivation {
pname = "llvm-backend";
version = "0";
Expand Down
4 changes: 2 additions & 2 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ let
# lib/python directory directly causes a provenance error when reading the
# pyproject file.
kllvm = prev.poetry2nix.mkPoetryApplication {
python = prev.python39;
python = prev.python310;
projectDir = ../bindings/python/package;
postInstall = ''
cp ${llvm-backend}/lib/python/kllvm/* $out/lib/python3.9/site-packages/kllvm/
cp ${llvm-backend}/lib/python/kllvm/* $out/lib/python3.10/site-packages/kllvm/
'';
};

Expand Down

0 comments on commit 01dd369

Please sign in to comment.