Skip to content

Commit

Permalink
switched to python
Browse files Browse the repository at this point in the history
  • Loading branch information
msupernaw committed Oct 12, 2023
1 parent fbcd2fa commit 85726ec
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 25 deletions.
19 changes: 8 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
Package: processR
Title: Concurrent processing in R
Version: 1.0
Authors@R:
Authors@R:
person("Matthew", "Supernaw", , "[email protected]", role = c("aut", "cre"))
Description: A multi-process package for R.
License: GPL (>= 2)
URL: https://github.com/nmfs-fish-tools/processR
BugReports: https://github.com/nmfs-fish-tools/processR/issues
Depends:
R (>= 4.0.0)
Imports:
BH,
methods,
Rcpp (>= 1.0.10),
RInside
LinkingTo:
Rcpp,
RInside
Depends: R (>= 4.0.0)
Imports: BH, methods, Rcpp (>= 1.0.10), RInside
LinkingTo: Rcpp, RInside
Encoding: UTF-8
RoxygenNote: 7.2.3
SystemRequirements: C++17
NeedsCompilation: yes
Packaged: 2023-10-12 17:23:54 UTC; mattadmin
Author: Matthew Supernaw [aut, cre]
Maintainer: Matthew Supernaw <[email protected]>
8 changes: 8 additions & 0 deletions clean.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env python3

from pydefs.do_rm import do_rm

do_rm('processRCMake_1.tar.gz')
do_rm('processRCMake.Rcheck')
do_rm('_library')
do_rm('mytest.Rout')
1 change: 0 additions & 1 deletion clean.sh

This file was deleted.

2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ which cmake

RBIN=$(which R)

echo R --version
echo $(R --version)

RHOME=$(${RBIN} --slave --no-save -e 'cat(R.home())')
RUSER=$(${RBIN} --slave --no-save -e 'cat(Sys.getenv("R_LIBS_USER"))')
Expand Down
35 changes: 35 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python3

from pydefs.do_call import do_call

import os
import platform
import subprocess
import sys

do_call([sys.executable, 'clean.py'])

if platform.system() == 'Windows':
do_call(['where', 'cmake'], fix_message='Install cmake, add cmake to PATH')
do_call(['where', 'R'], fix_message='Install R, add R.exe to PATH')
do_call(['where', 'sh'], fix_message='Install Rtools, add sh.exe to PATH')
do_call(['where', 'g++'], fix_message='Install Rtools, add g++.exe to PATH')
else:
do_call(['which', 'cmake'])

local_library = os.path.join(os.getcwd(), '_library')
os.mkdir(local_library)

packname = 'ProcessRCMake_1.0.tar.gz'

logfiles = ['00install.out']
logfiles = [os.path.join('ProcessRCMake.Rcheck', x) for x in logfiles]

do_call(['R', 'CMD', 'build', '.'])
do_call(['R', 'CMD', 'check', packname], info_files=logfiles)
do_call(['R', 'CMD', 'INSTALL', '-l', local_library, packname])

result_out = os.path.join(os.getcwd(), 'mytest.Rout')
os.environ['R_LIBS_USER'] = local_library


12 changes: 0 additions & 12 deletions run.sh

This file was deleted.

0 comments on commit 85726ec

Please sign in to comment.