mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DRYer
This commit is contained in:
parent
0f03044db4
commit
a7fd7a0aee
@ -15,7 +15,7 @@ import time
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from bypy.constants import (
|
from bypy.constants import (
|
||||||
PREFIX, SRC as CALIBRE_DIR, SW, is64bit, python_major_minor_version
|
OUTPUT_DIR, PREFIX, SRC as CALIBRE_DIR, is64bit, python_major_minor_version
|
||||||
)
|
)
|
||||||
from bypy.pkgs.qt import PYQT_MODULES, QT_DLLS, QT_PLUGINS
|
from bypy.pkgs.qt import PYQT_MODULES, QT_DLLS, QT_PLUGINS
|
||||||
from bypy.utils import (
|
from bypy.utils import (
|
||||||
@ -252,7 +252,7 @@ def strip_binaries(env):
|
|||||||
|
|
||||||
def create_tarfile(env, compression_level='9'):
|
def create_tarfile(env, compression_level='9'):
|
||||||
print('Creating archive...')
|
print('Creating archive...')
|
||||||
base = os.path.join(SW, 'dist')
|
base = OUTPUT_DIR
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(base)
|
shutil.rmtree(base)
|
||||||
except EnvironmentError as err:
|
except EnvironmentError as err:
|
||||||
|
@ -22,12 +22,11 @@ from functools import partial, reduce
|
|||||||
from itertools import repeat
|
from itertools import repeat
|
||||||
|
|
||||||
from bypy.constants import (
|
from bypy.constants import (
|
||||||
PREFIX, PYTHON, SRC as CALIBRE_DIR, SW, python_major_minor_version
|
OUTPUT_DIR, PREFIX, PYTHON, SRC as CALIBRE_DIR, python_major_minor_version
|
||||||
)
|
)
|
||||||
from bypy.pkgs.qt import PYQT_MODULES, QT_DLLS, QT_PLUGINS
|
from bypy.pkgs.qt import PYQT_MODULES, QT_DLLS, QT_PLUGINS
|
||||||
from bypy.utils import current_dir, mkdtemp, py_compile, timeit, walk
|
from bypy.utils import current_dir, mkdtemp, py_compile, timeit, walk
|
||||||
|
|
||||||
|
|
||||||
abspath, join, basename, dirname = os.path.abspath, os.path.join, os.path.basename, os.path.dirname
|
abspath, join, basename, dirname = os.path.abspath, os.path.join, os.path.basename, os.path.dirname
|
||||||
calibre_constants = globals()['init_env']['calibre_constants']
|
calibre_constants = globals()['init_env']['calibre_constants']
|
||||||
py_ver = '.'.join(map(str, python_major_minor_version()))
|
py_ver = '.'.join(map(str, python_major_minor_version()))
|
||||||
@ -673,7 +672,7 @@ class Freeze(object):
|
|||||||
''' Copy a directory d into a dmg named volname '''
|
''' Copy a directory d into a dmg named volname '''
|
||||||
print('\nSigning...')
|
print('\nSigning...')
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
destdir = os.path.join(SW, 'dist')
|
destdir = OUTPUT_DIR
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(destdir)
|
shutil.rmtree(destdir)
|
||||||
except EnvironmentError as err:
|
except EnvironmentError as err:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user