Option to include our project itself in generated requirements.txt

Aperta
#63 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Inizia esaminando il workflow esistente di poetry export e il modo in cui poetry build produce wheel e archivi del codice sorgente. Confronta i due approcci proposti e la soluzione alternativa tramite script riportata. Il lavoro è completato quando un workflow supportato genera un file dei requirements contenente la versione dell’applicazione, i pin delle dipendenze e gli hash degli artefatti di build dell’applicazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

I'm developing an application with Poetry, which I would like to deploy on a different system. I am building and publishing a wheel for the application. I would like to deploy the exact same version of all dependencies that the application was tested with.

To do this, I'm using poetry export to generate a requirements.txt file which contains pinned versions + hashes for all dependencies. On the target machine, this is then deployed using pip install -r requirements.txt. This all works fine.

What is missing from requirements.txt though is the application itself. So I have to issue a separate command to install the application. And if there are multiple versions to choose from, I have to be careful to use pip install application==1.2.3 and use the requirements.txt file for version 1.2.3. This seems like extra work that shouldn't be needed and can lead to mistakes.

What I'd like to have is a requirements.txt file that includes the application itself as well, including the hashes for the build artifacts (wheels + source tarball). That way, a single pip install -r can install both the application and its dependencies and we know for sure that the application version and dependency versions will match.

I managed to produce such a requirements.txt file using some scripting, but it would be nicer if Poetry supported this out of the box. One approach would be to have an extra option to poetry export to include the build results in the output. A different approach would be to have an extra option to poetry build which appends the application version + hashes to an existing requirements file. Either solution would be fine for me, but maybe one is better than the other in different scenarios.

Lingua principale
Python
Stelle
336
Fork
59
Merge medio
10m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-poetry/poetry-plugin-export

Tutte le issue di python-poetry/poetry-plugin-export

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.