Page MenuHomeSoftware Heritage

setup.py: add documentation link
ClosedPublic

Authored by zack on Apr 29 2020, 6:16 PM.

Details

Summary

this will make the doc link appear in the PyPI homepage

if this is OK, after the diff is accepted I'll mass commit the result of
running the following script with mr run, which will add the Documentation
links to all our packages:

#!/bin/bash

if ! [ -f setup.py ] ; then
    # nothing to do, skip
    exit 0
fi
if grep -q Documentation setup.py ; then
    # already done, skip
    exit 0
fi

repo_name=$(basename $(pwd))
doc_link="\"Documentation\": \"https://docs.softwareheritage.org/devel/${repo_name}/\","

sed -i "/\"Source\":/a\ \ \ \ \ \ \ \ ${doc_link}" setup.py

Diff Detail

Repository
rDTPL Python module template
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

zack created this revision.Apr 29 2020, 6:16 PM
olasd accepted this revision.Apr 29 2020, 6:22 PM
olasd added a subscriber: olasd.

Yep, I think this makes sense.

As suggested on irc, don't bother with the '\ 's and run black on the resulting mangled file instead :p

This revision is now accepted and ready to land.Apr 29 2020, 6:22 PM
This revision was landed with ongoing or failed builds.Apr 29 2020, 6:24 PM
This revision was automatically updated to reflect the committed changes.