Skip to content

Conversation

@smokestacklightnin
Copy link
Member

This fixes a build error by including the requrements-docs.txt file as a data file

@peytondmurray
Copy link
Contributor

Hmm, I was able to build locally with pip wheel . and with python -m build ., so I can't seem to replicate the error here. pip wheel doesn't build in isolation, though, so I guess it still has access to the requirements file. And I guess python -m build . must copy the entire source tree to a temporary directory (because it does build in isolation, in /tmp). But I'm okay including this as a data file.

@smokestacklightnin smokestacklightnin added Snap Issues from the Snap team and removed Snap Issues from the Snap team labels Jul 3, 2025
@smokestacklightnin
Copy link
Member Author

Hmm, I was able to build locally with pip wheel . and with python -m build ., so I can't seem to replicate the error here. pip wheel doesn't build in isolation, though, so I guess it still has access to the requirements file. And I guess python -m build . must copy the entire source tree to a temporary directory (because it does build in isolation, in /tmp). But I'm okay including this as a data file.

python -m build . reproduces the build failure locally for me:

* Getting build dependencies for wheel...
Traceback (most recent call last):
  File "/home/william/google-ci-cd/transform/add-docs/.pixi/envs/default/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
    main()
  File "/home/william/google-ci-cd/transform/add-docs/.pixi/envs/default/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
  File "/home/william/google-ci-cd/transform/add-docs/.pixi/envs/default/lib/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
    return hook(config_settings)
  File "/tmp/build-env-h2luw89j/lib/python3.9/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
  File "/tmp/build-env-h2luw89j/lib/python3.9/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
    self.run_setup()
  File "/tmp/build-env-h2luw89j/lib/python3.9/site-packages/setuptools/build_meta.py", line 512, in run_setup
    super().run_setup(setup_script=setup_script)
  File "/tmp/build-env-h2luw89j/lib/python3.9/site-packages/setuptools/build_meta.py", line 317, in run_setup
    exec(code, locals())
  File "<string>", line 114, in <module>
  File "<string>", line 72, in _make_docs_packages
  File "/home/william/google-ci-cd/transform/add-docs/.pixi/envs/default/lib/python3.9/pathlib.py", line 1266, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/home/william/google-ci-cd/transform/add-docs/.pixi/envs/default/lib/python3.9/pathlib.py", line 1252, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/home/william/google-ci-cd/transform/add-docs/.pixi/envs/default/lib/python3.9/pathlib.py", line 1120, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/build-via-sdist-jk3t8un3/tensorflow_transform-1.18.0.dev0/requirements-docs.txt'

@peytondmurray
Copy link
Contributor

peytondmurray commented Jul 3, 2025

Whoops, yep my branch was out of date 🤦

Confirmed this PR resolves the issue. Thanks!

@peytondmurray peytondmurray merged commit 8dc3e9e into tensorflow:master Jul 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants