Skip to content

Commit

Permalink
Provide fake_pyrex to make setuptools work with Cython
Browse files Browse the repository at this point in the history
  • Loading branch information
Dag Sverre Seljebotn committed Mar 9, 2010
1 parent 3cd3be2 commit 018179c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions fake_pyrex/Pyrex/Distutils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# work around broken setuptools monkey patching
1 change: 1 addition & 0 deletions fake_pyrex/Pyrex/Distutils/build_ext.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build_ext = "yes, it's there!"
1 change: 1 addition & 0 deletions fake_pyrex/Pyrex/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# work around broken setuptools monkey patching
2 changes: 2 additions & 0 deletions fake_pyrex/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This directory is here to fool setuptools into building .pyx files
even if Pyrex is not installed. See ../setup.py.
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
DOWNLOAD_URL = "http://code.google.com/p/scikits-sparse/downloads/list"
VERSION = '0.1+dev'

# Add our fake Pyrex at the end of the Python search path
# in order to fool setuptools into allowing compilation of
# pyx files to C files. Importing Cython.Distutils then
# makes Cython the tool of choice for this rather than
# (the possibly nonexisting) Pyrex.
project_path = os.path.split(__file__)[0]
sys.path.append(os.path.join(project_path, 'fake_pyrex'))

from setuptools import setup, find_packages, Extension
from Cython.Distutils import build_ext
import numpy as np
Expand Down

0 comments on commit 018179c

Please sign in to comment.