Skip to content

Update cfitsio to 3.41 - #6477

Merged
saimn merged 6 commits into
astropy:masterfrom
mhvk:update-cfitsio
Sep 1, 2017
Merged

saimn merged 6 commits into
astropy:masterfrom
mhvk:update-cfitsio

Conversation

@mhvk

@mhvk mhvk commented Aug 24, 2017

Copy link
Copy Markdown
Contributor

This updates cfitsio to v3.41. One immediate question: I added a script that separates out the library files actually needed from sample programmes. Should we still include those additional files (also README, etc.)? I can easily not include them by removing the third commit, with possible adjustment of trim_cfitsio.sh to do this automatically.

@mhvk mhvk added external PRs and issues related to external packages vendored with Astropy (astropy.extern) io.fits labels Aug 24, 2017
@mhvk
mhvk requested review from MSeifert04 and saimn August 24, 2017 19:35
@astropy-bot

astropy-bot Bot commented Aug 24, 2017 •

Copy link
Copy Markdown

Hi there @mhvk 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labelled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃.

Everything looks good from my point of view! 👍

@mhvk mhvk added this to the v3.0.0 milestone Aug 24, 2017
@mhvk

mhvk commented Aug 24, 2017 •

Copy link
Copy Markdown
Contributor Author

Hmm, appveyor fails with

<stdout>(720) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

This file is not shipped with cfitsio

Hmm, seems it should have been excluded on windows (in zconf.h)
EDIT: no that is for zlib only, and seems to work as intended. Here, somehow one has to set FF_NO_UNISTD_H but it is strange that that wouldn't have been the case previously.

@mhvk mhvk mentioned this pull request Aug 24, 2017
@mhvk

mhvk commented Aug 24, 2017

Copy link
Copy Markdown
Contributor Author

cc @astrofrog, @eteq for the what-to-include packaging question

Anybody who can help with the windows issue (linux seems fine; still waiting on MacOS)

Comment thread cextern/cfitsio/CMakeLists.txt Outdated
# Define
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
# Need an empty unistd.h in MSVC for flex-generated eval_l.c:
FILE(WRITE ${CMAKE_SOURCE_DIR}/unistd.h "")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't take care of the missing unistd.h file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the Makefile get executed/included (certainly not now, I don't think before either - setup_package just includes *.c files), but obviously it should not be hard to mimic this in setup_package. I don't really understand, though, why this worked before...

@MSeifert04

Copy link
Copy Markdown
Contributor

Should we still include those additional files (also README, etc.)?

Depends a bit on the built time. They probably won't hurt but if they significantly increase the build-time I'd say we should remove them again.

@mhvk

mhvk commented Aug 24, 2017

Copy link
Copy Markdown
Contributor Author

The other files do not get built at all - everything relevant is moved to a new lib directory. I mostly wondered what best practice was - at some level one wants to stay as close to the original package as possible.

@astrofrog

Copy link
Copy Markdown
Member

I don't feel strongly about this - @eteq @taldcroft?

@mhvk

mhvk commented Aug 25, 2017

Copy link
Copy Markdown
Contributor Author

OK, now got the windows build working as well. I'm Cc'ing @embray as he's probably the last one to have done this and might have comments. Overall, it seems OK, but suggestions are still very welcome on the setup with setup_package.py and trim_cfitsio.sh. Also, are the comments in those files clear enough for future updates?

@saimn

saimn commented Aug 29, 2017

Copy link
Copy Markdown
Contributor

The other files do not get built at all - everything relevant is moved to a new lib directory. I mostly wondered what best practice was - at some level one wants to stay as close to the original package as possible.

I have no strong preference, on one hand staying close to the original package makes it easier to update, on the other hand we need only a subset of these files and some tweaks are needed anyway to compile cfitsio when included in Astropy (like moving files in a lib/ subdirectory). I think I would go for cleaning unused files (automake/cmake files, docs, scripts etc.).

@MSeifert04

Copy link
Copy Markdown
Contributor

Okay, let's stick with the required files and remove all the (new) unused ones. Is that easily possible @mhvk?

@mhvk
mhvk force-pushed the update-cfitsio branch 2 times, most recently from 74e2a51 to 593c86f Compare August 31, 2017 14:14
@mhvk

mhvk commented Aug 31, 2017

Copy link
Copy Markdown
Contributor Author

@MSeifert04 - yes, not hard to remove all files, since I kept that as a single commit. Now removed them all, and adjusted the trim_cfitsio script to do that automatically. Hopefully, all tests will still pass...

@saimn

saimn commented Aug 31, 2017

Copy link
Copy Markdown
Contributor

Thanks @mhvk , tests pass so I guess it's good to go 😅
Ok for you @MSeifert04 ?

@MSeifert04 MSeifert04 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't be a proper review if I can't find something to nitpick about :)

Otherwise 👍

Comment thread cextern/trim_cfitsio.sh Outdated
#!/bin/sh

# This script should be run every time cfitsio is updated.
# This moves allthe code needed for the actual library to lib

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace between all and the.

@mhvk

mhvk commented Aug 31, 2017

Copy link
Copy Markdown
Contributor Author

@MSeifert04 - OK, done as part of the rebase...

@saimn
saimn merged commit c40ec58 into astropy:master Sep 1, 2017
@MSeifert04

Copy link
Copy Markdown
Contributor

Thanks @mhvk !

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

Labels

external PRs and issues related to external packages vendored with Astropy (astropy.extern) io.fits

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants