mirror of
https://github.com/NaN-tic/trytond-documentation.git
synced 2023-12-14 03:03:00 +01:00
Upgrade to new path.py API
Also upgrade dependencies version as oldver versions did not support the new path.py API
This commit is contained in:
parent
f418600a47
commit
b047a4fe9d
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
import glob
|
||||
import tempfile
|
||||
from path import path
|
||||
from path import Path
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
except ImportError:
|
||||
|
@ -128,17 +128,17 @@ class BuildDocumentation(Wizard):
|
|||
@classmethod
|
||||
def create_symlinks(cls, origin):
|
||||
for module_doc_dir in glob.glob('%s/*/doc/%s' % (origin, build_lang)):
|
||||
module_name = str(path(module_doc_dir).parent.parent.basename())
|
||||
symlink = path(build_folder).joinpath(module_name)
|
||||
module_name = str(Path(module_doc_dir).parent.parent.basename())
|
||||
symlink = Path(build_folder).joinpath(module_name)
|
||||
if not symlink.exists():
|
||||
path(build_folder).relpathto(
|
||||
path(module_doc_dir)).symlink(symlink)
|
||||
Path(build_folder).relpathto(
|
||||
Path(module_doc_dir)).symlink(symlink)
|
||||
|
||||
@classmethod
|
||||
def make_link(cls, origin, destination):
|
||||
directory = os.path.dirname(destination)
|
||||
if not os.path.exists(destination):
|
||||
path(directory).relpathto(path(origin)).symlink(destination)
|
||||
Path(directory).relpathto(Path(origin)).symlink(destination)
|
||||
|
||||
@classmethod
|
||||
def make_doc(cls):
|
||||
|
|
4
setup.py
4
setup.py
|
@ -43,8 +43,8 @@ minor_version = int(minor_version)
|
|||
name = 'trytonspain_documentation'
|
||||
download_url = 'https://bitbucket.org/trytonspain/trytond-documentation'
|
||||
|
||||
requires = ['hgapi', 'Sphinx >= 1.4.0', 'trydoc >= 0.12',
|
||||
'sphinxcontrib-inheritance >= 0.8', 'jinja2']
|
||||
requires = ['hgapi', 'Sphinx', 'trydoc >= 0.13',
|
||||
'sphinxcontrib-inheritance >= 0.9', 'jinja2', 'path.py>=10']
|
||||
for dep in info.get('depends', []):
|
||||
if not re.match(r'(ir|res)(\W|$)', dep):
|
||||
prefix = MODULE2PREFIX.get(dep, 'trytond')
|
||||
|
|
Loading…
Reference in a new issue