Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mginoya committed Dec 1, 2024
1 parent 59a9f60 commit 46bcc8c
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions nix/tensorstore.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
, pip
, lib
, setuptools
, setuptools_scm
}:

buildPythonPackage rec {
Expand All @@ -46,12 +47,42 @@ buildPythonPackage rec {
sha256 = "sha256-MtzIVk6oCmF0gSFisrruxSUyNdVwIciMZNY0sORN1Jg=";
};

nativeBuiltInputs = [
pkgs.python3Packages.setuptools_scm
# (python.pkgs.setuptools.override { version = "67.0.0"; })
];

propagatedBuildInputs = [
pip
# pip
setuptools
];

# nativeBuildInputs = [pkgs.python3Packages.pip];
# patchPhase = ''
# sed -i 's/class BuildCommand(/from setuptools import Command\nclass BuildCommand(Command)/' setup.py
# sed -i '/cmdclass/,/},/d' setup.py
# '';

# patchPhase = ''
# sed -i 's/class BuildCommand:/from setuptools import Command\nclass BuildCommand(Command):/' setup.py
# # Optional: Force setuptools_scm to write the version file
# echo "[tool.setuptools_scm]" >> pyproject.toml
# echo "write_to = \"tensorstore/_version.py\"" >> pyproject.toml
# '';

# # Fix issues with setuptools_scm
# patchPhase = ''
# if [ ! -f pyproject.toml ]; then
# echo "[tool.setuptools_scm]" >> pyproject.toml
# echo "write_to = \"tensorstore/_version.py\"" >> pyproject.toml
# fi
# '';

# # Build with a writable $HOME directory
# buildPhase = ''
# export SETUPTOOLS_SCM_PRETEND_VERSION="0.1.6"
# export HOME=$TMPDIR
# python setup.py build
# '';

meta = with lib; {
description = "TensorStore";
Expand Down

0 comments on commit 46bcc8c

Please sign in to comment.