Shutes Community
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
dan_p_the_dev@lemmy.world to Programming@programming.devEnglish · 1 month ago

New to Python packaging? Avoid hatch

danpassaro.dev

external-link
message-square
4
link
fedilink
15
external-link

New to Python packaging? Avoid hatch

danpassaro.dev

dan_p_the_dev@lemmy.world to Programming@programming.devEnglish · 1 month ago
message-square
4
link
fedilink
I recently built a Python library for the first time in a while, and to make it available in PyPI I followed the official Python packaging guide. But it turns out there’s some rough edges in the suggested tools. Namely, the build backend hatch puts all the files in the project directory into the built sdist, except from some files it chooses to exclude, which led to a gitignored file as well as VCS metadata getting packaged and uploaded to PyPI. This really surprised me, and I think most Python users new to packaging would be better served by choosing a conservative build backend like uv_build, which puts only the Python source modules and some specific project-level files into the sdist.
  • MadhuGururajan@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 month ago

    My setup is pyenv + venv + requirements.txt/pyproject.toml

Programming@programming.dev

programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 437 users / day
  • 1.84K users / week
  • 3.25K users / month
  • 6.41K users / 6 months
  • 1 local subscriber
  • 28.9K subscribers
  • 585 Posts
  • 4.94K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • UlrikHD@programming.dev
  • bugsmith@programming.dev
  • Spyro@programming.dev
  • BE: 0.19.19
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org