diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..1df304b
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["setuptools", "wheel", "numpy", "Cython"]
+build-backend = "setuptools.build_meta"
diff --git a/setup.py b/setup.py
index 52440fa..47566a3 100644
--- a/setup.py
+++ b/setup.py
@@ -1,39 +1,25 @@
 from setuptools import setup, find_packages
 from setuptools.extension import Extension
-import numpy as np
 import sys
+from Cython.Build import cythonize

-C_COMPILE = True
-USE_CYTHON = True
-
-__version__ = "0.0.0"
+__version__ = "0.17.17"
 exec(open('velocyto/_version.py').read())
 print(sys.argv)

-if C_COMPILE:
-    package_data: dict = {}
-    if USE_CYTHON:
-        from Cython.Build import cythonize
-        extensions = [Extension("velocyto.speedboosted",
-                                ["velocyto/speedboosted.pyx"],
-                                extra_compile_args=['-fopenmp', "-ffast-math"],  # NOTE optional flags -O3 -ffast-math -march=native
-                                extra_link_args=['-fopenmp'])]
-        extensions = cythonize(extensions, include_path=[np.get_include()])
-    else:
-        extensions = [Extension("velocyto.speedboosted",
-                                ["velocyto/speedboosted.c"],
-                                extra_compile_args=['-fopenmp', "-ffast-math"],
-                                extra_link_args=['-fopenmp'])]
-else:
-    extensions = []
-    if "darwin" in sys.platform:
-        compiled = "velocyto/speedboosted.cpython-36m-darwin.so"
-    elif "win" in sys.platform:
-        sys.stdout.write("Sorry, we do not support (or like) Windows OS")
-        sys.exit()
-    elif "linux" in sys.platform:
-        compiled = "velocyto/speedboosted.cpython-36m-x86_64-linux-gnu.so"
-    package_data = {'velocyto': [compiled]}
+
+def get_numpy_include():
+    import numpy
+    return numpy.get_include()
+
+extension = [
+    Extension(
+            name="velocyto.speedboosted",
+            sources=["velocyto/speedboosted.pyx"],
+            include_dirs=[get_numpy_include()]
+    ),
+]
+

 setup(
     name="velocyto",
@@ -55,9 +41,7 @@ setup(
         [console_scripts]
         velocyto=velocyto.commands.velocyto:cli
     ''',
-    ext_modules=extensions,
-    include_dirs=[np.get_include()],
-    package_data=package_data,
+    ext_modules= cythonize(extension),
     # metadata
     author="Linnarsson Lab",
     author_email="sten.linnarsson@ki.se",
