Commit 896ae2ed authored by Sander Bollen's avatar Sander Bollen

use numpy.get_includes in C-extensions

parent bda5fd58
Pipeline #2442 passed with stage
in 1 minute and 23 seconds
......@@ -3,7 +3,6 @@ build:
tags:
- docker
script:
- apt-get update && apt-get install -y python-numpy
- pip install --upgrade Cython
- pip install --upgrade numpy
- pip install --upgrade pip setuptools wheel
......
......@@ -6,23 +6,34 @@ setup.py
:copyright: (c) 2018 Leiden University Medical Center
:license: MIT
"""
from os.path import abspath, dirname, join
from setuptools import setup, find_packages
from Cython.Build import cythonize
from vtools import __version__
try:
from Cython.Build import cythonize
except ImportError:
raise NotImplementedError("Installing cython on the fly not yet supported")
try:
import numpy as np
except ImportError:
raise NotImplementedError("Installing numpy on the fly not yet supported")
readme_file = join(abspath(dirname(__file__)), "README.md")
with open(readme_file) as desc_handle:
long_desc = desc_handle.read()
# create extensions and add numpy includes to all of them.
cython_extensions = cythonize("vtools/*.pyx")
for ext in cython_extensions:
ext.include_dirs.append(np.get_include())
setup(
name="vtools",
version=__version__,
version="0.0.1",
description="Various tools operating over VCF files",
author="Sander Bollen",
author_email="a.h.b.bollen@lumc.nl",
......@@ -46,5 +57,5 @@ setup(
classifiers=[
"Topic :: Scientific/Engineering :: Bio-Informatics"
],
ext_modules=cythonize("vtools/*.pyx")
ext_modules=cython_extensions
)
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