[948b8c1] | 1 | from distutils.core import setup |
---|
[040575f] | 2 | |
---|
[948b8c1] | 3 | def 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) |
---|
[040575f] | 15 | |
---|
| 16 | setup( |
---|
[948b8c1] | 17 | name='sasmodels', |
---|
| 18 | version=find_version('sasmodels'), |
---|
| 19 | description="sasmodels package", |
---|
[3eb3312] | 20 | long_description=open('README.md').read(), |
---|
[948b8c1] | 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", |
---|
[040575f] | 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', |
---|
[948b8c1] | 33 | 'Programming Language :: C', |
---|
[040575f] | 34 | 'Topic :: Scientific/Engineering', |
---|
| 35 | 'Topic :: Scientific/Engineering :: Chemistry', |
---|
| 36 | 'Topic :: Scientific/Engineering :: Physics', |
---|
| 37 | ], |
---|
[948b8c1] | 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 | ], |
---|
[040575f] | 49 | extras_require = { |
---|
| 50 | 'OpenCL': ["pyopencl"], |
---|
| 51 | 'Bumps': ["bumps"], |
---|
[948b8c1] | 52 | 'TinyCC': ["tinycc"], |
---|
| 53 | }, |
---|
| 54 | ) |
---|