Fix sequencing of imports in manual build scripts

This commit is contained in:
Kovid Goyal 2024-03-30 13:14:29 +05:30
parent c3595c7b6c
commit 40de487795
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 5 deletions

View File

@ -17,11 +17,10 @@ BASE = d(a(__file__))
SPHINX_BUILD = ['sphinx-build']
sys.path.insert(0, d(BASE))
from calibre.ebooks.oeb.polish.container import epub_to_azw3
from setup import __appname__, __version__
sys.path.remove(d(BASE))
from calibre.ebooks.oeb.polish.container import epub_to_azw3
def sphinx_build(language, base, builder='html', bdir='html', t=None, quiet=True, very_quiet=False):

View File

@ -18,15 +18,17 @@ from datetime import date
# If your extensions are in another directory, add it here.
base = os.path.dirname(os.path.abspath(__file__))
sys.path.append(base)
sys.path.insert(0, os.path.dirname(base))
from setup import __appname__, __version__
sys.path.append(base)
import calibre.utils.img as cimg
import custom
from calibre.utils.localization import localize_website_link
from setup import __appname__, __version__
del sys.path[0]
custom, cimg
# General configuration
# ---------------------