pypa / pypa/packaging.python.org

Canonical guide to specifying dependencies?

Offen
#685 9 Kommentare 11 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

component: guides help wanted type: enhancement
Vorherrschende Sprache
Python
Sterne
1.7k
Forks
1.7k
Ø Merge
3 T. 12 Std.
Gemergte PRs (30 T.)
4

Beschreibung

We should probably have a canonical guide to installing dependencies on packaging.python.org, especially since PEP 508 has changed things like how to link to a git repository. I get a lot of questions like, "Why are my dependency links not working now?" and since I don't really use those I can just tell people, "Oh something about that changed, here's an inscrutable PEP that maybe would help"?

This could be done incrementally (and can be broken into smaller parts, providing there is "clearing house" page that links to the other pages), but it would be nice to clearly cover:

  1. The syntax for declaring dependencies
  2. The syntax for environment markers
  3. How to declare dependencies to a URL (i.e. not PyPI)
  4. The differences between what goes in a requirements.txt file and what can be declared in install_requires
  5. The use of constraints.txt files (which I think really reduces the need for requirements.txt.
  6. How to use extras.
  7. What is and is not allowed as a dependency in packages uploaded to PyPI.

Some of this is defined in various PEPs, but my understanding is that the canonical and current documentation should live on packaging.python.org.

There should also probably be a "hat note" (Wikipedia terminology) pointing to any such page from managing application dependencies to this page.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das bestehende Tutorial zum Verwalten von Anwendungsabhängigkeiten und PEP 508 zu lesen, und prüfe anschließend die aktuelle Dokumentation auf packaging.python.org auf Hinweise zu Abhängigkeiten. Ein vollständiges Ergebnis würde einen kanonischen Leitfaden bereitstellen, der die sieben aufgeführten Themen zu Abhängigkeiten abdeckt, und von dort aus im Tutorial darauf verlinken.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.