Completed
Push — main ( a2e919...ba9c59 )
by Angeline
15s queued 12s
created

setup.read()   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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