source: sasmodels/setup.py @ 306e354

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 306e354 was 948b8c1, checked in by Paul Kienzle <pkienzle@…>, 9 years ago

simplify setup; read version from package init

  • Property mode set to 100644
File size: 1.8 KB
Line 
1from distutils.core import setup
2
3def find_version(package):
4    """Read package version string from __init__.py"""
5    import os
6    with open(os.path.join(package, '__init__.py')) as fid:
7        for line in fid.readlines():
8            if line.startswith('__version__'):
9                line = line[:line.find('#')]  # strip comment, if any
10                version = line.split('=', 2)[1].strip()
11                if version[0] != version[-1] or version[0] not in "\"'":
12                    break
13                return version[1:-1]
14    raise RuntimeError("Could not read version from %s/__init__.py"%package)
15
16setup(
17    name='sasmodels',
18    version=find_version('sasmodels'),
19    description="sasmodels package",
20    long_description=open('README.md').read(),
21    author="SasView Collaboration",
22    author_email="management@sasview.org",
23    url="http://www.sasview.org",
24    keywords="small-angle x-ray and neutron scattering analysis",
25    download_url="https://github.com/SasView/sasmodels",
26    classifiers=[
27        'Development Status :: 4 - Beta',
28        'Environment :: Console',
29        'Intended Audience :: Science/Research',
30        'License :: Public Domain',
31        'Operating System :: OS Independent',
32        'Programming Language :: Python',
33        'Programming Language :: C',
34        'Topic :: Scientific/Engineering',
35        'Topic :: Scientific/Engineering :: Chemistry',
36        'Topic :: Scientific/Engineering :: Physics',
37    ],
38    packages=[
39        'sasmodels',
40        'sasmodels.models',
41        'sasmodels.custom'
42    ],
43    package_data={
44        'sasmodels.models': ['*.c', 'lib/*.c'],
45        'sasmodels': ['*.c', '*.cl', 'convert.json'],
46    },
47    install_requires = [
48    ],
49    extras_require = {
50        'OpenCL': ["pyopencl"],
51        'Bumps': ["bumps"],
52        'TinyCC': ["tinycc"],
53    },
54)
Note: See TracBrowser for help on using the repository browser.