alexbovet / flow_stability

Flow stability framework for dynamic community detection in temporal networks
GNU Lesser General Public License v3.0
24 stars 4 forks source link

cython files are not compiled when flowstab is installed with pip #23

Closed alexbovet closed 3 months ago

alexbovet commented 3 months ago

What is the best way to compile the cython files when installing with pip?

j-i-l commented 3 months ago

Hm, the way I understand the pyproject.toml configuration it should invoke setuptools which should, in turn follow the instructions provided in setup.py. So the cython files should be compiled if everything works as expected.

Do you get an error message when running?:

pip install git+https://github.com/alexbovet/flow_stability.git
j-i-l commented 3 months ago

I'm trying to reproduce this. But when running (mind the extra option for verbal output -v):

pip install git+https://github.com/alexbovet/flow_stability.git -v

I get:

...
  Successfully installed cython-3.0.11 numpy-2.0.1 packaging-24.1 setuptools-72.2.0 setuptools_scm-8.1.0 tomli-2.0.1 typing-extensions-4.12.2
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Compiling ./src/flowstab/_cython_fast_funcs.pyx because it changed.
  Compiling ./src/flowstab/_cython_sparse_stoch.pyx because it changed.
  [1/2] Cythonizing ./src/flowstab/_cython_fast_funcs.pyx
  [2/2] Cythonizing ./src/flowstab/_cython_sparse_stoch.pyx
  Getting requirements to build wheel ... done
  Running command Preparing metadata (pyproject.toml)
  Preparing metadata (pyproject.toml) ... done
...

So it seems that ./src/flowstab/_cython_fast_funcs.pyx and ./src/flowstab/_cython_sparse_stoch.pyx are compiled.

@alexbovet could you provide some more details on the OS and setup you are running the installation? Maybe some dependencies are missing?

alexbovet commented 3 months ago

Ok I tested it and you are right. They are compiled. I was just confused because I didn't see the *.so files in the flowstab directory, but they are put directly in the site-package directory.