Skip to content
Snippets Groups Projects
Commit 896ae2ed authored by Bollen's avatar Bollen
Browse files

use numpy.get_includes in C-extensions

parent bda5fd58
No related branches found
No related tags found
No related merge requests found
Pipeline #2442 passed
......@@ -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
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment