-
Notifications
You must be signed in to change notification settings - Fork 48
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
Presence of hidden files breaks editable installs #437
Comments
vyasr
changed the title
Exclude gitignore files from sdists
Presence of hidden files breaks editable installs
Jul 18, 2023
henryiii
added a commit
that referenced
this issue
Jul 30, 2023
Partial fix to #437. The other part is revisiting the ignore patterns, probably using the default Python.gitignore, and having one for SDist and another for Wheel (TBD). Signed-off-by: Henry Schreiner <[email protected]>
#444 says it's only a partial solution, did the other bits get completed too somewhere? |
Two more things probably should be done: revisiting the default ignore, and we maybe should support nested gitignores. I guess I can keep this open, though one/two separate issues might be better. |
Feel free to track however you want, I just asked for the sake of clarification and my own edification. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Git supports nested
.gitignore
files. The presence of such a file inside the project's source currently breaks editable installs with the following traceback:The problem is here because
".gitignore".split(".", 1)[0] == ""
, which is an invalid argument topath.with_name
.We could fix this specifically for
.gitignore
by adding it to the list of ignored files. However, that wouldn't fix the general case of adding an arbitrary hidden file (e.g. consider config files for linters like .flake8 or tools like .bumpversion). The current easiest workaround would be to add such files tosdist.exclude
, but that wouldn't work if a hidden file was actually important for the functioning of a package (I'm less concerned with linter configs etc since nobody should be developing off an sdist).The text was updated successfully, but these errors were encountered: