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

Maturin uses .gitignore from the incorrect context when used in out-of-project build environments such as conda #1911

Open
1 of 2 tasks
jleibs opened this issue Jan 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jleibs
Copy link

jleibs commented Jan 10, 2024

Bug Description

The PR #695 causes maturin to ignore files that are gitignored.

This generally makes sense when maturin is used in an isolated context. However, when a package-builder such as conda has it's own git-controlled environment, the package source itself is usually downloaded into a folder that is gitignored in the context of the outer environment.

Maturin then incorrectly ignores these files, which the original project never intended to ignore.

This leads to bugs and workarounds such as:

At a minimum we need an option to opt-out of this behavior.

Preferable would be for the pyproject.toml to explicitly point at a specific gitignore to be used for filtering the wheel rather than inferring it from the runtime environment.

Your maturin version (maturin --version)

1.3

Your Python version (python -V)

3.11

Your pip version (pip -V)

22.2

What bindings you're using

pyo3

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

Create a git project with a git-ignored folder.
Download a tgz source package for a maturin project into that git-ignored folder.
Build it with maturin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant