-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
It turns out that Cython is still using a deprecated Numpy API; most other packages have moved on to new APIs.
Anyways, to avoid Cython spitting out these warnings, you can make one change to the inversion extension in setup.py. Since I made some other suggested changes to setup.py in other issues, I have attached the file for whatever it is worth.
# to run: python setup.py build_ext --inplace
#from setuptools import setup,Extension
# 20181227-1 texadactyl Explicitly set language level, avoid "FutureWarning" warnings
# 20181227-2 texadactyl Avoid "#warning "Using deprecated NumPy API" warnings
import numpy as np
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
#setup(ext_modules=cythonize('EightBitTransit/cGridFunctions.pyx'))
#setup(ext_modules=cythonize('EightBitTransit/cTransitingImage.pyx'))
#setup(ext_modules=cythonize('EightBitTransit/misc.pyx'))
#setup(ext_modules=cythonize('EightBitTransit/deprecated.pyx'),include_dirs=[np.get_include()])
#setup(ext_modules=cythonize('EightBitTransit/inversion.pyx'),include_dirs=[np.get_include()])
extensions = [
Extension('EightBitTransit.cGridFunctions',['EightBitTransit/cGridFunctions.pyx']),
Extension('EightBitTransit.cTransitingImage',['EightBitTransit/cTransitingImage.pyx']),
Extension('EightBitTransit.misc',['EightBitTransit/misc.pyx']),
Extension('EightBitTransit.inversion',['EightBitTransit/inversion.pyx'],include_dirs=[np.get_include()],define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')]) # 20181227-2
]
setup(name='EightBitTransit',
version='1.0',
description='Shadow imaging of transiting objects',
author='Emily Sandford',
author_email='esandford@astro.columbia.edu',
url='https://github.com/esandford/EightBitTransit',
license='MIT',
packages=['EightBitTransit'],
include_dirs=[np.get_include()],
#install_requires=['numpy','matplotlib','warnings','scipy','copy','math','itertools','collections'],
ext_modules=cythonize(extensions, compiler_directives={'language_level': 2})) # 20181227-1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels