def build_psipy(force=False):
    system = get_system()
    if system == "windows":
        print("The psipy library is not yet available for Windows.")
        return

    root_path = os.path.dirname(os.path.realpath(__file__))

    lib_dir = os.path.abspath(os.path.join(root_path, "psipy", system))
    lib_build_dir = get_lib_build_dir()

    filelist = glob.glob(
        "{lib_build_dir}/*.so".format(lib_build_dir=lib_build_dir))
    if force and os.path.isdir(lib_build_dir):
        for f in filelist:
            os.remove(f)

    psipy_module = Extension(
        "psipy",
        sources=["psipy/psipy.d"],
        build_deimos=True,
        d_lump=True,
        include_dirs=["psipy/psi"],
        library_dirs=[lib_dir],
        libraries=["psi"],
    )

    filelist = glob.glob(
        "{lib_build_dir}/*.so".format(lib_build_dir=lib_build_dir))
    if not filelist:
        setup(
            name="psipy",
            version="0.1",
            author="Pedro Zuidberg Dos Martires",
            ext_modules=[psipy_module],
            description="python wrapper for Psi",
            script_args=[
                "build",
                "--compiler=dmd",
                "--build-lib={}".format(lib_build_dir),
            ],
            packages=["psipy"],
        )
Example #2
0
def build_psipy(force=False):
    if get_system() == 'windows':
        print('The psipy library is not yet available for Windows.')
        return

    system = get_system()
    python = 'python{}'.format(sys.version_info[0])
    root_path = os.path.dirname(os.path.realpath(__file__))


    lib_dir = os.path.abspath(os.path.join(root_path, 'psipy', system))


    lib_build_dir = get_lib_build_dir()

    filelist=glob.glob("{lib_build_dir}/*.so".format(lib_build_dir=lib_build_dir))
    if force and os.path.isdir(lib_build_dir):
        for f in filelist:
            os.remove(f)

    psipy_module = Extension(
        'psipy',
        sources=['psipy/psipy.d'],
        build_deimos=True,
        d_lump=True,
        include_dirs=['psipy/psi'],
        library_dirs=[lib_dir],
        libraries=['psi'],
    )

    filelist=glob.glob("{lib_build_dir}/*.so".format(lib_build_dir=lib_build_dir))
    if not filelist:
        setup(
            name='psipy',
            version='0.1',
            author='Pedro Zuidberg Dos Martires',
            ext_modules = [psipy_module],
            description='python wrapper for PSI',
            script_args=['build', "--compiler=dmd", "--build-lib={}".format(lib_build_dir)],
            packages=['psipy']
        )
Example #3
0

projName = 'dbindings'
sources = ['dbindings.d',
'ea/ea_config.d',
'ea/population.d',
'ea/individual.d',
'ea/beer_tracker_individual.d',
'ea/beer_tracker_population.d',
'flatland/flatland_agent.d',
'flatland/flatland_simulator.d',
'flatland/flatland_evolve.d',
'ann/ann.d',
'ann/matrix.d',
'ann/ann_config.d',
'ann/ctrnn.d',
'beer_tracker/beer_tracker_agent.d',
'beer_tracker/beer_tracker_object.d',
'beer_tracker/beer_tracker_simulator.d',
'beer_tracker/beer_tracker_evolve.d']

setup(
    name=projName,
    version='0.2',
    ext_modules=[
        Extension(projName, sources,
            build_deimos=True,
            d_lump=True)
    ],
)
Example #4
0
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'interpcontext'
setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension(projName, ['interpcontext.d'],
                  build_deimos=True,
                  d_lump=True)
    ],
)
Example #5
0
File: setup.py Project: lcrees/pyd
from distutils.core import Extension as cExtension
from pyd.support import setup, Extension

module1 = Extension("x", sources = ['xclass.c'])
module2 = Extension("y", sources = ['hello.d'])

setup(
    name = "x",
    version = '1.0',
    description = "eat a taco",
    ext_modules = [
        module1,
        module2
    ]
);
Example #6
0
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'class_wrap'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension(
            "class_wrap",
            ["class_wrap.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
        )
    ],
)
Example #7
0
from pyd.support import setup, Extension

