##// END OF EJS Templates
cffi: put compiled modules into mercurial.cffi package...
Yuya Nishihara -
r32506:2dcb3d52 default
parent child Browse files
Show More
@@ -4,7 +4,7 b' import cffi'
4 4 import os
5 5
6 6 ffi = cffi.FFI()
7 ffi.set_source("_bdiff_cffi",
7 ffi.set_source("mercurial.cffi._bdiff",
8 8 open(os.path.join(os.path.join(os.path.dirname(__file__), '..'),
9 9 'bdiff.c')).read(), include_dirs=['mercurial'])
10 10 ffi.cdef("""
@@ -6,7 +6,7 b' import os'
6 6 ffi = cffi.FFI()
7 7 mpatch_c = os.path.join(os.path.join(os.path.dirname(__file__), '..',
8 8 'mpatch.c'))
9 ffi.set_source("_mpatch_cffi", open(mpatch_c).read(),
9 ffi.set_source("mercurial.cffi._mpatch", open(mpatch_c).read(),
10 10 include_dirs=["mercurial"])
11 11 ffi.cdef("""
12 12
@@ -3,7 +3,7 b' from __future__ import absolute_import'
3 3 import cffi
4 4
5 5 ffi = cffi.FFI()
6 ffi.set_source("_osutil_cffi", """
6 ffi.set_source("mercurial.cffi._osutil", """
7 7 #include <sys/attr.h>
8 8 #include <sys/vnode.h>
9 9 #include <unistd.h>
@@ -96,7 +96,7 b' def fixws(text, allws):'
96 96
97 97 if modulepolicy not in policynocffi:
98 98 try:
99 from _bdiff_cffi import ffi, lib
99 from ..cffi._bdiff import ffi, lib
100 100 except ImportError:
101 101 if modulepolicy == 'cffi': # strict cffi import
102 102 raise
@@ -130,7 +130,7 b' def patchedsize(orig, delta):'
130 130
131 131 if modulepolicy not in policynocffi:
132 132 try:
133 from _mpatch_cffi import ffi, lib
133 from ..cffi._mpatch import ffi, lib
134 134 except ImportError:
135 135 if modulepolicy == 'cffi': # strict cffi import
136 136 raise
@@ -71,7 +71,7 b' def listdirpure(path, stat=False, skip=N'
71 71 ffi = None
72 72 if modulepolicy not in policynocffi and pycompat.sysplatform == 'darwin':
73 73 try:
74 from _osutil_cffi import ffi, lib
74 from ..cffi._osutil import ffi, lib
75 75 except ImportError:
76 76 if modulepolicy == 'cffi': # strict cffi import
77 77 raise
@@ -582,6 +582,7 b" cmdclass = {'build': hgbuild,"
582 582
583 583 packages = ['mercurial',
584 584 'mercurial.cext',
585 'mercurial.cffi',
585 586 'mercurial.hgweb',
586 587 'mercurial.httpclient',
587 588 'mercurial.pure',
General Comments 0
You need to be logged in to leave comments. Login now