Skip to content

Some maintenance for subvertpy v0.11.0 and add binary wheels build plus deployment#180

Open
anlambert wants to merge 12 commits intojelmer:unstablefrom
anlambert:subvertpy-0.11-compilation-fixes
Open

Some maintenance for subvertpy v0.11.0 and add binary wheels build plus deployment#180
anlambert wants to merge 12 commits intojelmer:unstablefrom
anlambert:subvertpy-0.11-compilation-fixes

Conversation

@anlambert
Copy link

@anlambert anlambert commented Feb 24, 2026

The subversion loader for the Software Heritage archive is using subvertpy v0.11.0 to communicate with remote repositories so that dependency is always installed when setting up the development environment we are using.

But the compilation of C extensions modules is currently broken with GCC >= 14 and recent clang versions, see #115.

This can be worked around by setting the CFLAGS environment variable to -Wno-int-conversion -std=c99 but it would be better if subvertpy could be installed without that hack.

I noticed the int conversions issue was fixed by 4e64e3b in the master branch but currently it cannot be built due to rust compiler errors.

In the hope of a simple v0.11.1 patch release, I cooked that pull request including the following:

  • fix C extensions compilation errors (build fails #115)
  • fix Regression/crash when calling client.propget() #35
  • rework and simplify github actions workflow for building and testing package (especially on windows now that subversion can be easily installed with vcpkg)
  • add a github actions workflow to build subvertpy on ArchLinux to check compilation with recent GCC
  • fix a bug on windows uncovered by tests that was preventing to modify a file in a repository (Python was crashing on each textdelta operation)
  • add new github actions workflows to build and test portable binary wheels for subvertpy on linux, macos and windows, then deploy them to PyPI; all these wheels bundle subversion 1.14 (publish wheels on pypi #28)

I rebased that work on top of the unstable branch as it looks untouched since the v0.11.0 release but not sure this is the good one.

This is useful when testing on windows as subversion DLLs are not
necessarily located along the subvertpy extension modules and their
paths must be explicitely registered using os.add_dll_directory.
When compiling with Visual Studio, there were some integer overflow
when parsing Python integers and storing them as apt_size_t
leading to unexpected crashes when applying text delta.

Convert those to Py_ssize_t instead of unsigned long to fix the
observed crashes.
When installing subversion using vcpkg to build subvertpy on windows,
some libraries are prefixed by lib so ensure to detect them.

Do not try to execute apr-1-config and apu-1-config on windows as
these tools are not available for that platform when using vcpkg.

Add libapr and libaprutil in the deep depdencies list.
Simplify pythonpackage workflow by relying on platform package managers
to install the subversion libraries and their dependencies.

Remove build for dead snakes and update Python versions to the ones that
are currently still supported (3.10 to 3.14).

Bump actions to their latest version.

Add a workflow to build subvertpy on archlinux in order to check extension
modules compilation with latest GCC version.
Python 3 does not have tp_print in PyTypeObject.

The field is called tp_vectorcall_offset now, of type Py_ssize_t.
Current compilers treat using NULL as an integer constant as a type
error, so this change fixes a build problem with those compilers.

Adapted from 4e64e3b.
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.

1 participant