[Python] How to migrate from a simple Python project : requirements.txt setup.py (setuptools),...

Discussão em 'Python' iniciado por Stack, Fevereiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    If I want to use uv in an already existing project named my_project with only a requirements.txt (or requirements.in), and simple setup.py(setuptools), that has been installed with pip install -e ..

    How would I switch from setuptools to uv?

    If my project has this file configuration:

    my_project
    ├── my_project
    │ └── hello.py
    ├── tests
    │ └── test_hello.py
    ├── Makefile
    ├── README.md
    ├── requirements.txt
    └── setup.py


    The uv documentation offer two type of projects organisation, the app (uv init --app example-app) that correspond to the one I have, and the library one uv init --lib example-lib, which is based on a src layout organisation.

    uv allows to publish a library directly on Pypi, do I need to change my layout for a src one if I want to deploy library with uv?

    Continue reading...

Compartilhe esta Página