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

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

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

astrofrog
Copy link
Member

@neutrinoceros - #67 broke compilation for modules with extensions that were specified as absolute paths, which occurred once in astropy (astropy/astropy#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.

Copy link

codecov bot commented Nov 30, 2023

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%.

❗ 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 ⚠️
Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@neutrinoceros neutrinoceros left a comment

Choose a reason for hiding this comment

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

Thank you for fixing it, I had no idea my changes could be breaking. Given how important backward compatibility is, I think it'd be useful to have a test for this regression, but I don't know how much effort that'd be to implement and I don't think the lack of a test is reason enough to hold this PR !

extension_helpers/_setup_helpers.py Outdated Show resolved Hide resolved
@neutrinoceros
Copy link
Contributor

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
Copy link
Member Author

astrofrog commented Nov 30, 2023

Yes, see #71

@astrofrog
Copy link
Member Author

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

@astrofrog astrofrog merged commit 9f9cf7a into astropy:main Dec 7, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants