mirror of
https://github.com/NaN-tic/trydoc.git
synced 2023-12-14 02:03:42 +01:00
Upgrade path.py > 0.10
This commit is contained in:
parent
a856a5bfd6
commit
efc473dd8f
|
@ -1,3 +1,3 @@
|
|||
path.py
|
||||
path.py>=10.0
|
||||
proteus
|
||||
Sphinx>=1.0b2
|
||||
|
|
6
setup.py
6
setup.py
|
@ -5,11 +5,11 @@ with open('README') as stream:
|
|||
long_desc = stream.read()
|
||||
|
||||
|
||||
version = "0.12"
|
||||
version = "0.13"
|
||||
requires = [
|
||||
'path.py',
|
||||
'path.py>=10.0',
|
||||
'simplejson',
|
||||
'Sphinx >= 1.0b2'
|
||||
'Sphinx>=1.0b2'
|
||||
]
|
||||
extra_require = {
|
||||
'view directive': ['tryton >= 3.2'],
|
||||
|
|
|
@ -8,7 +8,7 @@ from __future__ import print_function
|
|||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
from path import path
|
||||
from path import Path
|
||||
import os
|
||||
import re
|
||||
import simplejson
|
||||
|
@ -277,7 +277,7 @@ class ViewDirective(Figure):
|
|||
if not url:
|
||||
return []
|
||||
|
||||
source_document_path = path(self.state.document.current_source)
|
||||
source_document_path = Path(self.state.document.current_source)
|
||||
prefix = 'screenshot-' + source_document_path.basename().split('.')[0]
|
||||
_, self.filename = tempfile.mkstemp(prefix=prefix,
|
||||
suffix='.png', dir=source_document_path.parent)
|
||||
|
@ -292,7 +292,7 @@ class ViewDirective(Figure):
|
|||
else:
|
||||
sys.stdout.write("INFO: Screenshot %s in tempfile %s\n"
|
||||
% (url, self.filename))
|
||||
self.arguments[0] = path(self.filename).basename()
|
||||
self.arguments[0] = Path(self.filename).basename()
|
||||
image_node_list = Figure.run(self)
|
||||
return image_node_list
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import argparse
|
||||
import glob
|
||||
import sys
|
||||
from path import path
|
||||
from path import Path
|
||||
from sphinx.util.console import bold, nocolor, color_terminal
|
||||
|
||||
from .quickstart import choice, do_prompt, is_path
|
||||
|
@ -36,17 +36,17 @@ except NameError:
|
|||
def create_symlinks(modules_path, lang, root, remove=True):
|
||||
if remove:
|
||||
# Removing existing symlinks
|
||||
for root_file in path(root).listdir():
|
||||
for root_file in Path(root).listdir():
|
||||
if root_file.islink():
|
||||
print "removing %s" % root_file
|
||||
root_file.remove()
|
||||
|
||||
for module_doc_dir in glob.glob('%s/*/doc/%s' % (modules_path, lang)):
|
||||
print "symlink to %s" % module_doc_dir
|
||||
module_name = str(path(module_doc_dir).parent.parent.basename())
|
||||
symlink = path(root).joinpath(module_name)
|
||||
module_name = str(Path(module_doc_dir).parent.parent.basename())
|
||||
symlink = Path(root).joinpath(module_name)
|
||||
if not symlink.exists():
|
||||
path(root).relpathto(path(module_doc_dir)).symlink(symlink)
|
||||
Path(root).relpathto(Path(module_doc_dir)).symlink(symlink)
|
||||
|
||||
|
||||
def main(argv=sys.argv):
|
||||
|
|
Loading…
Reference in a new issue