| Total Complexity | 0 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python |
||
| 2 | # -*- encoding: utf-8 -*- |
||
| 3 | |||
| 4 | from glob import glob |
||
| 5 | from os import path, environ |
||
| 6 | from setuptools import setup, find_packages |
||
| 7 | |||
| 8 | # Include extensions only when not on readthedocs.org |
||
| 9 | if environ.get('READTHEDOCS', None) == 'True': |
||
| 10 | extensions = [] |
||
| 11 | else: |
||
| 12 | from numpy.distutils.core import setup, Extension |
||
| 13 | extensions = [ |
||
| 14 | Extension(name='apexpy.fortranapex', |
||
| 15 | sources=['fortranapex/igrf.f90', |
||
| 16 | 'fortranapex/magfld.f90', |
||
| 17 | 'fortranapex/apex.f90', |
||
| 18 | 'fortranapex/makeapexsh.f90', |
||
| 19 | 'fortranapex/apexsh.f90', |
||
| 20 | 'fortranapex/checkapexsh.f90', |
||
| 21 | 'fortranapex/fortranapex.pyf'])] |
||
| 22 | |||
| 23 | setup_kwargs = {'py_modules': [path.splitext(path.basename(pp))[0] |
||
| 24 | for pp in glob('*.py')], |
||
| 25 | 'ext_modules': extensions, |
||
| 26 | 'packages': find_packages()} |
||
| 27 | |||
| 28 | setup(**setup_kwargs) |
||
| 29 |