Skip to content

Commit

Permalink
Merge pull request #95 from grosenberger/fix/cython
Browse files Browse the repository at this point in the history
[FIX] Cython in setup.py / Include PYX
  • Loading branch information
grosenberger committed Feb 22, 2021
2 parents 45897b2 + 80bbca1 commit b179f18
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global-include *.pyx
18 changes: 16 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@
from setuptools import setup, find_packages
from distutils.extension import Extension

ext_modules = [Extension("pyprophet._optimized", ["pyprophet/_optimized.c"])]
try:
from Cython.Build import cythonize
except ImportError:
use_cython = False
else:
use_cython = True

cmdclass = {}
ext_modules = []

if use_cython:
ext_modules += [Extension("pyprophet._optimized", ["pyprophet/_optimized.pyx"])]
ext_modules = cythonize(ext_modules)
else:
ext_modules += [Extension("pyprophet._optimized", ["pyprophet/_optimized.c"])]

# read the contents of README for PyPI
from os import path
Expand All @@ -12,7 +26,7 @@
long_description = f.read()

setup(name='pyprophet',
version="2.1.9",
version="2.1.10",
author="The PyProphet Developers",
author_email="[email protected]",
description="PyProphet: Semi-supervised learning and scoring of OpenSWATH results.",
Expand Down

0 comments on commit b179f18

Please sign in to comment.