astropy / extension-helpers

Helpers to assist with building Python packages with compiled C/Cython extensions
https://extension-helpers.readthedocs.io
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

Add back support for absolute source paths but deprecate it #70

Closed astrofrog closed 11 months ago

astrofrog commented 11 months ago

@neutrinoceros - https://github.com/astropy/extension-helpers/pull/67 broke compilation for modules with extensions that were specified as absolute paths, which occurred once in astropy (https://github.com/astropy/astropy/pull/15663). The error was:

      writing manifest file 'astropy.egg-info/SOURCES.txt'
      error: Error: setup script specifies an absolute path:

          /Users/tom/Code/Astropy/astropy/./astropy/io/fits/hdu/compressed/src/compression.c

      setup() arguments must *always* be /-separated paths relative to the
      setup.py directory, *never* absolute paths.

Even though those modules should indeed use relative paths, we should ideally not break compatibility for all packages that were released in the past that use extension-helpers in pyproject.toml without any pinning, so this PR is a patch to restore compatibility but add a warning.

codecov[bot] commented 11 months ago

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (2e72417) 74.68% compared to head (0283551) 62.61%.

:exclamation: Current head 0283551 differs from pull request most recent head 1b2b0f7. Consider uploading reports for the commit 1b2b0f7 to get more accurate results

Files Patch % Lines
extension_helpers/_setup_helpers.py 60.00% 6 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #70 +/- ## =========================================== - Coverage 74.68% 62.61% -12.07% =========================================== Files 4 4 Lines 316 329 +13 =========================================== - Hits 236 206 -30 - Misses 80 123 +43 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

neutrinoceros commented 11 months ago

Thinking a bit more about this, it seems like you're making a point that build time dependencies should be pinned more strictly, since every release without pins is bound to break at some point, right ?

astrofrog commented 11 months ago

Yes, see https://github.com/astropy/extension-helpers/issues/71

astrofrog commented 11 months ago

The Windows failures are real, I will try and resolve these