mirror of
https://github.com/borgbackup/borg.git
synced 2026-04-01 15:15:59 -04:00
patch msgpack to use relative imports
patch by felix schwarz, thanks!
This commit is contained in:
parent
383807aed7
commit
abda1a4463
5 changed files with 13 additions and 13 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# coding: utf-8
|
||||
from msgpack._version import version
|
||||
from msgpack.exceptions import *
|
||||
from ._version import version
|
||||
from .exceptions import *
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
|
|
@ -19,13 +19,13 @@ class ExtType(namedtuple('ExtType', 'code data')):
|
|||
|
||||
import os
|
||||
if os.environ.get('MSGPACK_PUREPYTHON'):
|
||||
from msgpack.fallback import Packer, unpackb, Unpacker
|
||||
from .fallback import Packer, unpackb, Unpacker
|
||||
else:
|
||||
try:
|
||||
from msgpack._packer import Packer
|
||||
from msgpack._unpacker import unpackb, Unpacker
|
||||
from ._packer import Packer
|
||||
from ._unpacker import unpackb, Unpacker
|
||||
except ImportError:
|
||||
from msgpack.fallback import Packer, unpackb, Unpacker
|
||||
from .fallback import Packer, unpackb, Unpacker
|
||||
|
||||
|
||||
def pack(o, stream, **kwargs):
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ from cpython cimport *
|
|||
from cpython.version cimport PY_MAJOR_VERSION
|
||||
from cpython.exc cimport PyErr_WarnEx
|
||||
|
||||
from msgpack.exceptions import PackValueError, PackOverflowError
|
||||
from msgpack import ExtType
|
||||
from .exceptions import PackValueError, PackOverflowError
|
||||
from . import ExtType
|
||||
|
||||
|
||||
cdef extern from "Python.h":
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@ from libc.string cimport *
|
|||
from libc.limits cimport *
|
||||
ctypedef unsigned long long uint64_t
|
||||
|
||||
from msgpack.exceptions import (
|
||||
from .exceptions import (
|
||||
BufferFull,
|
||||
OutOfData,
|
||||
UnpackValueError,
|
||||
ExtraData,
|
||||
)
|
||||
from msgpack import ExtType
|
||||
from . import ExtType
|
||||
|
||||
|
||||
cdef extern from "unpack.h":
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ else:
|
|||
newlist_hint = lambda size: []
|
||||
|
||||
|
||||
from msgpack.exceptions import (
|
||||
from .exceptions import (
|
||||
BufferFull,
|
||||
OutOfData,
|
||||
UnpackValueError,
|
||||
|
|
@ -57,7 +57,7 @@ from msgpack.exceptions import (
|
|||
PackOverflowError,
|
||||
ExtraData)
|
||||
|
||||
from msgpack import ExtType
|
||||
from . import ExtType
|
||||
|
||||
|
||||
EX_SKIP = 0
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef MSGPACK_UNPACK_DEFINE_H__
|
||||
#define MSGPACK_UNPACK_DEFINE_H__
|
||||
|
||||
#include "msgpack/sysdep.h"
|
||||
#include "sysdep.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
|
|
|||
Loading…
Reference in a new issue