示例#1
0
def run_setup(data_files, scripts, packages, install_requires):

    # TODO: Are any/all of the *'d keyword arguments needed? I.e., what
    # are the default values?

    setup(
        name=NAME,
        provides=NAME,  # *
        version=VERSION,
        license='BSD3',
        description='PypeIt Spectroscopic Reduction',
        long_description=open('README.md').read(),
        author='PypeIt Collaboration',
        author_email='*****@*****.**',
        keywords='pypeit PypeIt astronomy Keck UCO Lick data reduction',
        url='https://github.com/pypeit/PypeIt',
        packages=packages,
        package_data={
            'pypeit': data_files,
            '': ['*.rst', '*.txt']
        },
        python_requires='>=3.7',
        include_package_data=True,
        scripts=scripts,
        install_requires=install_requires,
        requires=['Python (>3.7.0)'],  # *
        zip_safe=False,  # *
        use_2to3=False,  # *
        setup_requires=['pytest-runner'],
        tests_require=['pytest'],
        ext_modules=get_extensions(),
        entry_points=entry_points,
        classifiers=[
            'Development Status :: 4 - Beta',
            'Intended Audience :: Science/Research',
            'License :: OSI Approved :: BSD License',
            'Natural Language :: English',
            'Operating System :: OS Independent',
            'Programming Language :: Python',
            'Programming Language :: Python :: 3.7',
            'Topic :: Documentation :: Sphinx',
            'Topic :: Scientific/Engineering :: Astronomy',
            'Topic :: Software Development :: Libraries :: Python Modules',
            'Topic :: Software Development :: User Interfaces'
        ])
示例#2
0
def run_setup(data_files, scripts, packages, install_requires):

    # TODO: Are any/all of the *'d keyword arguments needed? I.e., what
    # are the default values?

    setup(
        name=NAME,
        provides=NAME,  # *
        version=VERSION,
        license="MIT",
        description="Automatic ESO VLT FORS2 Data Reduction Pipeline",
        long_description=open("README.md").read(),
        author="A. Floers",
        author_email="*****@*****.**",
        keywords="ESO VLT FORS2 automatic pipeline",
        url="https://github.com/afloers/FORSIFY",
        packages=packages,
        package_data={
            "FORSify": data_files,
            "": ["*.rst", "*.txt"]
        },
        python_requires=">=3.7",
        include_package_data=True,
        scripts=scripts,
        install_requires=install_requires,
        requires=["Python (>3.7.0)"],  # *
        zip_safe=False,  # *
        use_2to3=False,  # *
        setup_requires=["pytest-runner"],
        tests_require=["pytest"],
        ext_modules=get_extensions(),
        entry_points=entry_points,
        classifiers=[
            "Topic :: Scientific/Engineering :: Astronomy",
        ],
    )
示例#3
0
    print("GSL version {0} found: installing with GSL support".format(
        '.'.join(gsl_version)))

    if gsl_prefix is None:
        # Now get the gsl install location
        cmd = ['gsl-config', '--prefix']
        try:
            gsl_prefix = check_output(cmd, encoding='utf-8')
        except:
            gsl_prefix = str(check_output(cmd, shell=shell))

    gsl_prefix = os.path.normpath(gsl_prefix.strip())

print("-" * 79)

extensions = get_extensions()
for ext in extensions:
    if 'potential.potential' in ext.name or 'scf' in ext.name:
        if gsl_version is not None:
            if 'gsl' not in ext.libraries:
                ext.libraries.append('gsl')
                ext.library_dirs.append(os.path.join(gsl_prefix, 'lib'))
                ext.include_dirs.append(os.path.join(gsl_prefix, 'include'))

            if 'gslcblas' not in ext.libraries:
                ext.libraries.append('gslcblas')

with open(extra_compile_macros_file, 'w') as f:
    if gsl_version is not None:
        f.writelines(['#define USE_GSL 1'])
    else:
示例#4
0
    try:
        from distutils.version import LooseVersion

        for j, piece in enumerate(LooseVersion(version).version[:3]):
            pieces[j] = int(piece)

    except Exception:
        pass

    return pieces


major, minor, bugfix = split_version(version)

del split_version  # clean up namespace.

release = 'dev' not in version
""".lstrip()

# Only import these if the above checks are okay
# to avoid masking the real problem with import error.
import os  # noqa
from setuptools import setup  # noqa
from extension_helpers import get_extensions  # noqa

setup(use_scm_version={
    'write_to': os.path.join('astropy', 'version.py'),
    'write_to_template': VERSION_TEMPLATE
},
      ext_modules=get_extensions())
示例#5
0
setup_keywords['packages'] = find_packages()
setup_keywords['setup_requires'] = ['pytest-runner']
setup_keywords['tests_require'] = ['pytest']

#
# Add internal data directories.
#

data_files = []

# walk through the data directory, adding all files
data_generator = os.walk('desi_sandbox/data')
for path, directories, files in data_generator:
    for f in files:
        data_path = '/'.join(path.split('/')[1:])
        data_files.append(data_path + '/' + f)
setup_keywords['package_data'] = {
    'desi_sandbox': data_files,
    '': ['*.rst', '*.txt', '*.yaml']
}
setup_keywords['include_package_data'] = True

# C code
setup_keywords['ext_modules'] = get_extensions()

#
# Run setup command.
#
setup(**setup_keywords)