Che cosa fa esattamente lo python setup.py check
?Cosa fa effettivamente `python setup.py check`?
risposta
Prima tappa, il distutils
package documentation:
Il comando di controllo esegue alcuni test sui meta-dati di un pacchetto. Ad esempio, verifica che tutti i meta-dati richiesti siano forniti come argomenti passati alla funzione
setup()
.
Quindi verifica se i metadati sono stati compilati correttamente; vederlo come una fase di controllo della qualità durante la creazione di un pacchetto Python.
Avanti, siamo in grado di verificare se la riga di comando offre alcun aiuto:
$ python setup.py --help-commands | grep check
check perform some checks on the package
$ python setup.py check --help
# ...
Options for 'check' command:
--metadata (-m) Verify meta-data
--restructuredtext (-r) Checks if long string meta-data syntax are
reStructuredText-compliant
--strict (-s) Will exit with an error if a check fails
in modo che possiamo verificare la presenza di metadati e convalida la descrizione finché reStructuredText. Quest'ultimo richiede di avere docutils
installato:
$ python setup.py check -rs
running check
error: The docutils package is needed.
Se non avete installato e non ci sono problemi, lo script appena viene eseguito e le uscite senza messaggi:
$ python setup.py check -r
running check
ma se metadati richiesti è si ottiene mancanti messaggi di avviso:
$ python setup.py check -r
running check
warning: check: missing required meta-data: url
warning: check: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied
che diventa un errore se si ha la bandiera -s
dato:
$ python setup.py check -rs
running check
warning: check: missing required meta-data: url
warning: check: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied
error: Please correct your package.
Per impostazione predefinita, -m
è abilitato, -r
e -s
sono disabilitati.
Vedere anche command source code.
- 1. Cosa fa esattamente "setup.py clean"?
- 2. cosa fa "make check"?
- 3. Cosa fa effettivamente Process.Dispose()?
- 4. Cosa fa effettivamente session_register_shutdown?
- 5. Cosa fa effettivamente "__COMPAT_LAYER"?
- 6. Cosa fa mysqli_store_result() Effettivamente?
- 7. Cosa fa effettivamente addChildViewController?
- 8. Cosa fa effettivamente XCode 'Clean'?
- 9. cosa fa effettivamente l'istruzione di assemblaggio 'db'?
- 10. Cosa fa effettivamente il metodo Dns.GetHostEntry (String)?
- 11. Nome metodo vuoto, cosa fa effettivamente?
- 12. Che cosa fa effettivamente ifstream :: rdbuf()?
- 13. Math.floor (Math.random()) cosa fa effettivamente +1?
- 14. Che cosa fa l'argomento `platforms` su` setup() `in` setup.py`?
- 15. Che cosa fa effettivamente la funzione $ in haskell?
- 16. Cosa fa effettivamente Travis-CI nello sviluppo di PHP?
- 17. Cosa fa effettivamente "trust proxy" in express.js e devo usarlo?
- 18. Cosa fa effettivamente "l'interfaccia principale" in Xcode * do *?
- 19. Cosa fa effettivamente il controllo del gestore di script?
- 20. Cosa fa raise in Python?
- 21. Cosa fa l'oggetto Python Ellipsis?
- 22. autotools e python setup.py
- 23. Cosa restituisce effettivamente jquery $?
- 24. Python setup.py sviluppare vs installare
- 25. Cosa fa yield in python 2.7?
- 26. Cosa fa l'operatore di omissione (^) in Python?
- 27. Che cosa fa Eval() di Python?
- 28. Cosa fa questa funzione? (Iteratori di Python)
- 29. Cosa fa esattamente KFold in python?
- 30. Cosa fa | = (ior) fare in Python?