extbuilder = cyproc_exts(EXTS, CYTHON_MIN_VERSION, 'pyx-stamps')

extra_setuptools_args = {}

class installer(install.install):
    def run(self):
        package_check('numpy', NUMPY_MIN_VERSION)
        package_check('scipy', SCIPY_MIN_VERSION)
        package_check('sklearn', SKLEARN_MIN_VERSION)
        package_check('mpmath', MPMATH_MIN_VERSION)
        install.install.run(self)

cmdclass = dict(
    build_ext=extbuilder,
    install=installer,
    sdist=get_pyx_sdist()
)


def main(**extra_args):
    setup(name=NAME,
          maintainer=MAINTAINER,
          maintainer_email=MAINTAINER_EMAIL,
          description=DESCRIPTION,
          long_description=LONG_DESCRIPTION,
          url=URL,
          download_url=DOWNLOAD_URL,
          license=LICENSE,
          classifiers=CLASSIFIERS,
          author=AUTHOR,
          author_email=AUTHOR_EMAIL,
Example #2
0
# Installer that checks for install-time dependencies
class installer(install.install):
    def run(self):
        package_check('numpy', NUMPY_MIN_VERSION)
        package_check('scipy', SCIPY_MIN_VERSION)
        package_check('nibabel', NIBABEL_MIN_VERSION)
        install.install.run(self)


cmdclass = dict(
    build_py=pybuilder,
    build_ext=extbuilder,
    install=installer,
    install_scripts=install_scripts_bat,
    sdist=get_pyx_sdist(include_dirs=['src']))


def main(**extra_args):
    setup(name=NAME,
          maintainer=MAINTAINER,
          maintainer_email=MAINTAINER_EMAIL,
          description=DESCRIPTION,
          long_description=LONG_DESCRIPTION,
          url=URL,
          download_url=DOWNLOAD_URL,
          license=LICENSE,
          classifiers=CLASSIFIERS,
          author=AUTHOR,
          author_email=AUTHOR_EMAIL,
          platforms=PLATFORMS,
Example #3
0
ext_modules = [Extension("x86cpu.cpuinfo",
                         [pjoin(*parts) for parts in (
                             ['x86cpu', 'cpuinfo.pyx'],
                             ['libx86cpu', 'cpuinfo.c'],
                             ['libx86cpu', 'cpuid.c'],
                             ['libx86cpu', 'os_restores_ymm.c'])],
                         include_dirs = ['libx86cpu'])]

# Cython is a dependency for building extensions, iff we don't have stamped up
# pyx and c files.
build_ext, need_cython = cyproc_exts(ext_modules,
                                     CYTHON_MIN_VERSION,
                                     'pyx-stamps')
cmdclass['build_ext'] = build_ext
cmdclass['sdist'] = get_pyx_sdist(cmdclass['sdist'])

setup(
    version=versioneer.get_version(),
    cmdclass=cmdclass,
    description='Collect information about x86 CPU',
    name = 'x86cpu',
    ext_modules = ext_modules,
    packages     = ['x86cpu',
                    'x86cpu.tests'],
    author='Matthew Brett',
    author_email='*****@*****.**',
    maintainer='Matthew Brett',
    maintainer_email='*****@*****.**',
    url='http://github.com/matthew-brett/x86cpu',
    license='BSD license',
Example #4
0
if need_cython:
    SetupDependency('Cython',
                    info.CYTHON_MIN_VERSION,
                    req_type='install_requires',
                    heavy=False).check_fill(extra_setuptools_args)
SetupDependency('numpy',
                info.NUMPY_MIN_VERSION,
                req_type='install_requires',
                heavy=True).check_fill(extra_setuptools_args)
SetupDependency('scipy',
                info.SCIPY_MIN_VERSION,
                req_type='install_requires',
                heavy=True).check_fill(extra_setuptools_args)

cmdclass = versioneer.get_cmdclass()
cmdclass.update(dict(build_ext=build_ext, sdist=get_pyx_sdist()))

# get long_description

if sys.version_info[0] > 2:
    long_description = open('README.rst', 'rt', encoding='utf-8').read()
else:
    long_description = unicode(file('README.rst').read(), 'utf-8')


def main(**extra_args):
    setup(name=info.NAME,
          maintainer=info.MAINTAINER,
          maintainer_email=info.MAINTAINER_EMAIL,
          description=info.DESCRIPTION,
          url=info.URL,
Example #5
0
    extbuilder = cyproc_exts(EXTS, CYTHON_MIN_VERSION, 'pyx-stamps')


# Installer that checks for install-time dependencies
class installer(install.install):
    def run(self):
        package_check('numpy', NUMPY_MIN_VERSION)
        package_check('scipy', SCIPY_MIN_VERSION)
        package_check('nibabel', NIBABEL_MIN_VERSION)
        install.install.run(self)


cmdclass = dict(build_py=pybuilder,
                build_ext=extbuilder,
                install=installer,
                sdist=get_pyx_sdist())


def main(**extra_args):
    setup(
        name=NAME,
        maintainer=MAINTAINER,
        maintainer_email=MAINTAINER_EMAIL,
        description=DESCRIPTION,
        long_description=LONG_DESCRIPTION,
        url=URL,
        download_url=DOWNLOAD_URL,
        license=LICENSE,
        classifiers=CLASSIFIERS,
        author=AUTHOR,
        author_email=AUTHOR_EMAIL,
Example #6
0
# Check dependencies, maybe add to setuptools lists
if need_cython:
    SetupDependency("Cython", info.CYTHON_MIN_VERSION, req_type="install_requires", heavy=False).check_fill(
        extra_setuptools_args
    )
SetupDependency("numpy", info.NUMPY_MIN_VERSION, req_type="install_requires", heavy=True).check_fill(
    extra_setuptools_args
)
SetupDependency("scipy", info.SCIPY_MIN_VERSION, req_type="install_requires", heavy=True).check_fill(
    extra_setuptools_args
)


cmdclass = versioneer.get_cmdclass()
cmdclass.update(dict(build_ext=build_ext, sdist=get_pyx_sdist()))


def main(**extra_args):
    setup(
        name=info.NAME,
        maintainer=info.MAINTAINER,
        maintainer_email=info.MAINTAINER_EMAIL,
        description=info.DESCRIPTION,
        url=info.URL,
        download_url=info.DOWNLOAD_URL,
        license=info.LICENSE,
        classifiers=info.CLASSIFIERS,
        author=info.AUTHOR,
        author_email=info.AUTHOR_EMAIL,
        platforms=info.PLATFORMS,
Example #7
0
                  libraries=['m']), )
extbuilder = cyproc_exts(EXTS, CYTHON_MIN_VERSION, 'pyx-stamps')

extra_setuptools_args = {}


class installer(install.install):
    def run(self):
        package_check('numpy', NUMPY_MIN_VERSION)
        package_check('scipy', SCIPY_MIN_VERSION)
        package_check('sklearn', SKLEARN_MIN_VERSION)
        package_check('mpmath', MPMATH_MIN_VERSION)
        install.install.run(self)


cmdclass = dict(build_ext=extbuilder, install=installer, sdist=get_pyx_sdist())


def main(**extra_args):
    setup(name=NAME,
          maintainer=MAINTAINER,
          maintainer_email=MAINTAINER_EMAIL,
          description=DESCRIPTION,
          long_description=LONG_DESCRIPTION,
          url=URL,
          download_url=DOWNLOAD_URL,
          license=LICENSE,
          classifiers=CLASSIFIERS,
          author=AUTHOR,
          author_email=AUTHOR_EMAIL,
          platforms=PLATFORMS,
Example #8
0
    )
extbuilder = cyproc_exts(EXTS, CYTHON_MIN_VERSION, "pyx-stamps")

extra_setuptools_args = {}


class installer(install.install):
    def run(self):
        package_check("numpy", NUMPY_MIN_VERSION)
        package_check("scipy", SCIPY_MIN_VERSION)
        package_check("sklearn", SKLEARN_MIN_VERSION)
        package_check("mpmath", MPMATH_MIN_VERSION)
        install.install.run(self)


cmdclass = dict(build_ext=extbuilder, install=installer, sdist=get_pyx_sdist())


def main(**extra_args):
    setup(
        name=NAME,
        maintainer=MAINTAINER,
        maintainer_email=MAINTAINER_EMAIL,
        description=DESCRIPTION,
        long_description=LONG_DESCRIPTION,
        url=URL,
        download_url=DOWNLOAD_URL,
        license=LICENSE,
        classifiers=CLASSIFIERS,
        author=AUTHOR,
        author_email=AUTHOR_EMAIL,
Example #9
0
ext_modules = [
    Extension("x86cpu.cpuinfo", [
        pjoin(*parts)
        for parts in (['x86cpu', 'cpuinfo.pyx'], ['libx86cpu', 'cpuinfo.c'],
                      ['libx86cpu', 'cpuid.c'],
                      ['libx86cpu', 'os_restores_ymm.c'])
    ],
              include_dirs=['libx86cpu'])
]

# Cython is a dependency for building extensions, iff we don't have stamped up
# pyx and c files.
build_ext, need_cython = cyproc_exts(ext_modules, CYTHON_MIN_VERSION,
                                     'pyx-stamps')
cmdclass['build_ext'] = build_ext
cmdclass['sdist'] = get_pyx_sdist(cmdclass['sdist'])

setup(
    version=versioneer.get_version(),
    cmdclass=cmdclass,
    description='Collect information about x86 CPU',
    name='x86cpu',
    ext_modules=ext_modules,
    packages=['x86cpu', 'x86cpu.tests'],
    author='Matthew Brett',
    author_email='*****@*****.**',
    maintainer='Matthew Brett',
    maintainer_email='*****@*****.**',
    url='http://github.com/matthew-brett/x86cpu',
    license='BSD license',
    classifiers=[