-
Notifications
You must be signed in to change notification settings - Fork 39
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
IndexError with my .gitignore file when trying to build a Python package #64
Comments
@haimat Thanks for reporting this. I'm uncertain if this is a bug with pathspec or hatchling. I haven't been able to reproduce this using a simple project using hatchling (see example below). What do you have in your pyproject.toml? In particular, what are your settings for hatchling and hatch? What's the folder structure of your project? ExampleFiles:
pyproject.toml contains: [build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "issue_64"
version = "0.0.1" .gitignore is from https://github.com/github/gitignore/blob/main/Python.gitignore. issue_64/__init__.py is empty. issue_64/issue_64.py is empty. The output from
|
@haimat I have a way to debug this. I created a new branch which will rethrow the error with some debugging information. Modify your pyproject.toml to include: [build-system]
requires = [
"hatchling",
# Inject debug build of pathspec.
"pathspec @ git+ssh://git@github.com/cpburnz/python-pathspec.git@detect-64",
] A |
Ok I found the problem in my include = [
"**"
] As soon as I have removed this option, everything was fine again. |
@haimat Thanks, the |
Problem description
I am trying to package my Python project/library. So first I created a
pyproject.toml
file, following the official Python docs, using hatchling - no fancy stuff here. Then, after upgrading to the latestbuild
version, I ran this command from within the root folder of my project:I do have a
.gitignore
file in my root folder, however, it includes only the default Python project template from Github.Any ideas what is causing this error?
The text was updated successfully, but these errors were encountered: