diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2015-07-31 16:25:39 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2015-07-31 16:25:39 +0200 |
| commit | 4f2f84ac3884f80b4f753b924ba2ed2017c23e2b (patch) | |
| tree | e520351de029adc2f5c7b9bc31b4056474460291 | |
| parent | reformat to proper python and R packages (diff) | |
| download | SyncRNG-4f2f84ac3884f80b4f753b924ba2ed2017c23e2b.tar.gz SyncRNG-4f2f84ac3884f80b4f753b924ba2ed2017c23e2b.zip | |
remove deprecated Makefile and add install instructions in README
| -rw-r--r-- | Makefile | 17 | ||||
| -rw-r--r-- | README.md | 21 |
2 files changed, 12 insertions, 26 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index a057166..0000000 --- a/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -PYTHON=python2 -RLIB=RSyncRNG.so -CFILE=syncrng.c - -.PHONY: all clean - -all: R python - -python: - $(PYTHON) setup.py build_ext --inplace - -R: - R CMD SHLIB -o $(RLIB) $(CFILE) - -clean: - rm -rf build - rm -f *.so *.o *.pyc @@ -18,14 +18,9 @@ be the same in both languages, provided the same seed is used. How --- -In Python, the interface `SyncRNG.py` can be used as an importable module. In -R, it suffices to simply source the `SyncRNG.R` file. Before use, make sure to -build both shared libraries using: - - make - -Then, in a Python script located in the same directory as `syncrng.so` and -`SyncRNG.py`, you can do: +First install the packages as stated under Installation. Then, in a Python +script located in the same directory as `syncrng.so` and `SyncRNG.py`, you can +do: ```python from SyncRNG import SyncRNG @@ -52,7 +47,15 @@ You'll notice that the random numbers are indeed the same. Installation ------------ -The Python module can be installed locally for the user using: +Installing the R package can be done through devtools: + +```R +library(devtools) +devtools::install_github("GjjvdBurg/SyncRNG") +``` + +To install SyncRNG as a Python module, first clone the repository. The Python +module can then be installed locally for the user using: ```sh python setup.py install --user |
