Browse Source

Start working on setup.py

tags/nilmdb-0.2^2
Jim Paris 11 years ago
parent
commit
727af94722
3 changed files with 43 additions and 1 deletions
  1. +17
    -1
      .gitignore
  2. +1
    -0
      nilmdb/server/__init__.py
  3. +25
    -0
      setup.py

+ 17
- 1
.gitignore View File

@@ -1,7 +1,23 @@
db/
# Tests
tests/*testdb/
.coverage
db/

# Compiled / cythonized files
build/
*.pyc
nilmdb/server/interval.c
nilmdb/server/interval.so
nilmdb/server/layout.c
nilmdb/server/layout.so
nilmdb/server/rbtree.c
nilmdb/server/rbtree.so

# Setup junk
dist/
nilmdb.egg-info/

# Misc
design.html
timeit*out


+ 1
- 0
nilmdb/server/__init__.py View File

@@ -2,6 +2,7 @@

# 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:
import pyximport
pyximport.install()


+ 25
- 0
setup.py View File

@@ -0,0 +1,25 @@
#!/usr/bin/python

# This is supposed to be using Distribute:
#
# distutils provides a "setup" method.
# setuptools is a set of monkeypatches on top of that.
# distribute is a particular version/implementation of setuptools.
#
# So we don't really know if this is using the old setuptools or the
# Distribute-provided version of setuptools.

from setuptools import setup, find_packages
from distutils.extension import Extension
from Cython.Build import cythonize

# Build cython modules
cython_modules = cythonize("**/*.pyx")

# Run setup
setup(name='nilmdb',
version='1.0',
install_requires = [ 'distribute' ],
packages = find_packages(),
ext_modules = cython_modules,
)

Loading…
Cancel
Save