Skip to content

Commit dbedbcd

Browse files
authored
Linking with existing igraph on msys2
I've been thinking for a while if the msys2/mingw distribution should provide a package for python-igraph itself, but these are instructions to build from source, so it should suffice
1 parent 19b5a45 commit dbedbcd

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ where `[arch]` is either `Win32` for 32-bit builds or `x64` for 64-bit builds.
7777
Also, when building in MSYS2, you need to set the `SETUPTOOLS_USE_DISTUTILS`
7878
environment variable to `stdlib`; this is because MSYS2 uses a patched version
7979
of `distutils` that conflicts with `setuptools >= 60.0`.
80+
Note: You need the following packages:
81+
`$MINGW_PACKAGE_PREFIX-python-pip $MINGW_PACKAGE_PREFIX-python-setuptools $MINGW_PACKAGE_PREFIX-cc $MINGW_PACKAGE_PREFIX-cmake`
8082

8183
### Enabling GraphML
8284

@@ -158,8 +160,16 @@ the packaged igraph library instead of bringing its own copy.
158160
It is also useful on macOS if you want to link to the igraph library installed
159161
from Homebrew.
160162

161-
Due to the lack of support of `pkg-config` on Windows, it is currently not
162-
possible to build against an external library on Windows.
163+
Due to the lack of support of `pkg-config` on MSVC, it is currently not
164+
possible to build against an external library on MSVC.
165+
166+
In case you are already using a MSYS2/[MinGW](https://www.mingw-w64.org/) and already have
167+
[mingw-w64-igraph](https://packages.msys2.org/base/mingw-w64-igraph) installed,
168+
simply type:
169+
```
170+
IGRAPH_USE_PKG_CONFIG=1 SETUPTOOLS_USE_DISTUTILS=stdlib pip install igraph
171+
```
172+
to build.
163173

164174
**Warning:** the Python interface is guaranteed to work only with the same
165175
version of the C core that is vendored inside the `vendor/source/igraph`

0 commit comments

Comments
 (0)