Coder Social home page Coder Social logo

Comments (4)

cpburnz avatar cpburnz commented on July 18, 2024

@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?


Example

Files:

  • .gitignore
  • pyproject.toml
  • issue_64/
    • __init__.py
    • issue_64.py

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 python3.8 -m build is:

* Creating venv isolated environment...
* Installing packages in isolated environment... (hatchling)
* Getting build dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating venv isolated environment...
* Installing packages in isolated environment... (hatchling)
* Getting build dependencies for wheel...
* Building wheel...
Successfully built issue_64-0.0.1.tar.gz and issue_64-0.0.1-py2.py3-none-any.whl

from python-pathspec.

cpburnz avatar cpburnz commented on July 18, 2024

@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://[email protected]/cpburnz/python-pathspec.git@detect-64",
]

A GitWildMatchPatternError error will be raised instead of the IndexError, and it will contain the info. When you get a chance, please try this and let me know what the resulting error is.

from python-pathspec.

haimat avatar haimat commented on July 18, 2024

Ok I found the problem in my pyproject.toml file:

include = [
  "**"
]

As soon as I have removed this option, everything was fine again.

from python-pathspec.

cpburnz avatar cpburnz commented on July 18, 2024

@haimat Thanks, the ** pattern is now fixed in the new release v0.10.2.

from python-pathspec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.