update: libxlsxwriter 1.2.4 with upstream directory structure#103
Conversation
Restructure vendored libxlsxwriter source to mirror the upstream distribution layout under src/libxlsxwriter/: src/libxlsxwriter/src/ (was src/libxlsxwriter/) src/libxlsxwriter/include/ (was src/include/) src/libxlsxwriter/third_party/ (was src/md5/, src/minizip/, src/tmpfileplus/) This makes future updates a simple copy of the src/, include/, and third_party/ directories from the upstream tarball. Update src/Makevars with the new paths and add src/libxlsxwriter/**/Makefile* to .gitignore so upstream Makefiles are not tracked (they trigger R CMD check warnings about GNU extensions and are not used by the R build). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Be careful of adding extra files that we do not need (e.g. all the minizip stuff), because you will have to comply with licensing and declare copyright of everything included in the package, even if the files are not used at all. |
|
@jeroen, Thank you for that note/warning. I'll cull the parts that we're not using and add them to .gitignore. |
dtoa is included in the upstream libxlsxwriter distribution but is not compiled by the R package — only its header (emyg_dtoa.h) is vendored via src/libxlsxwriter/include/xlsxwriter/third_party/. Remove the source directory and add it to .gitignore so it stays absent after future upstream copy-in updates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…icense.txt Vendor src/libxlsxwriter/License.txt from the upstream tarball (more complete and up-to-date than the old inst/COPYRIGHT) and replace inst/COPYRIGHT with a git symlink pointing to it. This way future libxlsxwriter updates automatically keep the license current. Also note inst/COPYRIGHT in LICENSE for discoverability. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I changed the COPYRIGHT file to be a symlink to the libxlsxwriter license file so that we will remain constantly up to date. I think that as long as the R build process works with that (currently running), it should be a perpetual solution. |
|
That does not suffice for CRAN, they will grep for all files in the package with a line |
|
Also symlinks do not work on all Windows systems... |
|
I verified that the symlink works as expected on my Windows computer. (git for Windows handles symlinks.) In #101, I've fixed it so that there is a All of the current third-party included directories (after I removed |
IIRC, problems would appear on Windows when extracting a tar.gz file that contains symlinks. So I think it's better to not put them into the R source package. |
|
I just verified that R CMD build dereferences symlinks automatically. So, it's not a symlink in the source package; it's a regular file. The reason I'd like to keep it is that a symlink automatically keeps us license-compliant and at least according to CRAN policies is compliant there, too. |
Okay I did not know that. According to the docs, the default for |
Restructure vendored libxlsxwriter source to mirror the upstream distribution layout under src/libxlsxwriter/:
src/libxlsxwriter/src/ (was src/libxlsxwriter/)
src/libxlsxwriter/include/ (was src/include/)
src/libxlsxwriter/third_party/ (was src/md5/, src/minizip/, src/tmpfileplus/)
This makes future updates a simple copy of the src/, include/, and third_party/ directories from the upstream tarball. Update src/Makevars with the new paths and add src/libxlsxwriter/**/Makefile* to .gitignore so upstream Makefiles are not tracked (they trigger R CMD check warnings about GNU extensions and are not used by the R build).