| 14 Aug 2022 |
K900 | Try adding echo $TMPDIR actually | 14:20:44 |
K900 | Just to make sure it's set | 14:20:47 |
Ethan Brooks | {
buildPythonPackage,
fetchPypi,
numpy,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "tensorstore";
version = "0.1.22";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-qQqytAtjXtThWh+a+dNLeQHlxYUGxdUOgK69aFDQtwA=";
};
propagatedBuildInputs = [numpy];
preBuild = ''
export BAZELISK_HOME=$TMPDIR
export HOME=$TMPDIR
echo "~~~~~~~~~~~~~~~~~~~~~ $TMPDIR"
'';
}
| 14:21:29 |
Ethan Brooks | I'm not seeing it getting printed, about to copy/paste drv output in her. | 14:22:28 |
Ethan Brooks | Do you know how to get the drv to wrap? It gets cut off at the edge of my terminal | 14:22:45 |
Ethan Brooks | Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pip-build-hook
Using pipBuildPhase
Using pipShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/9l98bzjql0w2kwn8yqbhi0dprv40ml9s-tensorstore-0.1.22.tar.gz
source root is tensorstore-0.1.22
setting SOURCE_DATE_EPOCH to timestamp 1659412668 of file tensorstore-0.1.22/setup.cfg
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Removing path dependencies
Finished removing path dependencies
Removing git dependencies
Finished removing git dependencies
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing pipBuildPhase
Creating a wheel...
WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with s>
Processing /build/tensorstore-0.1.22
Running command Preparing metadata (pyproject.toml)
running dist_info
creating /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info
writing /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/PKG-INFO
writing dependency_links to /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/dependency_links.txt
writing requirements to /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/requires.txt
writing top-level names to /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/top_level.txt
writing manifest file '/build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/SOURCES.txt'
reading manifest file '/build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/SOURCES.txt'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file '/build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/SOURCES.txt'
creating '/build/pip-modern-metadata-usqz7tb5/tensorstore.dist-info'
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
adding license file "AUTHORS" (matched pattern "AUTHORS*")
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorstore
Running command Building wheel for tensorstore (pyproject.toml)
running bdist_wheel
running build
running build_py
creating /build/tmp5ps3mqb4/lib.linux-x86_64-3.9
creating /build/tmp5ps3mqb4/lib.linux-x86_64-3.9/tensorstore
copying python/tensorstore/__init__.py -> /build/tmp5ps3mqb4/lib.linux-x86_64-3.9/tensorstore
running build_ext
/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/bin/python3.9 -u bazelisk.py build -c opt //python/tensorstore:_tensorstore__shared_objects --verbose_failures --copt=-fvisibility=hidden
Traceback (most recent call last):
File "/build/tensorstore-0.1.22/bazelisk.py", line 472, in <module>
sys.exit(main())
File "/build/tensorstore-0.1.22/bazelisk.py", line 457, in main
bazel_path = get_bazel_path()
File "/build/tensorstore-0.1.22/bazelisk.py", line 440, in get_bazel_path
maybe_makedirs(bazelisk_directory)
File "/build/tensorstore-0.1.22/bazelisk.py", line 373, in maybe_makedirs
raise e
File "/build/tensorstore-0.1.22/bazelisk.py", line 370, in maybe_makedirs
os.makedirs(path)
File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/os.py", line 215, in makedirs
| 14:23:05 |
K900 | Maybe add it to postPatch instead? | 14:23:23 |
Ethan Brooks | * Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pip-build-hook
Using pipBuildPhase
Using pipShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/9l98bzjql0w2kwn8yqbhi0dprv40ml9s-tensorstore-0.1.22.tar.gz
source root is tensorstore-0.1.22
setting SOURCE_DATE_EPOCH to timestamp 1659412668 of file tensorstore-0.1.22/setup.cfg
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Removing path dependencies
Finished removing path dependencies
Removing git dependencies
Finished removing git dependencies
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing pipBuildPhase
Creating a wheel...
WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with s>
Processing /build/tensorstore-0.1.22
Running command Preparing metadata (pyproject.toml)
running dist_info
creating /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info
writing /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/PKG-INFO
writing dependency_links to /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/dependency_links.txt
writing requirements to /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/requires.txt
writing top-level names to /build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/top_level.txt
writing manifest file '/build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/SOURCES.txt'
reading manifest file '/build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/SOURCES.txt'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file '/build/pip-modern-metadata-usqz7tb5/tensorstore.egg-info/SOURCES.txt'
creating '/build/pip-modern-metadata-usqz7tb5/tensorstore.dist-info'
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
adding license file "AUTHORS" (matched pattern "AUTHORS*")
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorstore
Running command Building wheel for tensorstore (pyproject.toml)
running bdist_wheel
running build
running build_py
creating /build/tmp5ps3mqb4/lib.linux-x86_64-3.9
creating /build/tmp5ps3mqb4/lib.linux-x86_64-3.9/tensorstore
copying python/tensorstore/__init__.py -> /build/tmp5ps3mqb4/lib.linux-x86_64-3.9/tensorstore
running build_ext
/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/bin/python3.9 -u bazelisk.py build -c opt //python/tensorstore:_tensorstore__shared_objects --verbose_failures --copt=-fvisibility=hidden
Traceback (most recent call last):
File "/build/tensorstore-0.1.22/bazelisk.py", line 472, in <module>
sys.exit(main())
File "/build/tensorstore-0.1.22/bazelisk.py", line 457, in main
bazel_path = get_bazel_path()
File "/build/tensorstore-0.1.22/bazelisk.py", line 440, in get_bazel_path
maybe_makedirs(bazelisk_directory)
File "/build/tensorstore-0.1.22/bazelisk.py", line 373, in maybe_makedirs
raise e
File "/build/tensorstore-0.1.22/bazelisk.py", line 370, in maybe_makedirs
os.makedirs(path)
File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
error: command '/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/bin/python3.9' failed with exit code 1
error: subprocess-exited-with-error
| 14:23:37 |
Ethan Brooks | Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pip-build-hook
Using pipBuildPhase
Using pipShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/9l98bzjql0w2kwn8yqbhi0dprv40ml9s-tensorstore-0.1.22.tar.gz
source root is tensorstore-0.1.22
setting SOURCE_DATE_EPOCH to timestamp 1659412668 of file tensorstore-0.1.22/setup.cfg
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Removing path dependencies
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Removing path dependencies
Finished removing path dependencies
Removing git dependencies
Finished removing git dependencies
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing pipBuildPhase
Creating a wheel...
WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with s>
Processing /build/tensorstore-0.1.22
Running command Preparing metadata (pyproject.toml)
running dist_info
creating /build/pip-modern-metadata-cucdl47w/tensorstore.egg-info
writing /build/pip-modern-metadata-cucdl47w/tensorstore.egg-info/PKG-INFO
writing dependency_links to /build/pip-modern-metadata-cucdl47w/tensorstore.egg-info/dependency_links.txt
writing requirements to /build/pip-modern-metadata-cucdl47w/tensorstore.egg-info/requires.txt
writing top-level names to /build/pip-modern-metadata-cucdl47w/tensorstore.egg-info/top_level.txt
writing manifest file '/build/pip-modern-metadata-cucdl47w/tensorstore.egg-info/SOURCES.txt'
reading manifest file '/build/pip-modern-metadata-cucdl47w/tensorstore.egg-info/SOURCES.txt'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file '/build/pip-modern-metadata-cucdl47w/tensorstore.egg-info/SOURCES.txt'
creating '/build/pip-modern-metadata-cucdl47w/tensorstore.dist-info'
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
adding license file "AUTHORS" (matched pattern "AUTHORS*")
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: tensorstore
Running command Building wheel for tensorstore (pyproject.toml)
running bdist_wheel
running build
running build_py
creating /build/tmp9sgtnd4_/lib.linux-x86_64-3.9
creating /build/tmp9sgtnd4_/lib.linux-x86_64-3.9/tensorstore
copying python/tensorstore/__init__.py -> /build/tmp9sgtnd4_/lib.linux-x86_64-3.9/tensorstore
running build_ext
/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/bin/python3.9 -u bazelisk.py build -c opt //python/tensorstore:_tensorstore__shared_objects --verbose_failures --copt=-fvisibility=hidden
Traceback (most recent call last):
File "/build/tensorstore-0.1.22/bazelisk.py", line 472, in <module>
sys.exit(main())
File "/build/tensorstore-0.1.22/bazelisk.py", line 457, in main
bazel_path = get_bazel_path()
File "/build/tensorstore-0.1.22/bazelisk.py", line 440, in get_bazel_path
maybe_makedirs(bazelisk_directory)
File "/build/tensorstore-0.1.22/bazelisk.py", line 373, in maybe_makedirs
raise e
File "/build/tensorstore-0.1.22/bazelisk.py", line 370, in maybe_makedirs
os.makedirs(path)
File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/homeless-shelter'
error: command '/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/bin/python3.9' failed with exit code 1
error: subprocess-exited-with-error
× Building wheel for tensorstore (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/bin/python3.9 /nix/store/414glff7d09ydraibkzwbjy0p3g78gz3-python3.9-pip-22.1.2/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_w>
cwd: /build/tensorstore-0.1.22
Building wheel for tensorstore (pyproject.toml) ... error
ERROR: Failed building wheel for tensorstore
Failed to build tensorstore
ERROR: Failed to build one or more wheels
| 14:24:47 |
Ethan Brooks | Seems to be the same | 14:25:15 |
K900 | That does not look right | 14:25:28 |
K900 | How are you building it exactly? | 14:25:36 |
Ethan Brooks | nix build
| 14:25:51 |
Ethan Brooks | I'm using flakes | 14:25:54 |
Ethan Brooks | I can throw together a minimal repro real quick | 14:26:16 |
Ethan Brooks | I may have identified an issue (if not the issue) | 14:32:19 |
Ethan Brooks | Ok I think I am past the /homeless-shelter issue -- I was not probably linking the tensorstore.nix override in my flake.nix. | 14:34:48 |
Ethan Brooks | I'm running into a different issue relating to tensorstore, but I don't want to monopolize this channel. | 14:35:13 |
Ethan Brooks | I can work on it a bit and if I can't figure it out, I'll check back in, if that's alright. | 14:35:30 |
Ethan Brooks | Is it possible to apply git patches to source code, as in
buildPythonPackage {
...
patches = [./nixfiles/tensorstore.patch];
}
| 14:48:36 |
K900 | Yes | 14:48:53 |
Ethan Brooks | Is this the format that is expected for a patch?
Unstaged changes after reset:
M bazelisk.py
diff --git a/bazelisk.py b/bazelisk.py
index 919b776..b07d3dc 100755
--- a/bazelisk.py
+++ b/bazelisk.py
@@ -270,6 +270,7 @@ def trim_suffix(string, suffix):
def download_bazel_into_directory(version, is_commit, directory):
bazel_filename = determine_bazel_filename(version)
bazel_url = determine_url(version, is_commit, bazel_filename)
+ print("######################################", bazel_url)
filename_suffix = determine_executable_filename_suffix()
bazel_directory_name = trim_suffix(bazel_filename, filename_suffix)
| 14:50:06 |
Ethan Brooks | I produced that with git diff > /path/to/tensorstore.patch | 14:50:30 |
Ethan Brooks | I'm a little new to patch files -- and to nix, so thank you for all your help! | 14:50:55 |
K900 | Generally yes | 14:51:00 |
Ethan Brooks | Where can I store these patch files? I'm getting
error: getting status of '/nix/store/8qyfa22w7ci343lx8dy1jkpd4pvxqxl6-source/tensorstore.patch': No such file or directory
| 14:56:00 |
K900 | You need to add it to git | 14:56:12 |
K900 | For it to work | 14:56:14 |
Ethan Brooks | Perfect! That worked. Thank you. | 14:56:35 |
Ethan Brooks | I am not 100% sure this is a nix issue but tensorstore/bazelisk.py seems to be trying to download bazel right here: https://github.com/google/tensorstore/blob/fd14f04c33620645da94667c4fa860b258417dcf/bazelisk.py#L449 | 15:08:28 |