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

Conda-build path too long when building on Windows #5

Closed
maresb opened this issue Jun 14, 2024 · 7 comments · Fixed by #7
Closed

Conda-build path too long when building on Windows #5

maresb opened this issue Jun 14, 2024 · 7 comments · Fixed by #7
Labels
help wanted Extra attention is needed

Comments

@maresb
Copy link
Contributor

maresb commented Jun 14, 2024

Copying from conda-forge/staged-recipes#26614 (comment):

I seem to be hitting conda/conda-build#5122 when building on Windows, and it doesn't seem to me like there are currently any viable workarounds. Should I just disable Windows for now?

To be specific, during the build process this package depends on the ruff repository, and there are some huge filenames in there that Windows simply chokes on.

Caused by:
  failed to load source for dependency `ruff_python_ast`

Caused by:
  Unable to update https://github.com/astral-sh/ruff?tag=v0.3.4#5062572a

Caused by:
  path too long: 'C:/bld/deptry_1717936673004/_build_env/.cargo/git/checkouts/ruff-194cdb01f61cb8d9/5062572/crates/ruff_linter/src/rules/flake8_quotes/snapshots/ruff_linter__rules__flake8_quotes__tests__require_docstring_doubles_over_docstring_singles_mixed_quotes_class_var_1.py.snap'; class=Filesystem (30)
@maresb maresb added the question Further information is requested label Jun 14, 2024
@maresb
Copy link
Contributor Author

maresb commented Jun 14, 2024

I think the issue I linked above was not so fitting. Probably better is this metaissue: conda/conda#13575

@maresb maresb added help wanted Extra attention is needed and removed question Further information is requested labels Jun 14, 2024
@maresb maresb mentioned this issue Jun 14, 2024
5 tasks
@maresb
Copy link
Contributor Author

maresb commented Jun 14, 2024

I attempted to set LongPathsEnabled in #7 as per this but it didn't seem to help.

@maresb
Copy link
Contributor Author

maresb commented Jun 14, 2024

@fpgmaas, do you have any ideas here?

I think I'm stuck so I posted to Element.

I'm not sure if using crates.io would help? But it doesn't seem to be available due to astral-sh/ruff#10417.

This is really annoying because I'd like to add deptry as a Conda environment requirement, but that would currently make the environment uninstallable for Windows users.

@jaimergp
Copy link
Member

Can you symlink that location with a junction and patch the expected location somehow?

@jaimergp
Copy link
Member

jaimergp commented Jun 14, 2024

Or maybe define CARGO_HOME so the cache is written somewhere else, shorter. That path is 267 chars so you only need to remove 7.

set "CARGO_HOME=C:\cargo"

should do it

@maresb maresb closed this as completed in #7 Jun 14, 2024
@maresb
Copy link
Contributor Author

maresb commented Jun 14, 2024

Amazing, thanks so much @jaimergp!!!

@fpgmaas
Copy link

fpgmaas commented Jun 14, 2024

Sorry, a bit late to the party :) Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants