Only install via setuptools

This commit is contained in:
Paul Romano 2017-09-29 11:11:18 -05:00
parent 2673880a9c
commit 232f40e119

View file

@ -3,13 +3,8 @@
import glob
import sys
import numpy as np
try:
from setuptools import setup
have_setuptools = True
except ImportError:
from distutils.core import setup
have_setuptools = False
from setuptools import setup
try:
from Cython.Build import cythonize
have_cython = True
@ -28,11 +23,12 @@ else:
with open('openmc/__init__.py', 'r') as f:
version = f.readlines()[-1].split()[-1].strip("'")
kwargs = {'name': 'openmc',
'version': version,
'packages': ['openmc', 'openmc.capi', 'openmc.data', 'openmc.mgxs',
'openmc.model', 'openmc.stats'],
'scripts': glob.glob('scripts/openmc-*'),
kwargs = {
'name': 'openmc',
'version': version,
'packages': ['openmc', 'openmc.capi', 'openmc.data', 'openmc.mgxs',
'openmc.model', 'openmc.stats'],
'scripts': glob.glob('scripts/openmc-*'),
# Data files and librarries
'package_data': {
@ -42,33 +38,30 @@ kwargs = {'name': 'openmc',
# 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'
]}
'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'
],
if have_setuptools:
kwargs.update({
# Required dependencies
'install_requires': ['six', 'numpy>=1.9', 'h5py', 'scipy', 'pandas>=0.17.0'],
# Required dependencies
'install_requires': ['six', 'numpy>=1.9', 'h5py', 'scipy',
'pandas>=0.17.0', 'lxml'],
# Optional dependencies
'extras_require': {
'decay': ['uncertainties'],
'plot': ['matplotlib', 'ipython'],
'vtk': ['vtk', 'silomesh'],
'validate': ['lxml']
},
})
# Optional dependencies
'extras_require': {
'decay': ['uncertainties'],
'plot': ['matplotlib', 'ipython'],
'vtk': ['vtk', 'silomesh'],
},
}
# If Cython is present, add resonance reconstruction capability
if have_cython: