Recommended workflow for using fastjet in environments with FastJet CPython bindings built? #147
-
I have what is probably an obvious question: If you have a Docker image that has the C++ FastJet built from source in it that also has the original Python bindings built and installed inside of a Python virtual environment setup for the user ( ...
ARG FASTJET_VERSION=3.4.0
RUN mkdir /code && \
cd /code && \
wget http://fastjet.fr/repo/fastjet-${FASTJET_VERSION}.tar.gz && \
tar xvfz fastjet-${FASTJET_VERSION}.tar.gz && \
cd fastjet-${FASTJET_VERSION} && \
./configure --help && \
export CXX=$(which g++) && \
export PYTHON=$(command -v python) && \
export PYTHON_CONFIG=$(find /usr/local/ -iname "python-config.py") && \
./configure \
--prefix=/usr/local/venv \
--enable-pyext=yes && \
make -j$(nproc --ignore=1) && \
make check && \
make install && \
rm -rf /code
... then if we also want the user to be able to have access (this is more important) to the docker@230caef77418:~$ command -v python
/usr/local/venv/bin/python
docker@230caef77418:~$ python -c 'import fastjet; print(fastjet)'
<module 'fastjet' from '/usr/local/venv/lib/python3.9/site-packages/fastjet.py'>
docker@230caef77418:~$ python -m pip --quiet install --upgrade pip setuptools wheel
docker@230caef77418:~$ python -m pip --quiet install fastjet
docker@230caef77418:~$ python -c 'import fastjet; print(f"{fastjet.__version__=}"); print(fastjet)'
fastjet.__version__='3.4.0.1'
<module 'fastjet' from '/usr/local/venv/lib/python3.9/site-packages/fastjet/__init__.py'>
docker@230caef77418:~$ the python -m pip install fastjet immediately afterwards? Another way of asking this is maybe "Is there any reason why I would ever want to favor having access to the original Python bindings over the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Since the original Python bindings are included within this |
Beta Was this translation helpful? Give feedback.
-
@matthewfeickert are you building for arm and that why you can't just use wheels? |
Beta Was this translation helpful? Give feedback.
Since the original Python bindings are included within this
fastjet
package, I think you'd never want the original package to overshadow this one. Since this package is the only one namedfastjet
in PyPI, there would only be a conflict if the original bindings were manually inserted into the Python path.