mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Fallback to using distutils if user doesn't have setuptools installed
This commit is contained in:
parent
f8dffcf9b8
commit
cfd6a37683
1 changed files with 36 additions and 28 deletions
64
setup.py
64
setup.py
|
|
@ -2,35 +2,43 @@
|
|||
|
||||
import glob
|
||||
import os
|
||||
from setuptools import setup, find_packages
|
||||
try:
|
||||
from setuptools import setup
|
||||
have_setuptools = True
|
||||
except ImportError:
|
||||
from distutils.core import setup
|
||||
have_setuptools = False
|
||||
|
||||
setup(name='openmc',
|
||||
version='0.6.2',
|
||||
packages=find_packages(),
|
||||
scripts=glob.glob('scripts/openmc-*'),
|
||||
kwargs = {'name': 'openmc',
|
||||
'version': '0.6.2',
|
||||
'packages': ['openmc'],
|
||||
'scripts': glob.glob('scripts/openmc-*'),
|
||||
|
||||
# Required dependencies
|
||||
install_requires=['numpy', 'scipy', 'h5py', 'matplotlib'],
|
||||
# Metadata
|
||||
'author': 'Will Boyd',
|
||||
'author_email': 'wbinventor@gmail.com',
|
||||
'description': 'OpenMC Python API',
|
||||
'url': 'https://github.com/mit-crpg/openmc',
|
||||
'classifiers': [
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: End Users/Desktop',
|
||||
'Intended Audience :: Science/Research',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Natural Language :: English',
|
||||
'Programming Language :: Python',
|
||||
'Topic :: Scientific/Engineering'
|
||||
]}
|
||||
|
||||
# Optional dependencies
|
||||
extras_require={
|
||||
'pandas': ['pandas'],
|
||||
'vtk': ['vtk', 'silomesh'],
|
||||
'validate': ['lxml']
|
||||
},
|
||||
if have_setuptools:
|
||||
kwargs.update({
|
||||
# Required dependencies
|
||||
'install_requires': ['numpy', 'scipy', 'h5py', 'matplotlib'],
|
||||
|
||||
# Metadata
|
||||
author='Will Boyd',
|
||||
author_email='wbinventor@gmail.com',
|
||||
description='OpenMC Python API',
|
||||
url='https://github.com/mit-crpg/openmc',
|
||||
classifiers=[
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: End Users/Desktop',
|
||||
'Intended Audience :: Science/Research',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Natural Language :: English',
|
||||
'Programming Language :: Python',
|
||||
'Topic :: Scientific/Engineering'
|
||||
]
|
||||
)
|
||||
# Optional dependencies
|
||||
'extras_require': {
|
||||
'pandas': ['pandas'],
|
||||
'vtk': ['vtk', 'silomesh'],
|
||||
'validate': ['lxml']
|
||||
}})
|
||||
|
||||
setup(**kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue