Skip to contentSkip to conversation

bindings: python: move long_description into README.md

PATCH Applied Phil Howard 2 participants 3 messages Oct 17, 2023 – Oct 24, 2023 GPIO

lore
Share & tools
lore
#0 lore raw

cover bindings: python: move long_description into README.md

Move the long_description text from setup.py (which appears as the description on pypi) into a separate README.md and include it in the project.

This README assumes that "bindings: python: optionally include module in sdist" has been applied and that the pypi package will be uploaded to "gpiod", replacing the unofficial pure-Python bindings that currently live there.

It also includes some very basic usage examples.

Phil Howard (1):
bindings: python: move long_description into README.md

 bindings/python/MANIFEST.in |   1 +
 bindings/python/README.md   | 104 ++++++++++++++++++++++++++++++++++++
 bindings/python/setup.py    |   4 +-
 3 files changed, 107 insertions(+), 2 deletions(-)
 create mode 100644 bindings/python/README.md
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/1 bindings: python: move long_description into README.md

Move the long_description into README.md and include some basic information about libgpiod, and some simple Python example code.

---
 bindings/python/MANIFEST.in |   1 +
 bindings/python/README.md   | 104 ++++++++++++++++++++++++++++++++++++
 bindings/python/setup.py    |   4 +-
 3 files changed, 107 insertions(+), 2 deletions(-)
 create mode 100644 bindings/python/README.md
bindings/python/MANIFEST.in +1 -0
index c7124d4..459b317 100644
@@ -2,6 +2,7 @@
 # SPDX-FileCopyrightText: 2023 Bartosz Golaszewski <[email protected]>
 
 include setup.py
+include README.md
 
 recursive-include gpiod *.py
 recursive-include tests *.py
bindings/python/README.md new file +104 -0

104 lines not on this page · raw message

bindings/python/setup.py +2 -2
index df10e18..98b377f 100644
@@ -67,8 +67,8 @@ setup(
     author="Bartosz Golaszewski",
     author_email="[email protected]",
     description="Python bindings for libgpiod",
-    long_description="This is a package spun out of the main libgpiod repository containing " \
-                     "python bindings to the underlying C library.",
+    long_description=open("README.md", "r").read(),
+    long_description_content_type="text/markdown",
     platforms=["linux"],
     license="LGPLv2.1",
 )
Signature · 1 line
2.34.1
#2 lore raw
Quoted 4 lines · Phil Howard

Move the long_description into README.md and include some basic information about libgpiod, and some simple Python example code.

Quoted 8 lines
---
 bindings/python/MANIFEST.in |   1 +
 bindings/python/README.md   | 104 ++++++++++++++++++++++++++++++++++++
 bindings/python/setup.py    |   4 +-
 3 files changed, 107 insertions(+), 2 deletions(-)
 create mode 100644 bindings/python/README.md

Applied, thanks!

Bart