• pybuild and optional dependencies

    From PICCA Frederic-Emmanuel@21:1/5 to All on Mon Dec 18 11:10:01 2023
    Hello, I am updating the xraylarch package which contain something like this in the setup.cfg

    ```
    install_requires =
    asteval>=0.9.28
    numpy>=1.20
    scipy>=1.7
    uncertainties>=3.1.4
    lmfit>=1.2.1
    pyshortcuts>=1.9.0
    xraydb>=4.5
    silx>=0.15.2
    matplotlib>=3.5
    sqlalchemy>=2.0
    sqlalchemy_utils
    h5py>=3.2
    hdf5plugin
    pillow>=8.3.2
    numdifftools
    pandas
    packaging
    pip
    pyyaml
    toml
    termcolor
    dill
    imageio
    charset-normalizer
    peakutils
    requests
    scikit-image
    scikit-learn
    psutil
    pymatgen
    mp_api
    pycifrw
    fabio
    pyfai
    numexpr==2.8.4; python_version < '3.9'
    numexpr>=2.8.7; python_version > '3.8'

    [options.extras_require]
    wxgui =
    wxpython>=4.1
    wxutils>=0.3.0
    wxmplot>=0.9.57

    qtgui =
    PyQt5
    pyqtwebengine
    pyqtgraph

    epics =
    pyepics>=3.5.0
    psycopg2-binary

    jupyter =
    jupyter_core>=5.0
    jupyter_client
    jupyter_server
    notebook
    nbformat
    ipywidgets
    plotly
    py3dmol

    doc =
    sphinx
    numpydoc
    sphinxcontrib-bibtex
    sphinxcontrib-argdoc
    pycairo; platform_system=="Windows"

    dev =
    pytest
    pytest-cov
    coverage
    build
    pre-commit
    twine

    larix =
    %(wxgui)s
    %(jupyter)s

    all =
    %(dev)s
    %(doc)s
    %(wxgui)s
    %(qtgui)s
    %(jupyter)s
    %(epics)s
    ```

    When I compile the package, I got the dh_python3 computed runtime dependencies from the install_requires.

    Now I would like to build this package but with the larix optional dependencies.

    so I added all the dependencies in the Build-Depends, but dh_python3 still produce the previous dependencies.

    How can I teach pybuild that I really want xraylarch[larix] ?

    thanks

    Frederic

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefano Rivera@21:1/5 to All on Sun Dec 24 14:00:01 2023
    Hi PICCA (2023.12.18_09:41:52_+0000)

    When I compile the package, I got the dh_python3 computed runtime dependencies from the install_requires.

    Now I would like to build this package but with the larix optional dependencies.

    so I added all the dependencies in the Build-Depends, but dh_python3 still produce the previous dependencies.

    How can I teach pybuild that I really want xraylarch[larix] ?

    This is really a dh_python3 question, it generates the dependencies.
    Pass --depends-section=larix (or recommends/suggests as appropriate).

    Stefano

    --
    Stefano Rivera
    http://tumbleweed.org.za/
    +1 415 683 3272

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)