Hatch is a Python project manager. Use this tag for the Hatchling Python build back-end as well.
Questions tagged [hatch]
21 questions
3
votes
1 answer
How to define a script in the venv/bin dir with pyproject.toml (in hatch or any other wrapper)
Im unsure about the new doc on packaging with hatch and wonder if someone worked out how to define a script in a pip installable package. So in short I need to be able to direct python -m build to make a package with open_foo_bar.py as in the…

Peter Moore
- 1,632
- 1
- 17
- 31
3
votes
2 answers
Python Hatch: `ERROR: Package 'hatch-demo' requires a different Python: 3.10.5 not in '<3.10,>=3.9'`
hatch new "Hatch Demo"
cd hatch-demo
In pyproject.toml, I set:
requires-python = ">=3.9,<3.10"
I run:
hatch env create
I get:
ERROR: Package 'hatch-demo' requires a different Python: 3.10.5 not in '<3.10,>=3.9'
I have both Python 3.9 and 3.10…

clay
- 18,138
- 28
- 107
- 192
2
votes
1 answer
python pyproject.toml settings for use with hatchling to target command line app
I have a python command line app I want to package for pypi. I have followed this: https://packaging.python.org/en/latest/tutorials/packaging-projects/. The key point being that the package files are located @ \src\. The goal is…

NW_BlackDog
- 21
- 2
2
votes
1 answer
pip show does not show Summary, Home-Page, Author and License
see also https://github.com/pypa/hatch/discussions/763
This question is for the WolfgangFahl/py-3rdparty-mediawiki#92
for which
https://github.com/WolfgangFahl/py-3rdparty-mediawiki/blob/master/pyproject.toml was created as shown below.
The Summary,…

Wolfgang Fahl
- 15,016
- 11
- 93
- 186
2
votes
1 answer
Files not being included by hatchling when specified in pyproject.toml
I am trying to package my tool with Hatch and want to include some extra files found in /docs in the below directory tree:
this_project
│ .gitattributes
│ .gitignore
│ LICENSE
│ MANIFEST.in
│ pyproject.toml
│ README.md
│
├───docs
│ …

Lamma
- 895
- 1
- 12
- 26
2
votes
0 answers
IndexError with my .gitignore file when trying to build a Python package
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 latest build version, I ran this command from within…

Matthias
- 9,817
- 14
- 66
- 125
2
votes
1 answer
How does one install a package in hatch?
Hatch seems amazing, uses pip rather than an in-house installer, and I want to use it.
However, I have searched through the internet and found many indications that hatch should come with an install command accessed via hatch install. However, on…

Chris
- 28,822
- 27
- 83
- 158
1
vote
0 answers
how to include the license fie in the wheel with Hatch?
In setuptools I was used to do the following:
[tool.setuptools]
license-files = ["LICENSE.txt"]
How can I do the same using hatch ?

Pierrick Rambaud
- 1,726
- 1
- 20
- 47
1
vote
0 answers
hatch and scripts entry point in Python
I need a script to be produced by installing the package and to be put in user PATH. I've followed the Hatch guide on entry points and my directory looks like this:
.
├── docs
│ ├── conf.py
│ ├── index.rst
│ ├── make.bat
│ ├── Makefile
│ …

Luca Braglia
- 3,133
- 1
- 16
- 21
1
vote
0 answers
Include file from outside the project folder in pyproject.toml using hatch build backend
Given the following folder structure:
-folder1
-folder2
-folder3
-a.py
-pyproject.toml
-xyz.txt
And pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name =…

Ereghard
- 119
- 4
1
vote
0 answers
How to set a complete wheel filename?
I'm looking for to create a wheel filname with complete wheel filename as I can see on Pypi wheel files of many projects and avoid to use setup.cfg or other tools as it is describe at…

copter244
- 91
- 1
- 3
1
vote
0 answers
Hatch - Error after instalation of the program
Well i dont know if this is the right place to ask, but I don't know where else to go. so I was trying out Hatch and thought I just finished all of the installation, but then I get this error message:
[92m[~] [37mEnter a directory to a password…

Hampus Ramsten
- 41
- 3
0
votes
1 answer
how to included data file in distribution using hatch?
in a setuptools defined Python lib I could choose which files I wanted ton include using the following:
[tool.setuptools]
include-package-data = true
For hatch I didn't find any mention of this parameter in the documentation, is it automatic ? If…

Pierrick Rambaud
- 1,726
- 1
- 20
- 47
0
votes
0 answers
How can I set hatches when I'm using pandas.DataFrame.plot?
I'd like to plot 3 curves (using a dataframe) and I want them to have different hatches. Could you help me how to do that? I only found an option how to color the area under the curves (area plot). Thank you!
I tried to start based on this: How do I…

Bog
- 1
- 1
0
votes
1 answer
Visual Studio Code with Pylance cannot resolve imports while using hatch
When I created my project using hatch new name imports were resolved correctly. Now that I opened it again I get yellow squigly line under each import with error in tooltip:
from django.conf import settings # -> Import "django.conf" could not be…

Matija Sirk
- 596
- 2
- 15