all_name = 'processAll_extension_d'
slice_name = 'processSlice_extension_d'

compile_arguments = ['-O', '-inline', '-release']

setup(
    name=all_name,
    version='0.1',
    ext_modules=[
        Extension(
            slice_name,
            ['processAll_extension_d.d'],
            extra_compile_args=compile_arguments,
            build_deimos=True,
            d_lump=True
        )
    ],
)

setup(
    name=slice_name,
    version='0.1',
    ext_modules=[
        Extension(
            slice_name,
            ['processSlice_extension_d.d'],
            extra_compile_args=compile_arguments,
            build_deimos=True,
            d_lump=True
Example #8
0
from pyd.support import setup, Extension

projName = 'example'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(projName, ['example.d'], build_deimos=True, d_lump=True)
    ],
)
Example #9
0
from pyd.support import setup, Extension
import os, json

f = os.popen('dub describe')
build_pars = json.loads(f.read())['targets'][0]['buildSettings']

projName = "epistochmodels"

setup(
    name=projName,
    version='0.3.2',
    ext_modules=[
        Extension(
            projName,
            ['source/models.d', 'source/multinomial.d'],
            include_dirs=build_pars['importPaths'],
            extra_link_args=build_pars['linkerFiles'],
            # extra_compile_args=['-w'],
            build_deimos=True,
            d_lump=True)
    ],
)
Example #10
0
File: setup.py Project: lcrees/pyd
from pyd.support import setup, Extension

projName = 'rawexample'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(projName, ['rawexample.d'], 
            raw_only=True, 
            build_deimos=True, 
            d_lump=True)
    ],
)
Example #11
0
from pyd.support import setup, Extension 

projName = 'AppDpy'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(projName, ['src/test/package.d', 'src/test/perf.d'],
#             extra_compile_args=['-w'],
            optimize = True,
            build_deimos=True,
            d_lump=True
        )
    ],
)

## To build as Python module, try:
# python setup.py build  --compiler=ldc2
# sudo python setup.py install
Example #12
0
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'embedded'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension("embedded", ["embedded.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
        )
    ],
)
Example #13
0
from pyd.support import setup, Extension

projName = 'libmarsv5camera_py'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(projName,
                  sources=['marscamera_py.d', 'marscamera_c_interface.d'],
                  build_deimos=True,
                  d_lump=True)
    ],
)
Example #14
0
File: setup.py Project: lcrees/pyd
from pyd.support import setup, Extension

projName = "testdll"

setup(
    name=projName, version="0.1", ext_modules=[Extension(projName, [projName + ".d"], d_lump=True, build_deimos=True)]
)
Example #15
0
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'pyind'
srcs = ['pyind.d']

setup(
    name=projName,
    version='1.0',
    ext_modules=[Extension(projName, srcs, build_deimos=True, d_lump=True)],
)
Example #16
0
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'typeinfo'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension("typeinfo", ["typeinfo.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
        )
    ],
)
Example #17
0
from pyd.support import setup, Extension

all_name = 'processAll_extension_d'
slice_name = 'processSlice_extension_d'

compile_arguments = ['-O', '-inline', '-release']

setup(
    name='D Extensions',
    version='0.1',
    ext_modules=[
        Extension(
            slice_name,
            [slice_name + '.d'],
            extra_compile_args=compile_arguments,
            build_deimos=True,
            d_lump=True
        ),
        Extension(
            all_name,
            [all_name + '.d'],
            extra_compile_args=compile_arguments,
            build_deimos=True,
            d_lump=True
        ),
    ],
)
Example #18
0
from pyd.support import setup, Extension

all_name = 'processAll_extension_d'
slice_name = 'processSlice_extension_d'

compile_arguments = ['-O', '-inline', '-release']

