gnu: python-pathpy: Build documentation.

* gnu/packages/python.scm (python-pathpy, python2-pathpy)
  [output] Add output "doc".
  [native-inputs]: Add python-sphinx and python-rst.linker
  [build-doc], [install-doc]: New build phases.
This commit is contained in:
Hartmut Goebel 2016-10-16 21:48:40 +02:00
parent fe94cf0cdd
commit 2887700e4d
No known key found for this signature in database
GPG Key ID: 634A8DFFD3F631DF
1 changed files with 20 additions and 0 deletions

View File

@ -4398,13 +4398,33 @@ them as the version argument or in a SCM managed file.")
"path.py/path.py-" version ".tar.gz"))
(sha256
(base32 "1p8s1l2vfkqhqxdhqlj0g1jjw4f1as2frr35sjcpjjpd5a89y41f"))))
(outputs '("out" "doc"))
(build-system python-build-system)
(propagated-inputs
`(("python-appdirs" ,python-appdirs)))
(native-inputs
`(("python-setuptools-scm" ,python-setuptools-scm)
("python-sphinx" ,python-sphinx)
("python-rst.linker" ,python-rst.linker)
("python-pytest" ,python-pytest)
("python-pytest-runner" ,python-pytest-runner)))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'build 'build-doc
(lambda _
(setenv "LANG" "en_US.UTF-8")
(zero? (system* "python" "setup.py" "build_sphinx"))))
(add-after 'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((data (string-append (assoc-ref outputs "doc") "/share"))
(doc (string-append data "/doc/" ,name "-" ,version))
(html (string-append doc "/html")))
(mkdir-p html)
(for-each (lambda (file)
(copy-file file (string-append doc "/" file)))
'("README.rst" "CHANGES.rst"))
(copy-recursively "build/sphinx/html" html)))))))
(home-page "http://github.com/jaraco/path.py")
(synopsis "Python module wrapper for built-in os.path")
(description