Repository navigation
Remove unused CFITSIO Fortran wrappers from wheels - #190
Conversation
Build the bundled library with the C API only and preserve the retained Bison parser notice and exception in distributions. Require the notice and C-only exports when checking repaired wheels. Signed-off-by: Trent Nelson <trentn@nvidia.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
melo-gonzo
left a comment
There was a problem hiding this comment.
This looks right. I checked the parts that depend on upstream at the pinned CFITSIO commit:
--without-fortranis a real option there. It setsNOFORTRAN, which dropsf77_wrap1.ctof77_wrap4.cfromlibcfitsio_la_SOURCES. Without the flag, configure adds the wrappers whenever it finds a Fortran compiler, so the flag makes the build independent of the image. The x86_64 wheel log showscfitsio: Building without Fortran support.- The notice in
licenses/CFITSIO-4.7.0-Bison.txtmatcheseval_y.cexactly, and the copyright, license and exception text also matcheseval_tab.h. The GPL text matches gpl-3.0.txt from gnu.org. check_distributions.pyran on all six wheels in CI and passed, so the new symbol check also passed on the real libraries.tests/test_distribution_licenses.pypasses 43 tests. Removing the wrapper check, thecheck_cfitsio_symbolscall, the sdist license-file loop or the new expression term each fails at least one test.
Considerations, none blocking:
- Two branches of
check_cfitsio_symbolshave no failing test: the required C API symbols (ffopen,ffclos,fits_is_reentrant) and the invalid-ELF exit. Acfitsio_elfsvariant withoutfits_is_reentrant, plus non-ELF bytes, would cover both. - The wheel
License-Expressionnow containsGPL-3.0-or-later WITH Bison-exception-2.2. That is the accurate SPDX form, but some license scanners flag GPL-3.0 without reading theWITHclause. It may be worth a heads-up to whoever reviews the release licenses. - The GPU installed-wheel job was still pending when I checked.
Checks at 2bb2715
CFITSIO d6d27653 configure.ac:
AC_ARG_WITH([fortran], [AS_HELP_STRING([--without-fortran],[Build package without Fortran support])], ...
AM_CONDITIONAL(NOFORTRAN, test x$use_fortran = xno)
CFITSIO d6d27653 Makefile.am:
if !NOFORTRAN
libcfitsio_la_SOURCES += $(F77_WRAPPERS)
notice block verbatim in eval_y.c: True
copyright..exception verbatim in eval_tab.h: True
GPL-3.0 text verbatim at end of license file: True
tests/test_distribution_licenses.py, unmodified -> 43 passed
wrapper check removed -> 1 failed, 42 passed
check_cfitsio_symbols call removed -> 1 failed, 42 passed
sdist license files not checked -> 3 failed, 40 passed
Bison term dropped from wheel expression -> 23 failed, 20 passed
C API symbol requirement removed -> 43 passed
readelf exit-code check removed -> 43 passed
Exercise missing C API symbols and invalid ELF bytes so regressions in these wheel validation safeguards are caught by the test suite. Signed-off-by: Trent Nelson <trentn@nvidia.com>
|
@melo-gonzo Addressed the two test gaps from your review in 1c114b3. The ELF fixture now includes a library missing All 45 distribution tests and repository hooks pass. I also verified that removing either safeguard makes its corresponding new test fail. Full CI, including native wheels and installed-wheel GPU tests, is now green at that commit. CodeRabbit's incremental review also completed with no actionable comments. |
Linux wheels currently bundle unused CFITSIO Fortran wrappers and omit the notice for its retained Bison-generated parser. Build CFITSIO with
--without-fortran, ship the parser's full notice and Bison exception, and include its license expression in native wheel metadata.Distribution checks now reject Fortran wrapper exports and missing or altered notices. Source builds continue to use externally supplied CFITSIO.
Validation: 107 focused tests, repository hooks, and the built source archive's strict metadata/license checks pass. The edited recipe passes 54 upstream CFITSIO tests plus C API FITS round-trip, table-expression, and reentrant checks; all original non-Fortran exports are preserved. Full native wheel CI will qualify both architectures.