setup(
    name='D Extensions',
    version='0.1',
    ext_modules=[
        Extension(slice_name, [slice_name + '.d'],
                  extra_compile_args=compile_arguments,
                  build_deimos=True,
                  d_lump=True),
        Extension(all_name, [all_name + '.d'],
                  extra_compile_args=compile_arguments,
                  build_deimos=True,
                  d_lump=True),
    ],
)
Example #19
0
setup(
    name="pyterato",
    version=version,
    description=description,
    long_description=long_descr,
    license="GPL 3",
    url="https://github.com/juanjux/pyterato",
    download_url="https://github.com/juanjux/pyterato/archive/%s.tar.gz" %
    version,
    author="Juanjo Alvarez Martinez",
    author_email="*****@*****.**",
    packages=find_packages(exclude=["tests"]),
    entry_points={"console_scripts": ["pyterato = pyterato.cli:main"]},
    install_requires=[],
    extras_require={},
    classifiers=[
        "Development Status :: 3 - Alpha", "Environment :: Console",
        "Intended Audience :: Other Audience", "Topic :: Office/Business",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.6"
    ],
    ext_modules=[
        Extension(
            'pyterato_native',
            [
                'native/checks.d', 'native/pyterato_native.d',
                'native/checks_data.d'
            ],
            # extra_compile_args=['-w', '-g', '-debug', '-profile'],
            # extra_compile_args=['-profile'],
            optimize=True,
            build_deimos=True,
            d_lump=True),
    ],
)
Example #20
0
# usage: python setup.py pydexe
from pyd.support import setup, Extension, pydexe_sanity_check
import platform

pydexe_sanity_check()
projName = "object_"
setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension("object_", ['object_.d'],
            build_deimos=True,
            d_lump=True,
            d_unittest=True
        ),
    ],
)
Example #21
0
from pyd.support import setup, Extension

projName = 'hello_w_libs'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(projName, ['hello.d'],
                  build_deimos=True,
                  d_lump=True,
                  include_dirs=['libdir1', 'libdir2'],
                  library_dirs=['libdir1', 'libdir2'],
                  libraries=['lib1', 'lib2'])
    ],
)
Example #22
0
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'pyind'
srcs = ['pyind.d']

setup(
    name=projName,
    version='1.0',
    ext_modules=[
    Extension(projName, srcs,
    build_deimos=True, d_lump=True
        )
    ],
)
Example #23
0
from pyd.support import setup, Extension

projName = 'hello_w_libs'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
    Extension(projName, ['hello.d'],
        build_deimos=True,
        d_lump=True,
        include_dirs=['libdir1', 'libdir2'],
        library_dirs=['libdir1', 'libdir2'],
        libraries=['lib1', 'lib2']
        )
    ],
)
Example #24
0
# usage: python setup.py pydexe
from pyd.support import setup, Extension, pydexe_sanity_check
import platform

pydexe_sanity_check()
projName = "datetime"
setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension("datetime", ['datetime.d'],
            build_deimos=True,
            d_lump=True,
            d_unittest=True
        ),
    ],
)
Example #25
0
from pyd.support import setup, Extension

projName = "Epidemiad"

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(
            projName,
            ['source/models.d'],
            include_dirs=[
                '~/.dub/packages/mir-random-2.2.6/mir-random/source',
                '~/.dub/packages/mir-core-1.0.2/mir-core/source/',
                '~/.dub/packages/mir-3.2.0/mir/source/',
                '~/.dub/packages/mir-linux-kernel-1.0.1/mir-linux-kernel/source/',
                '~/.dub/packages/mir-algorithm-3.5.5/mir-algorithm/source/'
            ],
            # extra_compile_args=['-w'],
            build_deimos=True,
            d_lump=True)
    ],
)
Example #26
0
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'make_object'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension(
            "make_object",
            ["make_object.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
        )
    ],
)
Example #27
0
File: setup.py Project: lcrees/pyd
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'interpcontext'
setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension(projName, ['interpcontext.d'],
            build_deimos=True, d_lump=True
        )
    ],
)
Example #28
0
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'func_wrap'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension(
            "func_wrap",
            ["func_wrap.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
            string_imports=['important_message.txt'],
        )
    ],
)
Example #29
0
File: setup.py Project: lcrees/pyd
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'struct_wrap'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension("struct_wrap", ["struct_wrap.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
        )
    ],
)
Example #30
0
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'embedded'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension(
            "embedded",
            ["embedded.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
        )
    ],
)
Example #31
0
File: setup.py Project: lcrees/pyd
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'pydobject'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension("pydobject", ["pydobject.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
        )
    ],
)
Example #32
0
from pyd.support import setup, Extension

