Commit b69c482d authored by Slava Ostroukh's avatar Slava Ostroukh

Make package installable

Both setuptools' and distutils' setup() functions were used, which
is wrong: setuptools is built on top of distutuls and should be used
instead. Calling setup() twice lead to the fact that pip couldn't install
the package because of two egg-infos generated.

In addition, some formatting was done in setup.py.
parent c00cb116
'''
Execute with python3 setup.py build_ext --inplace
'''
from setuptools import setup as setup_stools
from setuptools import find_packages
import sys
import numpy
from setuptools import setup, find_packages
from Cython.Build import cythonize
if sys.version_info < (3, 5):
print('poisson requires Python 3.5 or above.')
sys.exit(1)
install_requires = [
'scipy',
'numpy',
'matplotlib',
'scipy',
'numpy',
'matplotlib',
]
setup_stools(
name='poisson',
description='Poisson solver using finite volume',
author='Poisson authors',
license='BSD',
classifiers=[
'Development Status :: Pre-alpha',
'Programming Language :: Python :: 3.6',],
packages=find_packages('.'),
install_requires=install_requires,
)
from distutils.core import setup as setup_cy
from Cython.Build import cythonize
import numpy
setup_cy(ext_modules = cythonize(['poisson/discrete/_finite_volume.pyx',
'poisson/discrete/_discrete_poisson.pyx',
'poisson/discrete/_linear_problem.pyx']),
include_dirs=[numpy.get_include()])
setup(
name='poisson',
description='Poisson solver using finite volume',
author='Poisson authors',
license='BSD',
classifiers=[
'Development Status :: Pre-alpha',
'Programming Language :: Python :: 3.6',],
packages=find_packages('.', exclude='2DEG_chris'),
install_requires=install_requires,
ext_modules=cythonize(['poisson/discrete/_finite_volume.pyx',
'poisson/discrete/_discrete_poisson.pyx',
'poisson/discrete/_linear_problem.pyx']),
include_dirs=[numpy.get_include()]
)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment