def run(self): from pybtex.database.convert import convert bibtex_yaml = os.path.join('examples', 'xampl.yaml') bibtexml = os.path.join('examples', 'xampl.bibtexml') bibtex = os.path.join('examples', 'xampl.bib') if not os.path.exists(bibtex_yaml) or newer(bibtex, bibtex_yaml): convert(bibtex, bibtex_yaml) if not os.path.exists(bibtexml) or newer(bibtex, bibtexml): convert(bibtex, bibtexml) from pybtex.docgen import generate_docs generate_docs(os.path.join(ROOT, 'docs'), ('html', 'manpages')) sdist.run(self)
#!/usr/bin/env python import sys from os import path from pybtex.docgen import generate_docs if __name__ == '__main__': doc_types = sys.argv[1:] if not doc_types: doc_types = ['html', 'manpages'] generate_docs(path.dirname(__file__), doc_types)