projName = 'wrap'

setup(
    name=projName,
    version='0.1',
    ext_modules=[Extension(projName, ['wraptest.d'])],
)
Example #33
0
from distutils.core import Extension as cExtension
from pyd.support import setup, Extension

module1 = Extension("x", sources=['xclass.c'])
module2 = Extension("y", sources=['hello.d'], build_deimos=True, d_lump=True)

setup(name="x",
      version='1.0',
      description="eat a taco",
      ext_modules=[module1, module2])
Example #34
0
from pyd.support import setup, Extension

all_name = 'processAll_extension_d'
slice_name = 'processSlice_extension_d'

compile_arguments = ['-O', '-inline', '-release']

setup(
    name=all_name,
    version='0.1',
    ext_modules=[
        Extension(slice_name, ['processAll_extension_d.d'],
                  extra_compile_args=compile_arguments,
                  build_deimos=True,
                  d_lump=True)
    ],
)

setup(
    name=slice_name,
    version='0.1',
    ext_modules=[
        Extension(slice_name, ['processSlice_extension_d.d'],
                  extra_compile_args=compile_arguments,
                  build_deimos=True,
                  d_lump=True)
    ],
)
Example #35
0
import pyd.support
from pyd.support import setup, Extension, pydexe_sanity_check

pydexe_sanity_check()
projName = 'func_wrap'
ext_modules = setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension("func_wrap", ["func_wrap.d"],
            d_unittest=True,
            build_deimos=True,
            d_lump=True,
            string_imports = ['important_message.txt'],
        )
    ],
)
Example #36
0
from pyd.support import setup, Extension

projName = 'hello'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(projName, ['hello.d'],
                  extra_compile_args=['-w'],
                  build_deimos=True,
                  d_lump=True)
    ],
)
Example #37
0
from pyd.support import setup, Extension

projName = 'error1'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(projName, ['error1.d'],
            extra_compile_args=['-w'],
            build_deimos=True,
            d_lump=True
        )
    ],
)
Example #38
0
File: setup.py Project: lcrees/pyd
from pyd.support import setup, Extension

projName = 'libmarsv5camera_py'

setup(
        name=projName,
        version='0.1',
        ext_modules=[
                Extension(projName, sources=['marscamera_py.d', 'marscamera_c_interface.d'],
                          build_deimos=True,
                          d_lump=True
                          )
                ],
        )
Example #39
0
# usage: python setup.py pydexe
from pyd.support import setup, Extension, pydexe_sanity_check
import platform

pydexe_sanity_check()
projName = "object_"
setup(
    name=projName,
    version='1.0',
    ext_modules=[
        Extension("object_", ['object_.d'],
                  build_deimos=True,
                  d_lump=True,
                  d_unittest=True),
    ],
)
Example #40
0
    pyd_dir,
    home + "/.dub/packages/protobuf-0.6.2/protobuf/src/",
    home + "/.dub/packages/hunt-1.6.14/hunt/source/",
    home + "/.dub/packages/hunt-http-0.6.15/hunt-http/source/",
    home + "/.dub/packages/hunt-extra-1.0.10/hunt-extra/source/",
    home + "/.dub/packages/hunt-net-0.5.13/hunt-net/source/",
]

pkg_files = []
for pkg in include_dirs:
    pkg_files.extend(list(glob.glob(pkg + '**/*.d', recursive=True)))
# print(pkg_files)

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(
            projName,
            [
                'client_pyd.d',
                "./helloworld/helloworld.d",
                './helloworld/helloworldrpc.d',
            ] + pkg_files,
            # include_dirs=include_dirs,
            extra_compile_args=['-version=HAVE_EPOLL'],
            build_deimos=True,
            d_lump=True)
    ],
)
Example #41
0
from pyd.support import setup, Extension

projName = 'testdll'

setup(
    name=projName,
    version='0.1',
    ext_modules=[
        Extension(projName, [projName + '.d'],
            d_lump=True,
            build_deimos=True)
    ],
  )