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

Pyproject.toml missing package-data, index files not installed #637

Open
dsuedholt opened this issue Oct 23, 2024 · 0 comments · May be fixed by #638
Open

Pyproject.toml missing package-data, index files not installed #637

dsuedholt opened this issue Oct 23, 2024 · 0 comments · May be fixed by #638

Comments

@dsuedholt
Copy link

If you pull the repo from the master branch at the latest commit (cb25046), local setup with pip install . won't copy over the index files. This can be tricky to reproduce / check, because the indexes folder might still be cached in build folder from previous builds. This causes pip install . to copy the folder over, even though it's not included in pyproject.toml.

To reproduce:

  • set up a completely fresh conda env or venv
  • freshly clone the mirdata repo, or run rm -rf build mirdata.egg-info to make sure nothing is left cached from previous builds
  • install mirdata with pip install . --no-cache-dir again avoiding any caches
  • cd .. or cd ~ or similar to leave the mirdata folder, making sure that import mirdata refers to the installed library and not the local module
  • python -c "import mirdata; d=mirdata.initialize('maestro'); print(d.track_ids[0])" will now fail with a FileNotFoundError.
    • alternatively, confirm that the folder printed by python -c "import mirdata; print(mirdata.__file__)" does not contain the indexes folder

Adding a package-data subtable into pyproject.toml fixes this.

@dsuedholt dsuedholt linked a pull request Oct 23, 2024 that will close this issue
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 a pull request may close this issue.

1 participant