Example #1
0
def get_extension():
    subprocess.call(
        [sys.executable, os.path.join(cdir, "setup.py"), ""], cwd=cdir)
    ext = []
    for s in ("LUsolve", ):
        ext.append(
            Extension("spectralDNS.shen.{0}".format(s),
                      sources=[os.path.join(sdir, '{0}.pyx'.format(s))],
                      language="c++"))
    for e in ext:
        e.extra_link_args.extend(["-std=c++11"])

    for s in [files for files in os.listdir(cdir) if files.endswith('.pyx')]:
        ext.append(
            Extension("spectralDNS.optimization.{0}".format(s[:-4]),
                      sources=[os.path.join(cdir, '{0}'.format(s))],
                      language="c++"))

    try:
        from pythran import PythranExtension
        ext.append(
            PythranExtension(
                'spectralDNS.optimization.pythran_maths',
                sources=['spectralDNS/optimization/pythran_maths.py']))
    except ImportError:
        print("Disabling Pythran support, package not available")

    return ext
Example #2
0
                                   language="c++", define_macros=define_macros))
    [e.extra_link_args.extend(["-std=c++11"]) for e in ext]

    [e.include_dirs.extend([get_include()]) for e in ext]
    ext0 = []
    ff = [files for files in os.listdir(cdir) if files.endswith('.pyx')]
    for s in ff:
        ext0 += cythonize(Extension("spectralDNS.optimization.{0}".format(s[:-4]),
                                    sources=[os.path.join(cdir, '{0}'.format(s))],
                                    language="c++", define_macros=define_macros))
    [e.include_dirs.extend([get_include()]) for e in ext0]
    ext += ext0

    try:
        from pythran import PythranExtension
        ext.append(PythranExtension('spectralDNS.optimization.pythran_maths',
                                    sources=['spectralDNS/optimization/pythran_maths.py']))
    except ImportError:
        print("Disabling Pythran support, package not available")
        pass

    cmdclass = {'build_ext': build_ext_subclass}

else:
    # Remove generated files
    for name in os.listdir(cdir):
        if "single" in name or "double" in name:
            os.remove(os.path.join(cdir, name))

setup(name = "spectralDNS",
      version = "%d.%d" % (major, minor),
      description = "spectralDNS -- Spectral Navier-Stokes solvers framework",
Example #3
0
from distutils.core import setup, Extension
from pythran import PythranExtension

setup(name = 'demo2',
      version = '1.0',
      description = 'This is another demo package',
      packages = ['demo2'],
      ext_modules = [PythranExtension('demo2.a', sources = ['a.py'])])
Example #4
0
#!/usr/bin/env python
# encoding: UTF-8

from setuptools import setup, find_packages, dist

# Declare the dependency
dist.Distribution(dict(setup_requires='pythran'))

# Pythran modules
from pythran import PythranExtension

module_parse = PythranExtension('gaussdca._load_data', sources=['src/gaussdca/_load_data.py'])
module_gdca = PythranExtension('gaussdca._gdca', sources=['src/gaussdca/_gdca.py'],
                               extra_compile_args=['-fopenmp', '-ftree-vectorize'],
                               extra_link_args=['-fopenmp'])

# Main setup:
setup(name='pyGaussDCA', version='0.1.4',
      description='Fast implementation of GaussDCA',
      url='https://github.com/ElofssonLab/pyGaussDCA/',
      author='David Menéndez Hurtado',
      author_email='*****@*****.**',
      license='GPLv3',
      packages=find_packages('src'),
      package_dir={'': 'src'},
      package_data={'gaussdca.data': ['tests/data/*.a3m']},
      include_package_data=True,
      ext_modules=[module_parse, module_gdca],
      install_requires=['numpy', 'scipy', 'pythran>=0.8.6'],
      setup_requires=['pytest-runner'],
      tests_require=['pytest'],
Example #5
0
    package_dir={'': 'nw_align_probs'},
    version='0.4',
    license='MIT',
    description=
    'Needleman-Wunsch alignment of text to logprobs frames from ASR models',
    author='Vid Klopcic',
    author_email='*****@*****.**',
    url='https://github.com/vidklopcic/nw_align_probs',
    download_url=
    'https://github.com/vidklopcic/nw_align_probs/archive/refs/tags/v_04.tar.gz',
    keywords=['Needleman-Wunsch', 'global alignment', 'ASR text alignment'],
    install_requires=[
        'numpy',
    ],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Science/Research',
        'Topic :: Text Processing',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
        'Programming Language :: Python :: 3.8',
    ],
    ext_modules=[
        PythranExtension("nw_align_probs",
                         ["nw_align_probs/nw_align_probs.py"])
    ],
)
Example #6
0
from distutils.core import setup, Extension
from pythran import PythranExtension

module1 = PythranExtension('demo', sources = ['a.py'])

setup(name = 'demo',
      version = '1.0',
      description = 'This is a demo package',
      ext_modules = [module1])