mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Minor fixups for changes when removing py3 conditionals
This commit is contained in:
parent
764e8bff7e
commit
520c46dfb9
@ -769,16 +769,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"name": "enum34",
|
|
||||||
"python": "<3",
|
|
||||||
"unix": {
|
|
||||||
"filename": "enum34-1.1.6.tar.gz",
|
|
||||||
"hash": "sha256:8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1",
|
|
||||||
"urls": ["pypi"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "sip",
|
"name": "sip",
|
||||||
"unix": {
|
"unix": {
|
||||||
|
@ -218,8 +218,8 @@ def init_env():
|
|||||||
class Build(Command):
|
class Build(Command):
|
||||||
|
|
||||||
short_description = 'Build calibre C/C++ extension modules'
|
short_description = 'Build calibre C/C++ extension modules'
|
||||||
DEFAULT_OUTPUTDIR = os.path.abspath(os.path.join(SRC, 'calibre', 'plugins', sys.version_info.major))
|
DEFAULT_OUTPUTDIR = os.path.abspath(os.path.join(SRC, 'calibre', 'plugins', str(sys.version_info.major)))
|
||||||
DEFAULT_BUILDDIR = os.path.abspath(os.path.join(os.path.dirname(SRC), 'build', sys.version_info.major))
|
DEFAULT_BUILDDIR = os.path.abspath(os.path.join(os.path.dirname(SRC), 'build', str(sys.version_info.major)))
|
||||||
|
|
||||||
description = textwrap.dedent('''\
|
description = textwrap.dedent('''\
|
||||||
calibre depends on several python extensions written in C/C++.
|
calibre depends on several python extensions written in C/C++.
|
||||||
|
@ -150,7 +150,7 @@ def cache_dir():
|
|||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
|
||||||
plugins_loc = os.path.join(sys.extensions_location, sys.version_info.major)
|
plugins_loc = os.path.join(sys.extensions_location, str(sys.version_info.major))
|
||||||
|
|
||||||
|
|
||||||
# plugins {{{
|
# plugins {{{
|
||||||
|
@ -121,3 +121,19 @@ def int_to_byte(x):
|
|||||||
def reload(module):
|
def reload(module):
|
||||||
import importlib
|
import importlib
|
||||||
return importlib.reload(module)
|
return importlib.reload(module)
|
||||||
|
|
||||||
|
|
||||||
|
def print_to_binary_file(fileobj, encoding='utf-8'):
|
||||||
|
|
||||||
|
def print(*a, **kw):
|
||||||
|
f = kw.get('file', fileobj)
|
||||||
|
if a:
|
||||||
|
sep = as_bytes(kw.get('sep', ' '), encoding)
|
||||||
|
for x in a:
|
||||||
|
x = as_bytes(x, encoding)
|
||||||
|
f.write(x)
|
||||||
|
if x is not a[-1]:
|
||||||
|
f.write(sep)
|
||||||
|
f.write(as_bytes(kw.get('end', '\n')))
|
||||||
|
|
||||||
|
return print
|
||||||
|
Loading…
x
Reference in New Issue
Block a user