From 6945ebb546d10fa9c13b32befcedc6240cbb1d80 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 31 Jul 2015 14:19:02 +0200 Subject: allow installation as python module --- README.md | 14 ++++++++++++++ setup.py | 27 +++++++++++++-------------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ac9a83e..65e5f5a 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,20 @@ for (i in 1:10) { You'll notice that the random numbers are indeed the same. +Installation +------------ + +The Python module can be installed locally for the user using: + +```sh +python setup.py install --user +``` +or system-wide through: + +```sh +sudo python setup.py install +``` + Notes ----- diff --git a/setup.py b/setup.py index 3c6bf16..80ac5bd 100644 --- a/setup.py +++ b/setup.py @@ -1,19 +1,18 @@ from distutils.core import setup, Extension -""" -module1 = Extension('syncrng', - define_macros = [('TARGETPYTHON', '1')], - sources=['syncrng.c']) - -setup (name = 'SyncRNG', - version = '0.1', - description='A synchronized Tausworthe RNG for Python and R', - ext_modules = [module1]) -""" - setup( - ext_modules=[Extension("syncrng", - define_macros=[('TARGETPYTHON', '1')], - sources=["syncrng.c"])], + name='SyncRNG', + author='Gertjan van den Burg', + version='0.1', + description='A synchronized Tausworthe RNG for Python and R', + license='GPL v2', + py_modules=['SyncRNG'], + ext_modules=[ + Extension( + "syncrng", + define_macros=[('TARGETPYTHON', '1')], + sources=["syncrng.c"] + ) + ], ) -- cgit v1.2.3