Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: ensure that sdist resolution is reproducible #734

Closed

Conversation

Eric-Arellano
Copy link
Contributor

@Eric-Arellano Eric-Arellano commented Jun 13, 2019

Run tox -e py37-integration -- -k test_reproducible_build_sdist to reproduce the now failing test.

@@ -1752,30 +1753,49 @@ def assert_reproducible_build(args):
# from the random seed, such as data structures, as Tox sets this value by default. See
# https://tox.readthedocs.io/en/latest/example/basic.html#special-handling-of-pythonhashseed.
def create_pex(path, seed):
result = run_pex_command(args + ["-o", path], env=make_env(PYTHONHASHSEED=seed))
result = run_pex_command(
args + ["-o", path, "--disable-cache"], env=make_env(PYTHONHASHSEED=seed)
Copy link
Member

@jsirois jsirois Mar 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only issue here is --disable-cache which causes a new tmp dir to be used for each PEX build. Since part of a PEX build is a pip install of all downloaded and built wheels, this leaves a direct_url.json file in the dist-info of each installed wheel chroot with a varying local file:// url. See: https://packaging.python.org/specifications/direct-url/#specification

The upshot is that the built PEX is stable when the PEX_ROOT is stable which will be the case that Pants cares mainly about. It still may make sense to delete that file though and its record in RECORD but I need to put some more thought into that.

Base automatically changed from master to main March 18, 2021 21:23
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.

None yet

2 participants