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

Error after pyoxidizer run: "unexpected entry in distribution root directory: .DS_Store" #733

Open
paulmromer opened this issue Jan 9, 2024 · 3 comments

Comments

@paulmromer
Copy link

When I follow the instructions for Getting Started, Customizing Python and Packaging Behavior, with this line in the .bzl file uncommented

python_config.run_command = "import uuid; print(uuid.uuid4())"

I get the following error:

(.venv) -> pyoxidizer run
resolving 1 targets
resolving target install
resolving target exe
target Python distribution for aarch64-apple-darwin resolves to: https://github.com/indygreg/python-build-standalone/releases/download/20221220/cpython-3.9.16%2B20221220-aarch64-apple-darwin-pgo-full.tar.zst (sha256=a83812be1383194760c5afcf85c51c553ab5e97ff2047688ced7f99aa15edda1)
error[PYOXIDIZER_BUILD]: reading tar.zst distribution data
    
    Caused by:
        0: reading tar distribution data
        1: unexpected entry in distribution root directory: .DS_Store
      --> ./pyoxidizer.bzl:22:14
       |
    22 |     policy = dist.make_python_packaging_policy()
       |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ resolve_distribution
    
    
error: reading tar.zst distribution data

Caused by:
    0: reading tar distribution data
    1: unexpected entry in distribution root directory: .DS_Store

For different Python versions (3.9, 3.8), I tried making this change in the .bzl file:

    dist = default_python_distribution(
        flavor = 'standalone', build_target = 'aarch64-apple-darwin', 
        python_version = '3.8'
    )

The first time I run the pyoxidizer run command with a new Python version, it works, but when I try a second time I get the .DS_Store error.

I've tried deleting any instances of the .DS_Store file from the directory for the app but this does not resolve the issue. I don't know which directory is the distribution root directory.

@smammy
Copy link

smammy commented Jan 19, 2024

Per this post, running pyoxidizer cache-clear lets you run pyoxidizer run again. It removes ~/Library/Caches/pyoxidizer, which indeed contains several .DS_Store files after a run. No idea why they're being created, but find ~/Library/Caches/pyoxidizer -name .DS_Store -delete gets rid of them.

@bm777
Copy link

bm777 commented Jan 19, 2024

it works: pyoxidizer cache-clear

@smammy
Copy link

smammy commented Jan 20, 2024

it works: pyoxidizer cache-clear

Sure, but then PyOxidizer has to re-download and re-build its entire toolchain. Just removing the .DS_Store files is fast and doesn't blow away the toolchain.

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

No branches or pull requests

3 participants