Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
- Dropped support for Python 3.9 and 3.10 as they have reached their end of
life. The minimum supported Python version is now 3.11.

- The C extension is now compiled with hidden symbol visibility on non-MSVC
compilers, so it exports only its module initialization function. Other
extensions that need the C API of python-igraph should use the
`igraph._igraph._C_API` capsule.

- The `abi3` wheels now target the stable ABI of Python 3.11 and are tagged
`cp311-abi3` instead of `cp39-abi3`.

Expand Down
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,12 @@ def run(self):
"-fdiagnostics-color",
]

# Export only the module initialization function from the
# extension; everything else is internal. MSVC does this by
# default. Other extensions should use the C API capsule.
if not building_on_windows_msvc():
buildcfg.extra_compile_args.append("-fvisibility=hidden")

# Add extra libraries that may have been specified
if "IGRAPH_EXTRA_DYNAMIC_LIBRARIES" in os.environ:
extra_libraries = os.environ[
Expand Down
2 changes: 1 addition & 1 deletion src/_igraph/igraphmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ extern PyObject* igraphmodule_InternalError;
extern PyObject* igraphmodule_arpack_options_default;

#define INITERROR return NULL
PyObject* PyInit__igraph(void)
PyMODINIT_FUNC PyInit__igraph(void)
{
PyObject* m;
static void *PyIGraph_API[PyIGraph_API_pointers];
Expand Down
Loading