scikit-hep / fastjet

Jet-finding in the Scikit-HEP ecosystem.
https://fastjet.readthedocs.io
BSD 3-Clause "New" or "Revised" License
21 stars 13 forks source link

Distribution of fastjet-config broken / is FastJet C++ distribution intended? (possible non-goal) #308

Open matthewfeickert opened 2 months ago

matthewfeickert commented 2 months ago

The current fastjet v3.4.2.1 wheels on PyPI are not distributing fastjet-config as a command line tool

$ docker run --rm -ti python:3.12 /bin/bash
root@fef4856dfce1:/# python -m venv venv && . venv/bin/activate
(venv) root@fef4856dfce1:/# python -m pip --quiet install --upgrade pip wheel
(venv) root@fef4856dfce1:/# python -m pip --quiet install fastjet
(venv) root@fef4856dfce1:/# python -m pip show fastjet
Name: fastjet
Version: 3.4.2.1
Summary: Official FastJet bindings to Python and Awkward Array.
Home-page: https://github.com/scikit-hep/fastjet
Author: Aryan Roy
Author-email: aryanroy5678@gmail.com
License: BSD-3-Clause
Location: /venv/lib/python3.12/site-packages
Requires: awkward, numpy, vector
Required-by: 
(venv) root@fef4856dfce1:/# find /venv/ -type f -iname fastjet-config
/venv/lib/python3.12/site-packages/fastjet/_fastjet_core/bin/fastjet-config
(venv) root@fef4856dfce1:/# command -v fastjet-config
(venv) root@fef4856dfce1:/# fastjet-config
bash: fastjet-config: command not found

and have the paths of fastjet-config broken as /project/src/fastjet/_fastjet_core is not a viable path on an install machine.

(venv) root@fef4856dfce1:/# /venv/lib/python3.12/site-packages/fastjet/_fastjet_core/bin/fastjet-config

This is FastJet 3.4.2 configuration tool.
Usage:
  fastjet-config [--help] [--version] [--prefix] [--cxxflags] [--libs]
      [--shared[=yes|no]] [--plugins[=yes|no]] [--rpath[=yes|no]] [--runpath]
      [--list-plugins] [--config]

The arguments can be either queries (one must be present):

  --help       prints this message and exits
  --version    prints FastJet version and exits
  --prefix     gets the FastJet installation directory
  --cxxflags   returns the compilation flags to be used with C++ programs
  --libs       returns the flags to pass to the linker
  --list-plugins  lists all the available plugins
  --config     shows a summary of how FastJet was configured
  --pythonpath returns path for FastJet Python module (add to PYTHONPATH)

or flags (optional):

  --shared     controls whether you want to use the static or shared lib
               (default=yes)

  --plugins    controls whether you also want to link the FastJet plugins
               (default=no)

  --rpath      adds a -rpath argument at link-time that points to the
               directory where FastJet libraries are installed. This
               avoid having to set LD_LIBRARY_PATH at runtime when
               using shared libs in a non standard location (but may
               cause the program to inadvertently pick up other shared
               libraries that happen to be in the FastJet installation
               directory). 
               (default=yes)

  --runpath    at link-time, adds info about the directory where FastJet
               libraries are installed to the runpath (ELF systens
               only). This avoids having to set LD_LIBRARY_PATH at
               runtime when using shared libs in a non standard
               location but gives priority to an existing LD_LIBRARY_PATH.

  --guess-prefix  instead of using the default FastJet installation
                  prefix, try to guess the prefix from the
                  fastjet-config path. This is meant to help providing
                  a relocatable installation of FastJet

(venv) root@fef4856dfce1:/# /venv/lib/python3.12/site-packages/fastjet/_fastjet_core/bin/fastjet-config --cxxflags --libs --plugins
-I/project/src/fastjet/_fastjet_core/include -Wl,-rpath,/project/src/fastjet/_fastjet_core/lib -L/project/src/fastjet/_fastjet_core/lib -lfastjettools -lfastjet -lgmp -L/project/CGAL-5.6/lib -Wl,-rpath,/project/CGAL-5.6/lib -lm -lfastjetplugins -lsiscone_spherical -lsiscone
(venv) root@fef4856dfce1:/# find venv -type d -iname "_fastjet_core"
venv/lib/python3.12/site-packages/fastjet/_fastjet_core
(venv) root@fef4856dfce1:/# ls -l $(find venv -type d -iname "_fastjet_core")
total 16
drwxr-xr-x 2 root root 4096 Aug 12 18:28 bin
drwxr-xr-x 4 root root 4096 Aug 12 18:28 include
drwxr-xr-x 3 root root 4096 Aug 12 18:28 lib
drwxr-xr-x 3 root root 4096 Aug 12 18:28 share
(venv) root@fef4856dfce1:/# 

Was fastjet ever meant to also be a distribution method for the FastJet C++ library in addition to providing the Python bindings? Or was this a non-goal that should be pursued through a conda-forge feedstock different than https://github.com/conda-forge/fastjet-feedstock/?

cc @jpivarski @lgray @chrispap95 @jmduarte

matthewfeickert commented 2 months ago

@jpivarski @lgray @chrispap95 @jmduarte

This didn't get discussed more at PyHEP.dev, but can anyone comment on what the goals of library distribution are for the project?