all 21 comments

sorted by: hot top controversial new old
[–] 18 points 1 year ago (5 children)

Using the UV hashbang and a few doc strings for dependencies so you can run full on python scripts as executables is fucking crack.

  • source
  • hideshow 5 child comments
  • [–] 6 points 1 year ago (4 children)

    I have an idea of what this might look like, but do you have any examples I can crib from?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 7 points 1 year ago (3 children)
  • [–] 6 points 1 year ago (3 children)

    Does it allow differentiating between dependencies and dev dependencies though? I couldn't gather that from the article.

  • source
  • hideshow 3 child comments
  • [–] 10 points 1 year ago

    UV has a shitload of features. I've only ever really used it for making virtualemvs for easier cross platform compatibility, but even just for that, there's tons of options related to which packages, from where, etc.

    tl:dr probably, although differentiating between "deploy" and "dev" installs is the task of the package config which UV doesn't (to my knowledge) replace in any way.

  • source
  • parent
  • wreck can. It's venv aware. Takes full advantage of hierarchical requirement files. Is intuitive. The learning curve is minimal. Written in Python.

    [[tool.wreck.venvs]]
    venv_base_path = '.venv'
    reqs = [
        'requirements/pip',
        'requirements/pip-tools',
        'requirements/prod',
        'requirements/dev',
        'requirements/manage',
        'requirements/kit',
        'requirements/mypy',
        'requirements/tox',
    ]
    [[tool.wreck.venvs]]
    venv_base_path = '.doc/.venv'
    reqs = [
        'docs/requirements',
        'docs/pip-tools',
    ]
    
    [tool.setuptools.dynamic]
    dependencies = { file = ['requirements/prod.unlock'] }
    optional-dependencies.pip = { file = ['requirements/pip.lock'] }
    optional-dependencies.pip_tools = { file = ['requirements/pip-tools.lock'] }
    optional-dependencies.dev = { file = ['requirements/dev.lock'] }
    optional-dependencies.manage = { file = ['requirements/manage.lock'] }
    optional-dependencies.docs = { file = ['docs/requirements.lock'] }
    

    reqs fix --venv-relpath='.venv'

    reqs fix --venv-relpath='.doc/.venv'

    From *.in requirements files would produce *.unlock and *.lock files for venv .venv. Package versions are sync'ed within all requirements files within that venv.

  • source
  • parent
  • [–] 14 points 1 year ago (7 children)

    And it isn't even written in Python!

  • source
  • hideshow 7 child comments
  • [–] 27 points 1 year ago (2 children)

    spoiler alert: Python isn’t written in Python

  • source
  • parent
  • hideshow 2 child comments
  • That means it can't be maintained by the community it's serving. For those skilled in both Rust and Python can understand why it would appear as the best thing since sliced bread.

    What about for those not skilled in Rust? Should we also learn 15 other coding languages while we are at it?

    wreck is written in Python and manages dependencies. via hierarchy of requirements files, not TOML. It's venv aware. For Python package authors.

  • source
  • parent
  • [–] -1 points 1 year ago

    They kind of lost me at piping a script to sh. Is this the official way? Get your shit packaged into the popular distros. DevOps isn't that hard.

  • source
  • [–] 0 points 1 year ago* (1 child)

    example of using uv to install a python tool:

    uv tool install harlequin
    

    nice! It just works (harlequin.sh is a python program that allows to interact with databases using SQL qury langues, you can also load csv and json data)

  • source
  • hideshow 1 child comment
  • 1 comment in c/python@lemmy.sdf.org view that post
    [–] 1 point 10 months ago*

    Can uv solve my problems described here:

    https://lemmy.sdf.org/post/47854595

    ?

    I must say I hate the name. β€œuv” is not searchable. But hopefully it can serve as the first decent pkg manager.

  • source