New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify extconf.rb to look for R lib and headers in common directories as... #7

Merged
merged 2 commits into from Nov 29, 2011

Conversation

Projects
None yet
3 participants
@Mechaferret

Mechaferret commented Nov 20, 2011

... well as config (similar to mysql2 gem).

This makes rsruby play nice with bundler with no additional configuration required in most cases.

(And THAT made all the developers on my team and our capistrano deploy scripts very happy....)

Mechaferret Mechaferret
Modify extconf.rb to look for R lib and headers in common directories…
… as well as config (similar to mysql2 gem)
@wwood

This comment has been minimized.

Show comment
Hide comment
@wwood

wwood Nov 21, 2011

I like the sound of this. I haven't actually tried it, but should it use File.join() instead of hard-coding the forward slashes? Some people still have to use windows..

wwood commented Nov 21, 2011

I like the sound of this. I haven't actually tried it, but should it use File.join() instead of hard-coding the forward slashes? Some people still have to use windows..

@Mechaferret

This comment has been minimized.

Show comment
Hide comment
@Mechaferret

Mechaferret Nov 21, 2011

I haven't ever tried to use ruby and R on a Windows box... It probably does
make sense to use File.join() on the additions of /lib and /include (the
actual directory lists are OS-specific). I'll go ahead and change that.

On Sun, Nov 20, 2011 at 10:35 PM, Ben J Woodcroft <
reply@reply.github.com

wrote:

I like the sound of this. I haven't actually tried it, but should it use
File.join() instead of hard-coding the forward slashes? Some people still
have to use windows..


Reply to this email directly or view it on GitHub:
#7 (comment)

Mechaferret commented Nov 21, 2011

I haven't ever tried to use ruby and R on a Windows box... It probably does
make sense to use File.join() on the additions of /lib and /include (the
actual directory lists are OS-specific). I'll go ahead and change that.

On Sun, Nov 20, 2011 at 10:35 PM, Ben J Woodcroft <
reply@reply.github.com

wrote:

I like the sound of this. I haven't actually tried it, but should it use
File.join() instead of hard-coding the forward slashes? Some people still
have to use windows..


Reply to this email directly or view it on GitHub:
#7 (comment)

@wwood

This comment has been minimized.

Show comment
Hide comment
@wwood

wwood Nov 21, 2011

I haven't ever tried to use ruby and R on a Windows box

Me either. Looks good, but what about these paths?

+some_paths = ENV['PATH'].split(File::PATH_SEPARATOR) + %w[
+  /usr/local/lib64/R
+  /usr/local/lib/R 
+  /usr/lib64/R 
+  /usr/lib/R 
+  /Library/Frameworks/R.framework/Resources
+]

wwood commented Nov 21, 2011

I haven't ever tried to use ruby and R on a Windows box

Me either. Looks good, but what about these paths?

+some_paths = ENV['PATH'].split(File::PATH_SEPARATOR) + %w[
+  /usr/local/lib64/R
+  /usr/local/lib/R 
+  /usr/lib64/R 
+  /usr/lib/R 
+  /Library/Frameworks/R.framework/Resources
+]
@Mechaferret

This comment has been minimized.

Show comment
Hide comment
@Mechaferret

Mechaferret Nov 22, 2011

The /usr/* paths would only ever apply to UNIX, and the /Library/* is only Mac. The find_library and find_header methods don't break when handed paths that don't exist, so it should be OK to leave those as forward slashes (they would never work on Windows and they won't make finding any paths from, say, ENV['PATH'], fail on Windows).

The way to support Windows in the hardcoded directories is probably to figure out what common Windows install paths for R are, and add them to the list with backslashes.... I'd hate to give the false impression that the current hardcoded list takes Windows into consideration :) I did a quick search in the R documentation and didn't find any standard paths listed for Windows.

Mechaferret commented Nov 22, 2011

The /usr/* paths would only ever apply to UNIX, and the /Library/* is only Mac. The find_library and find_header methods don't break when handed paths that don't exist, so it should be OK to leave those as forward slashes (they would never work on Windows and they won't make finding any paths from, say, ENV['PATH'], fail on Windows).

The way to support Windows in the hardcoded directories is probably to figure out what common Windows install paths for R are, and add them to the list with backslashes.... I'd hate to give the false impression that the current hardcoded list takes Windows into consideration :) I did a quick search in the R documentation and didn't find any standard paths listed for Windows.

@wwood

This comment has been minimized.

Show comment
Hide comment
@wwood

wwood Nov 22, 2011

OK sure, if what you say is true then sounds good. Does anyone volunteer to
test this?

wwood commented Nov 22, 2011

OK sure, if what you say is true then sounds good. Does anyone volunteer to
test this?

alexgutteridge added a commit that referenced this pull request Nov 29, 2011

Merge pull request #7 from Mechaferret/build_without_flags
Modify extconf.rb to look for R lib and headers in common directories as...

@alexgutteridge alexgutteridge merged commit 56b95a6 into alexgutteridge:master Nov 29, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment