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
Branch
feature/doc-url
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12163
Build 18452: Phabricator diff pipeline on jenkins
Build 18451: arc lint + arc unit

Event Timeline

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.