Skip to content

Commit c3208b9

Browse files
committed
Move igraph to host and remove unneeded dependenies
Remove the CMake call and instead point to external `igraph`
1 parent 45a9815 commit c3208b9

File tree

3 files changed

+15
-68
lines changed

3 files changed

+15
-68
lines changed

recipe/bld.bat

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
11
@echo on
22

3-
mkdir build
4-
if errorlevel 1 exit 1
3+
rem Build python-igraph against the externally provided libigraph from conda-forge
4+
rem Use pkg-config to discover headers and libraries.
5+
set IGRAPH_USE_PKG_CONFIG=1
56

6-
set IGRAPH_CMAKE_EXTRA_ARGS=^
7-
%CMAKE_ARGS% ^
8-
-GNinja ^
9-
-DCMAKE_BUILD_TYPE=Release ^
10-
-DCMAKE_INSTALL_PREFIX=%SRC_DIR%/vendor/install/igraph ^
11-
-DCMAKE_POSITION_INDEPENDENT_CODE=ON ^
12-
-DIGRAPH_USE_INTERNAL_BLAS=0 ^
13-
-DIGRAPH_USE_INTERNAL_LAPACK=0 ^
14-
-DIGRAPH_USE_INTERNAL_ARPACK=1 ^
15-
-DIGRAPH_USE_INTERNAL_GLPK=0 ^
16-
-DIGRAPH_USE_INTERNAL_GMP=0 ^
17-
-DBUILD_SHARED_LIBS=OFF ^
18-
-DIGRAPH_ENABLE_LTO=AUTO ^
19-
-DIGRAPH_ENABLE_TLS=1 ^
20-
-DIGRAPH_GRAPHML_SUPPORT=1
21-
set IGRAPH_EXTRA_LIBRARIES=gmp,blas,glpk,lapack,libxml2
7+
rem Ensure pkg-config can find igraph.pc from the host env (both common locations)
8+
set "PKG_CONFIG_PATH=%PREFIX%\Library\lib\pkgconfig;%PREFIX%\lib\pkgconfig;%PKG_CONFIG_PATH%"
229

2310
%PYTHON% -m pip install --no-deps --no-build-isolation --ignore-installed . -vvv
2411
if errorlevel 1 exit 1

recipe/build.sh

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
#!/bin/env bash
22

3-
export IGRAPH_CMAKE_EXTRA_ARGS="
4-
${CMAKE_ARGS} \
5-
-GNinja \
6-
-DCMAKE_BUILD_TYPE=Release \
7-
-DCMAKE_INSTALL_PREFIX=${SRC_DIR}/vendor/install/igraph \
8-
-DCMAKE_C_FLAGS=\"${CFLAGS}\" \
9-
-DCMAKE_CPP_FLAGS=\"${CPPFLAGS}\" \
10-
-DCMAKE_CXX_FLAGS=\"${CXXFLAGS}\" \
11-
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
12-
-DF2C_EXTERNAL_ARITH_HEADER=${F2C_EXTERNAL_ARITH_HEADER} \
13-
-DIGRAPH_USE_INTERNAL_BLAS=0 \
14-
-DIGRAPH_USE_INTERNAL_LAPACK=0 \
15-
-DIGRAPH_USE_INTERNAL_ARPACK=0 \
16-
-DIGRAPH_USE_INTERNAL_GLPK=0 \
17-
-DIGRAPH_USE_INTERNAL_CXSPARSE=0 \
18-
-DIGRAPH_USE_INTERNAL_GMP=0 \
19-
-DBUILD_SHARED_LIBS=OFF \
20-
-DIGRAPH_ENABLE_LTO=AUTO \
21-
-DIGRAPH_ENABLE_TLS=1 \
22-
-DBLAS_LIBRARIES=\"${PREFIX}/lib/libblas${SHLIB_EXT}\" \
23-
-DLAPACK_LIBRARIES=\"${PREFIX}/lib/liblapack${SHLIB_EXT}\"
24-
"
3+
# Build python-igraph against the externally provided libigraph from conda-forge
4+
# Use pkg-config to discover headers and libraries.
5+
export IGRAPH_USE_PKG_CONFIG=1
6+
7+
# Ensure pkg-config can find igraph.pc from the host env
8+
export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
259

2610
${PYTHON} -m pip install --no-deps --no-build-isolation --ignore-installed . -vvv

recipe/meta.yaml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,23 @@ source:
1414

1515
build:
1616
number: 3
17-
script_env:
18-
- F2C_EXTERNAL_ARITH_HEADER={{ RECIPE_DIR }}/arith_arm64.h # [arm64]
19-
20-
run_exports:
21-
- {{ pin_subpackage("python-igraph", max_pin="x.x") }}
2217

2318
requirements:
2419
build:
2520
- python # [build_platform != target_platform]
2621
- cross-python_{{ target_platform }} # [build_platform != target_platform]
27-
- libtool # [unix]
2822
- {{ compiler('c') }}
2923
- {{ stdlib("c") }}
3024
- {{ compiler('cxx') }}
31-
# just to make cmake happy
32-
- bison # [osx and arm64]
33-
- cmake
34-
- ninja
35-
- make # [not win]
36-
- pkg-config # [not win]
25+
- pkg-config
3726
host:
38-
- glpk
39-
- libxml2-devel
40-
- arpack # [not win]
41-
- gmp
42-
- libblas
43-
- liblapack
4427
- python
4528
- pip
4629
- setuptools >=64,<72.2.0
47-
- zlib
30+
- igraph >=0.10,<0.11
4831
run:
49-
- glpk
50-
- libxml2-devel
51-
- arpack # [not win]
52-
- gmp
53-
- texttable >=1.6.2
5432
- python
55-
- igraph >=0.10,<0.11
33+
- texttable >=1.6.2
5634

5735
test:
5836
source_files:
@@ -68,9 +46,7 @@ test:
6846
about:
6947
home: https://igraph.org/python/
7048
license: GPL-2.0-or-later
71-
license_file:
72-
- LICENSE
73-
- vendor/source/igraph/ACKNOWLEDGEMENTS.md
49+
license_file: LICENSE
7450
summary: High performance graph data structures and algorithms
7551
dev_url: https://github.com/igraph/python-igraph
7652
doc_url: https://igraph.org/python/#docs

0 commit comments

Comments
 (0)