Browse Source

Always use pyximport, since we now require cython.

This is optional and helps with development.  If we ever need/want to
support systems without Cython, this can be wrapped in a
try/except:pass block (and the .c files can be included in the
MANIFEST.in so that source distributions include them).
tags/nilmdb-2.0.0
Jim Paris 2 years ago
parent
commit
19a34a07a4
2 changed files with 4 additions and 8 deletions
  1. +1
    -0
      README.txt
  2. +3
    -8
      nilmdb/server/__init__.py

+ 1
- 0
README.txt View File

@@ -15,6 +15,7 @@ Prerequisites:
pip3 install -r requirements.txt

Test:

python3 setup.py nosetests

Install:


+ 3
- 8
nilmdb/server/__init__.py View File

@@ -1,13 +1,8 @@
"""nilmdb.server"""

# Try to set up pyximport to automatically rebuild Cython modules. If
# this doesn't work, it's OK, as long as the modules were built externally.
# (e.g. python setup.py build_ext --inplace)
try: # pragma: no cover
import pyximport
pyximport.install(inplace = True, build_in_temp = False)
except (ImportError, TypeError): # pragma: no cover
pass
# Set up pyximport to automatically rebuild Cython modules if needed.
import pyximport
pyximport.install(inplace = True, build_in_temp = False)

from nilmdb.server.nilmdb import NilmDB
from nilmdb.server.server import Server, wsgi_application


Loading…
Cancel
Save