Closed fcollonval closed 4 years ago
AFAIK pip also supports permutations of optional dependencies, e.g. examples
and plot
but no gui
. Is this also possible with conda?
Unfortunately conda
lacks behind on that front 😞 This is the reason restricting to two flavors seems a good strategy to me:
Note: matplotlib went for matplotlib
and matplotlib-base
conda build doc: https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#outputs-section
Can't you just install with --no-deps
and select the dependencies you need?
Sorry for the late answer.
I try using --no-deps
. It works as expected. But unfortunately, each time I made a modification (install, remove or update a package) on the environment, conda
is installing all fmpy
dependencies to correct the inconsistency. So back to my proposal to have a fmpy-base
package with minimal dependencies. What do you think?
I have a similar problem/idea. I'm looking into creating a sub-package called FMPy.fmi
which includes the FMI interface code and loaders. Basically a separatesetup.py
under fmpy/fmi
but still in the same git repo ... so its mostly seamless. Then you could:
pip install FMPy
(depends on FMPy.fmi) and get everything.pip install FMPy.fmi
and only get those "core" FMI related packages and dependencies.So I think its an approach which might help in other areas too.
I've started a new attempt on https://github.com/conda-forge/fmpy-feedstock/tree/testing but found a number of issues:
main
(instead of testing
) to the conda-forge channel even though a recipe/conda_build_config.yaml
has been added:channel_targets:
- conda-forge testing
pyqt >=5.12.3,<5.13.0a0
is listed in the index.json
as a dependency for fmpy-base
even though it is only a build
dependency
the fmpy
entry point does not work with fmpy-base
:
(fmpybase) C:\Users\XXX\Documents>fmpy info Clock.fmu
Fatal error in launcher: Unable to create process using '"d:\bld\fmpy_1602599620764\_h_env\python.exe" "E:\Anaconda3\envs\fmpybase\Scripts\fmpy.exe" info Clock1.fmu': Das System kann die angegebene Datei nicht finden.
however it does work after installing fmpy
.
@fcollonval, @wulmer, do you have an idea how to fix the above points?
It seems there exist two ways of specifying target channels: through recipe/conda_build_config.yaml
and through the conda-forge.yml
(in the root folder).
There also seemed to be some interference between the two in the past, but I think the currently recommended way is to use conda-forge.yml
(see https://conda-forge.org/docs/maintainer/conda_forge_yml.html#channels).
I also tested the fmpy-base
package on Linux with the fmpy info Rectifier.fmu
command, and it worked fine. Guessing from the Windows error message, there surely is a DLL dependency problem. You might want to diff the two environments (with fmpy
or just with fmpy-base
and try to figure out which package resolves this error).
Or you could try tools like https://www.dependencywalker.com/ to check which DLLs the FMU requires.
It turns out that we have to run conda smithy rerender
after making changes to the meta.yaml. This solved the problem with the testing
label.
This is an enhancement proposal.
With
pip
it is possible to choose the dependency granularity (and it is beautifully illustrated by this project). Unfortunately withconda
this can only be done through different packages.matplotlib
recipe solves this nicely by outputting various package from an unique recipe. It makes sense to keep the currentfmpy
package with all dependencies. But it would be great to generate at the same time afmpy-base
(name to be chosen) for advanced users with the minimal dependencies.Note: if you agree, I happily submit a PR.