def build_ext(): print("Building C extensions") if ISWINDOWS and platform.architecture()[0] == '64bit': print( """Detecting a 64bit Windows here. You might have problems compiling. If you do, do this: 1. Install the Windows SDK. 2. Start the Windows SDK's console. 3. Then run: setenv /x64 /release set DISTUTILS_USE_SDK=1 set MSSdk=1 4. Try the build command again. If the above fails and you are testing locally for a non-production release, then you can pass a --no-ext option to this build script to skip the extension module which will then use pure python reference implementations. """) exts = [] exts.append( Extension( '_amount', [op.join('core', 'modules', 'amount.c')], # Needed to avoid tricky compile warnings after having enabled the strict ABI extra_compile_args=['-fno-strict-aliasing'], )) setup( script_args=['build_ext', '--inplace'], ext_modules=exts, ) move_all('_amount*', op.join('core', 'model'))
def build_ext(): print("Building C extensions") if ISWINDOWS and platform.architecture()[0] == "64bit": print( """Detecting a 64bit Windows here. You might have problems compiling. If you do, do this: 1. Install the Windows SDK. 2. Start the Windows SDK's console. 3. Then run: setenv /x64 /release set DISTUTILS_USE_SDK=1 set MSSdk=1 4. Try the build command again. If the above fails and you are testing locally for a non-production release, then you can pass a --no-ext option to this build script to skip the extension module which will then use pure python reference implementations. """ ) exts = [] exts.append( Extension( "_amount", [op.join("core", "modules", "amount.c")], # Needed to avoid tricky compile warnings after having enabled the strict ABI extra_compile_args=["-fno-strict-aliasing"], ) ) setup(script_args=["build_ext", "--inplace"], ext_modules=exts) move_all("_amount*", op.join("core", "model"))
def build_pe_modules(): print("Building PE Modules") exts = [ Extension("_block", [ op.join('dupeguru', 'core', 'pe', 'modules', 'block.c'), op.join('dupeguru', 'core', 'pe', 'modules', 'common.c') ]), Extension("_cache", [ op.join('dupeguru', 'core', 'pe', 'modules', 'cache.c'), op.join('dupeguru', 'core', 'pe', 'modules', 'common.c') ]), ] exts.append( Extension("_block_osx", [ op.join('dupeguru', 'core', 'pe', 'modules', 'block_osx.m'), op.join('dupeguru', 'core', 'pe', 'modules', 'common.c') ], extra_link_args=[ "-framework", "CoreFoundation", "-framework", "Foundation", "-framework", "ApplicationServices", ])) setup( script_args=['build_ext', '--inplace'], ext_modules=exts, ) move_all('_block*', op.join('dupeguru', 'core', 'pe')) move_all('_cache*', op.join('dupeguru', 'core', 'pe'))
def build_ext(): print("Building C extensions") exts = [] exts.append( Extension( '_amount', [op.join('core', 'modules', 'amount.c')], # Needed to avoid tricky compile warnings after having enabled the strict ABI extra_compile_args=['-fno-strict-aliasing'], )) setup( script_args=['build_ext', '--inplace'], ext_modules=exts, ) move_all('_amount*', op.join('core', 'model'))
def build_ext(): print("Building C extensions") if ISWINDOWS and platform.architecture()[0] == '64bit': print("""Detecting a 64bit Windows here. You might have problems compiling. If you do, do this: 1. Install the Windows SDK. 2. Start the Windows SDK's console. 3. Then run: setenv /x64 /release set DISTUTILS_USE_SDK=1 set MSSdk=1 4. Try the build command again. """) exts = [] exts.append(Extension('_amount', [op.join('core', 'modules', 'amount.c')])) setup( script_args = ['build_ext', '--inplace'], ext_modules = exts, ) move_all('_amount*', op.join('core', 'model'))
def build_pe_modules(): print("Building PE Modules") exts = [ Extension( "_block", [ op.join("core", "pe", "modules", "block.c"), op.join("core", "pe", "modules", "common.c"), ], ), Extension( "_cache", [ op.join("core", "pe", "modules", "cache.c"), op.join("core", "pe", "modules", "common.c"), ], ), ] exts.append( Extension("_block_qt", [op.join("qt", "pe", "modules", "block.c")])) setup( script_args=["build_ext", "--inplace"], ext_modules=exts, ) move_all("_block_qt*", op.join("qt", "pe")) move_all("_block*", op.join("core", "pe")) move_all("_cache*", op.join("core", "pe"))
def build_pe_modules(ui): print("Building PE Modules") exts = [ Extension( "_block", [op.join('core', 'pe', 'modules', 'block.c'), op.join('core', 'pe', 'modules', 'common.c')] ), Extension( "_cache", [op.join('core', 'pe', 'modules', 'cache.c'), op.join('core', 'pe', 'modules', 'common.c')] ), ] if ui == 'qt': exts.append(Extension("_block_qt", [op.join('qt', 'pe', 'modules', 'block.c')])) elif ui == 'cocoa': exts.append(Extension( "_block_osx", [op.join('core', 'pe', 'modules', 'block_osx.m'), op.join('core', 'pe', 'modules', 'common.c')], extra_link_args=[ "-framework", "CoreFoundation", "-framework", "Foundation", "-framework", "ApplicationServices", ] )) setup( script_args=['build_ext', '--inplace'], ext_modules=exts, ) move_all('_block_qt*', op.join('qt', 'pe')) move_all('_block*', op.join('core', 'pe')) move_all('_cache*', op.join('core', 'pe'))
def build_pe_modules(): print("Building PE Modules") exts = [ Extension("_block", [ op.join('core', 'pe', 'modules', 'block.c'), op.join('core', 'pe', 'modules', 'common.c') ]), Extension("_cache", [ op.join('core', 'pe', 'modules', 'cache.c'), op.join('core', 'pe', 'modules', 'common.c') ]), ] exts.append( Extension("_block_qt", [op.join('qt', 'pe', 'modules', 'block.c')])) setup( script_args=['build_ext', '--inplace'], ext_modules=exts, ) move_all('_block_qt*', op.join('qt', 'pe')) move_all('_block*', op.join('core', 'pe')) move_all('_cache*', op.join('core', 'pe'))
import sys import os import os.path as op import shutil import importlib from setuptools import setup, Extension sys.path.insert(1, op.abspath('src')) from hscommon.build import move_all exts = [ Extension("_block", [op.join('modules', 'block.c'), op.join('modules', 'common.c')]), Extension("_cache", [op.join('modules', 'cache.c'), op.join('modules', 'common.c')]), Extension("_block_qt", [op.join('modules', 'block_qt.c')]), ] setup( script_args=['build_ext', '--inplace'], ext_modules=exts, ) move_all('_block_qt*', op.join('src', 'qt', 'pe')) move_all('_cache*', op.join('src', 'core/pe')) move_all('_block*', op.join('src', 'core/pe'))
import sys import os import os.path as op from setuptools import setup, Extension sys.path.insert(1, op.abspath('src')) from hscommon.build import move_all exts = [ Extension('_amount', [op.join('modules', 'amount.c')]) ] setup( script_args = ['build_ext', '--inplace'], ext_modules = exts, ) move_all('_amount*', op.join('src', 'core', 'model'))
import sys import os.path as op from setuptools import setup, Extension sys.path.insert(1, op.abspath('src')) from hscommon.build import move_all exts = [Extension('_amount', [op.join('modules', 'amount.c')])] setup( script_args=['build_ext', '--inplace'], ext_modules=exts, ) move_all('_amount*', op.join('src', 'core', 'model'))
import sys import os import os.path as op import shutil import importlib from setuptools import setup, Extension sys.path.insert(1, op.abspath('src')) from hscommon.build import move_all exts = [ Extension("_block", [op.join('modules', 'block.c'), op.join('modules', 'common.c')]), Extension("_cache", [op.join('modules', 'cache.c'), op.join('modules', 'common.c')]), Extension("_block_qt", [op.join('modules', 'block_qt.c')]), ] setup( script_args = ['build_ext', '--inplace'], ext_modules = exts, ) move_all('_block_qt*', op.join('src', 'qt', 'pe')) move_all('_cache*', op.join('src', 'core/pe')) move_all('_block*', op.join('src', 'core/pe'))
import sys import os import os.path as op import shutil import importlib from setuptools import setup, Extension sys.path.insert(1, op.abspath("src")) from hscommon.build import move_all exts = [ Extension("_block", [op.join("modules", "block.c"), op.join("modules", "common.c")]), Extension("_cache", [op.join("modules", "cache.c"), op.join("modules", "common.c")]), Extension("_block_qt", [op.join("modules", "block_qt.c")]), ] setup( script_args=["build_ext", "--inplace"], ext_modules=exts, ) move_all("_block_qt*", op.join("src", "qt", "pe")) move_all("_cache*", op.join("src", "core/pe")) move_all("_block*", op.join("src", "core/pe"))