|
|
|
@ -22,19 +22,6 @@ SITE_PACKAGES = os.path.join(get_python_lib(), "capstone") |
|
|
|
|
|
|
|
|
|
SETUP_DATA_FILES = [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class LazyList(list): |
|
|
|
|
"""A list which re-evaluates each time. |
|
|
|
|
This is used to provide late binding for setup() below. |
|
|
|
|
""" |
|
|
|
|
def __init__(self, callback): |
|
|
|
|
super(LazyList, self).__init__() |
|
|
|
|
self.callback = callback |
|
|
|
|
|
|
|
|
|
def __iter__(self): |
|
|
|
|
return iter(self.callback()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def copy_sources(): |
|
|
|
|
"""Copy the C sources into the source directory. |
|
|
|
|
This rearranges the source files under the python distribution |
|
|
|
@ -158,7 +145,7 @@ setup( |
|
|
|
|
libraries=[( |
|
|
|
|
'capstone', dict( |
|
|
|
|
package='capstone', |
|
|
|
|
sources=LazyList(dummy_src) |
|
|
|
|
sources=dummy_src() |
|
|
|
|
), |
|
|
|
|
)], |
|
|
|
|
|
|
|
|
|