calfem-python icon indicating copy to clipboard operation
calfem-python copied to clipboard

Creating optional dependencies

Open Martin15135215 opened this issue 2 years ago • 2 comments

It is also known as extras

currently, I also use this library to solve truss system like those

I do not require the dependencies, for example the Vis component of this library. Would it be possible to incorporate them as extras?

Thank you very much and have a happy new year.

Martin15135215 avatar Dec 31 '23 20:12 Martin15135215

I am planning to do this. I have not yet had time. Thanks for the feedback! There is also calfem-python-small.

jonaslindemann avatar Jan 01 '24 00:01 jonaslindemann

Thanks for pointing me to calfem-python-small. I did not know it, since it was not mentioned https://github.com/CALFEM/calfem-python or https://calfem-for-python.readthedocs.io/en/latest/installation.html

I then looked further and found it in the https://github.com/CALFEM/calfem-python/blob/master/setup.py and https://github.com/CALFEM/calfem-python/blob/master/setup-org.py

calfem-python-small has the following dependencies:

https://github.com/CALFEM/calfem-python/blob/8c9746482e6545c461aad440ee4d9fba7201f447/setup.py#L92

calfem-python has the following dependencies:

https://github.com/CALFEM/calfem-python/blob/8c9746482e6545c461aad440ee4d9fba7201f447/setup-org.py#L92

Is the difference just the number of installed dependencies between these two versions?

Here is the link how to do optional dependencies in setup.py

setup(
    name="Package-A",
    ...,
    extras_require={
        "PDF": ["ReportLab>=1.2", "RXP"],
    },
)

Martin15135215 avatar Jan 01 '24 09:01 Martin15135215

Fixed in latest release.

jonaslindemann avatar Aug 25 '25 11:08 jonaslindemann