Skip to content
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

Support windows and macosx binary packages #16

Merged
merged 1 commit into from Apr 26, 2015

Conversation

@jankatins
Copy link
Contributor

@jankatins jankatins commented Apr 13, 2015

This commit adds support for windows and macosx binary packages.
Package type is automatically inferred from the filename.

It also creates the package structure
(./{src|bin/windows|bin/macosx}/contrib/{rversion/|}) if these
dirs do not exist.

Closes: #4

@jankatins
Copy link
Contributor Author

@jankatins jankatins commented Apr 13, 2015

from #13

A loose idea would be the following:
-- write a helper function or two which return book and answer isValidSourceFile() -- essentially by a grep against https://github.com/eddelbuettel/drat/blob/master/R/pruneRepo.R#L8 or variant thereof
-- add a similar helper isValidBinaryPackage() for binary packages (ie just foo_zip$ ?)
-- branch the code accordingly but very carefully

The current code is doing it slightly different: it asked what type the package is and constructs the path where to copy the package to accordingly. I could refactor both big switches into two functions which would do getPackageTypeFromPackage(inputFilename) and getFiledirForPackageType(packageType).

This commit adds support for windows and macosx binary packages.
Package type is automatically inferred from the filename.

It also creates the package structure
(`./{src|bin/windows|bin/macosx}/contrib/{rversion/|}`) if these
dirs do not exist.

Closes: #4
@jankatins jankatins force-pushed the jankatins:windows_binary_packages branch from c9b7121 to 3f9810f Apr 25, 2015
@jankatins
Copy link
Contributor Author

@jankatins jankatins commented Apr 25, 2015

I've updated the PR by moving the the main logic into (unexported) functions. I added the possibility to supply R version information to this functions, but didn't expose this in the main 'installPackages()` call.

The binary support is tested against the R repo for the jupyter R kernel packages, both for 3.1 and 3.2

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Apr 25, 2015

Thumbs up for an actual Windows repository. I still have a Windows box at work (maybe not for long) that I should be able to test on. I still don't understand by you don't follow the standard naming scheme of using drat and gh-pages. People already find drat to be confusing, if we add another naming scheme more heads will explode. I do understand your point that it is "yet another" http-serviceable scheme from GH, but it is a) different leading to yet more explanation and) longer to type.

But in a way that's "your problem" and the README referenced above makes it clear -- I just shrug.

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Apr 25, 2015

That said, I do like the new schme with the helper functions. That is much better.

@jankatins
Copy link
Contributor Author

@jankatins jankatins commented Apr 25, 2015

@eddelbuettel you mean why not add to a drat subdir? Mainly because I had to do it manually (script here) and forgot the subdir. And then never used drat to get packages from there, only install.packages(c("rzmq","repr","IRkernel","IRdisplay"), repos="http://irkernel.github.io/").

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Apr 25, 2015

So supposed you add drat/ and moved the files / repo, then the usage would be

drat::addRepo("irkernel")                          # short, sweet, simple
install.packages(c("IRkernel","IRdisplay"))        # assuming the other two are Depends

which I find much simpler -- plus having the drat::addRepo() call in ~/.Rprofile means updates works automagically. Which may be the main point of drat. Anyway -- your problem :)

I'll play with Windows binaries tomorrow. I may have a use case.

eddelbuettel added a commit that referenced this pull request Apr 26, 2015
Support windows and macosx binary packages
@eddelbuettel eddelbuettel merged commit 277b5dc into eddelbuettel:master Apr 26, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.