Skip to content

Commit

Permalink
Merged in more-cleanup (pull request #167)
Browse files Browse the repository at this point in the history
Cleanup setup.py
  • Loading branch information
prabhuramachandran committed May 18, 2015
2 parents d5d0921 + b82c015 commit 7529328
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ install:
- cmd /v:on /e:on /c enpkg numpy

# Install pysph related dependencies.
- "%CMD_IN_ENV% pip install -r pip_requirements.txt"
- "%CMD_IN_ENV% pip install -r requirements.txt"

# Build pysph.
- "%CMD_IN_ENV% python setup.py develop"
Expand Down
File renamed without changes.
33 changes: 21 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy
import commands
import os
from subprocess import check_output
import sys
from os import path

Expand Down Expand Up @@ -119,13 +119,15 @@ def get_zoltan_directory(varname):
if Have_MPI:
mpic = 'mpic++'
if compiler == 'intel':
link_args = commands.getoutput(mpic + ' -cc=icc -link_info')
link_args = check_output([mpic, '-cc=icc', '-link_info']).strip()
link_args = link_args[3:]
compile_args = commands.getoutput(mpic +' -cc=icc -compile_info')
compile_args = check_output(
[mpic, '-cc=icc', '-compile_info']
).strip()
compile_args = compile_args[3:]
else:
link_args = commands.getoutput(mpic + ' --showme:link')
compile_args = commands.getoutput(mpic +' --showme:compile')
link_args = check_output([mpic, '--showme:link']).strip()
compile_args = check_output([mpic, '--showme:compile']).strip()
mpi_link_args.extend(link_args.split())
mpi_compile_args.extend(compile_args.split())
mpi_inc_dirs.append(mpi4py.get_include())
Expand Down Expand Up @@ -299,15 +301,22 @@ def get_zoltan_directory(varname):
if 'build_ext' in sys.argv or 'develop' in sys.argv or 'install' in sys.argv:
generator = path.join('pyzoltan', 'core', 'generator.py')
for pth in (path.join('pyzoltan', 'core'), path.join('pysph', 'base')):
print commands.getoutput(
'{py} {generator} {pth}'.format(
py=sys.executable, generator=generator, pth=pth
)
)
print check_output([sys.executable, generator, pth])

info = {}
execfile(path.join('pysph', '__init__.py'), info)

extras_require = dict(
mpi=['mpi4py>=1.2'],
ui=['mayavi>=4.0', 'nose'],
test=['nose']
)

everything = set()
for dep in extras_require.values(): everything.update(dep)
extras_require['all'] = everything


setup(name='PySPH',
version = info['__version__'],
author = 'PySPH Developers',
Expand All @@ -326,11 +335,11 @@ def get_zoltan_directory(varname):
exclude_package_data={
'' : ['Makefile', '*.bat', '*.cfg', '*.rst', '*.sh', '*.yml'],
},

ext_modules = ext_modules,

include_package_data = True,
cmdclass=cmdclass,
install_requires = ['numpy', 'mako', 'Cython>=0.19'],
extras_require = extras_require,
zip_safe = False,
entry_points = """
[console_scripts]
Expand Down

0 comments on commit 7529328

Please sign in to comment.