woensdag 28 oktober 2015

python setup.py cython

Content of setup.py


from setuptools import setup, find_packages,Extension, Command

try:
    from Cython.Distutils import build_ext
except ImportError:
    from distutils.command.build_ext import build_ext
    sources=['midistream.c']
else:
    sources=['midistream.pyx']

setup(
    name ='midistream',
    version='1.0',
    packages=find_packages(),
    cmdclass = {'build_ext': build_ext},
    ext_modules=[
    Extension('midistream', ['midistream.pyx'])
    ],
   
)


Rename midistream.py midistream.pyx 


run:

sudo python setup.py build_ext --inplace
sudo python setup.py install

midistream.o and midistream.so are made


woensdag 7 oktober 2015

emacs packages

 in scratch press C-j


install el-get
(url-retrieve
 "https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el"
 (lambda (s)
   (goto-char (point-max))
   (eval-print-last-sexp)))