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

Sync with distutils #4790

Merged
merged 16 commits into from
Jan 5, 2025
Merged

Sync with distutils #4790

merged 16 commits into from
Jan 5, 2025

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jan 5, 2025

  • Use minimum requirement for jaraco.functools
  • use a real boolean (False) default for display_option_names generated attributes
  • Fix issue with absolute path with Python 3.13 on Windows
  • Accept an Iterable at runtime for Extension
  • Add more tests to cover different iterables
  • Delegate to os.fspath for type checking
  • Fix typo
  • Return real boolean from copy_file
  • Fix test_mkpath_exception_uncached
  • Set Py_GIL_DISABLED=1 for free threading on Windows
  • Link to setuptools issue
  • Trim the comment a bit.
  • 👹 Feed the hobgoblins (delint).
  • Use alternate spelling for flavor attribute.
  • Only apply workaround on required Pythons.
  • Let pathlib resolve the flavor.
  • 👹 Feed the hobgoblins (delint).
  • Run Ruff 0.8.0
  • Add review suggestions around code comments
  • Use TypeError instead of AssertionError
  • UP031 manual fixes for Ruff 0.8.0
  • Make reinitialize_command's return type Generic when "command" argument is a Command
  • Coerce Distribution.script_args to list
  • Remove py38 compat modules
  • Remove UP036 exclusion.
  • Prefer the standard format for imports, even though it's unnecessarily repetitive.
  • type Distribution.get_command_obj to not return None with create=True
  • ClassVar classvar mutables and tuple from typeshed
  • 👹 Feed the hobgoblins (delint).
  • Collapse startswith operations
  • Use CFLAGS if set as-is, match CXXFLAGS behavior
  • 👹 Feed the hobgoblins (delint).
  • Don't duplicate CFLAGS
  • 👹 Feed the hobgoblins (delint).
  • Extract a classmethod _make_out_path_exts suitable for isolated testing.
  • Re-write _make_relative to rely on pathlib for cross-platform and cross-python compatibility.
  • Move suppress_path_mangle to test_ccompiler to limit the scope.
  • Add tests and fix failure identified in the tests.
  • Refactor for simplicity.

Summary of changes

Closes #4669

Pull Request Checklist

adang1345 and others added 14 commits October 21, 2024 09:48
With Python 3.13 on Windows, `os.path.isabs()` no longer returns `True`
for a path that starts with a slash. Thus, when the argument to
`_make_relative()` is an absolute path, the return value starts with a
slash on Python 3.13 and does not start with a slash on older Python
versions. This causes the extension module build directory to be
calculated incorrectly with Python 3.13 on Windows.

Fix this by ensuring that the return value does not start with a slash.
Co-authored-by: Avasam <samuel.06@hotmail.com>
Followup to af7fcbb. I accidentally
left that in when trying two approaches.

Reported at pypa/distutils#322 (comment).
Fix issue with absolute path with Python 3.13 on Windows
@jaraco jaraco force-pushed the feature/distutils-ff11eed0c branch from 83f4b86 to 5ed9d93 Compare January 5, 2025 15:33
@jaraco jaraco merged commit 86d8c99 into main Jan 5, 2025
33 of 34 checks passed
@jaraco jaraco deleted the feature/distutils-ff11eed0c branch January 5, 2025 15:38
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.

[BUG] Extension module build files are written to source directory
3 participants