#Hatch package renaming

1 messages ยท Page 1 of 1 (latest)

hushed rover
#

Here is my full file (I removed some useless keys)

[project]
name = "sdl-eve"
dynamic = ["version"]
readme = "README.md"
requires-python = ">=3.12"

[version]
path = "eve/environment/__init__.py"

[project.scripts]
eve = "eve.main:run"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[build]
include = ["eve"]
exclude = [
  "coverage",
  ".eve",
  ".walle",
  "tests",
  "scripts",
]

[build.targets.sdist]
only-include = ["eve"]

[build.targets.wheel]
only-include = ["eve"]

[envs.default]
python = "3.12"
installer = "uv"
dependencies = [
  "alive-progress>=3.1.5",
  "annotated_types>=0.7.0",
  "certifi>=2024.2.2",
  "click-option-group>=0.5.6",
  "httpx>=0.27.0",
  "keyring>=25.2.1",
  "ldap3>=2.9.1",
  "natsort>=8.4.0",
  "platformdirs>=4.2.2",
  "prompt-toolkit>=3.0.45",
  "pydantic>=2.7.2",
  "pydantic-core>=2.18.3",
  "PyYAML>=6.0.1",
  "requests>=2.23.3",
  "rich>=13.7.1",
  "rich-click==1.7.4",
  "tenacity>=8.3.0,<8.4.0",
  "toml>=0.10.2",
]

[envs.hatch-test]
installer = "uv"
default-args = ["tests"]
extra-args = ["-vv"]
parallel = true
randomize = true
extra-dependencies = [
  "freezegun>=1.5.1",
  "pylint>=3.2.2",
  "pytest-cov>=5.0.0",
  "pytest-subtests>=0.12.1",
  "pytest-asyncio>=0.23.7",
  "pytest-httpx>=0.30.0",
  "types-ldap3>=2.9.13.20240205",
  "types-PyYAML>=6.0.12.20240311",
  "types-requests>=2.32.0.20240523",
  "types-toml>=0.10.8.20240310",
]

[[envs.hatch-test.matrix]]
python = ["3.12", "3.11", "3.10", "3.9"]
#

Hatch package name renaming

#

Hatch package renaming

fervent gull
#

first off, your config is missing the tool prefix (assuming your example is just one file)

hushed rover
#

Maybe I forgot to mention it ๐Ÿ™‚

fervent gull
#

build-system and project belong in pyproject.toml only

hushed rover
#

Oh! Ok I see! Interesting

fervent gull
#

that is a standard that other tools use as well so it belongs in that file

hushed rover
#

Ok, I think I see !

#

Will try to put everything inside the pyproject.toml

fervent gull
#

next, you should try to never use the top level global config build table because inheritance is difficult to reason about so I would recommend only using config for specific targets like at the end of your example. also your exclusion array probably should go in your .gitignore if you have one because that file is respected all the time

hushed rover
#

Thank you so much it's working now!!!
I also moved the dependencies of the default env to the [project] dependencies, allowing the hatch-test to get them!

#

Thank you very much @fervent gull you're helping me a lot. Thanks !! Will now try to setup PyApp from hatch ๐Ÿ™‚