conda-forge / vtk-feedstock

A conda-smithy repository for vtk.
BSD 3-Clause "New" or "Revised" License
13 stars 64 forks source link

Split vtk into vtk-base and vtk-io-ffmpeg subpackages #287

Closed basnijholt closed 1 year ago

basnijholt commented 1 year ago

In this PR, I am working to modularize VTK by creating two separate packages: vtk-base and vtk-io-ffmpeg.

This allows to still install VTK in places where FFMPEG cannot be installed due to patent conflicts.

The proposed changes include the following steps:

  1. Build the entire VTK package.
  2. Move the ffmpeg-related libraries to a separate folder (not in $PREFIX).
  3. Create the vtk-base package, which contains VTK without the ffmpeg-related libraries.
  4. In the subsequent output, create the vtk-io-ffmpeg package by adding the previously moved ffmpeg-related files.
  5. Finally, create a vtk package that depends on both vtk-base and vtk-io-ffmpeg.
  6. By separating VTK into these two packages, we can better manage dependencies and make it easier for users to selectively install the components they need.

If this works, it will supersede https://github.com/conda-forge/vtk-feedstock/pull/282.

This is based on work by @hmaarrfk (https://github.com/conda-forge/vtk-feedstock/pull/286), https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9987, and suggestions made in #282.

Also the Windows builds on main report:

2023-02-16T18:05:30.6699149Z WARNING (vtk): run-exports library package conda-forge::pugixml-1.11.4-h0e60522_0 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
2023-02-16T18:05:30.6700979Z WARNING (vtk): run-exports library package conda-forge::ffmpeg-5.1.2-gpl_h5b1d025_106 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
2023-02-16T18:05:30.6702401Z WARNING (vtk): run-exports library package conda-forge::jpeg-9e-hcfcfb64_3 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
2023-02-16T18:05:30.6703729Z WARNING (vtk): interpreted library (Python) package conda-forge::loguru-0.6.0-py39hcbf5309_2 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
2023-02-16T18:05:30.6705108Z WARNING (vtk): run-exports library package conda-forge::sqlite-3.40.0-hcfcfb64_0 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
2023-02-16T18:05:30.6706687Z WARNING (vtk): run-exports library package conda-forge::zlib-1.2.13-hcfcfb64_4 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
2023-02-16T18:05:30.6707978Z WARNING (vtk): run-exports library package conda-forge::tbb-devel-2021.7.0-h91493d7_1 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)
2023-02-16T18:05:30.6709401Z WARNING (vtk): run-exports library package conda-forge::qt-main-5.15.8-h720456b_6 in requirements/run but it is not used (i.e. it is overdepending or perhaps statically linked? If that is what you want then add it to `build/ignore_run_exports`)

and FFMPEG is not linked in the Windows build scripts, so I removed the dependency on FFMPEG on Windows.

References:

Checklist

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

basnijholt commented 1 year ago

@conda-forge-admin, please rerender

basnijholt commented 1 year ago

@conda-forge-admin, please rerender

github-actions[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/vtk-feedstock/actions/runs/4672833997.

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

conda-forge-webservices[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

hmaarrfk commented 1 year ago

The alternative that i didn't mention before. Is to add an ignore run export on ffmpeg.

If enough maintainers agree, this would be a "simple" path to achieving what you need in this particular case.

You could also add a constraint to ensure that if ffmpeg gets installed, the appropriate version will be required.

basnijholt commented 1 year ago

@hmaarrfk, thanks for the suggestion! I will try to go with your previous suggestion now, I believe I am almost there.

Would you perhaps know why the final test in the combined vtk package is failing with:

2023-04-12T06:57:48.7545620Z export PREFIX=/home/conda/feedstock_root/build_artifacts/vtk_1681277907995/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl
2023-04-12T06:57:48.7546443Z export SRC_DIR=/home/conda/feedstock_root/build_artifacts/vtk_1681277907995/test_tmp
2023-04-12T06:57:49.6254400Z ===== testing package: vtk-9.2.6-egl_py310h1234567_3 =====
2023-04-12T06:57:49.6255359Z Traceback (most recent call last):
2023-04-12T06:57:49.6255687Z   File "/home/conda/feedstock_root/build_artifacts/vtk_1681277907995/test_tmp/run_test.py", line 5, in <module>
2023-04-12T06:57:49.6255996Z     import pkg_resources
2023-04-12T06:57:49.6256325Z ModuleNotFoundError: No module named 'pkg_resources'
2023-04-12T06:57:49.6271919Z running run_test.py
2023-04-12T06:57:50.7695255Z Tests failed for vtk-9.2.6-egl_py310h1234567_3.conda - moving package to /home/conda/feedstock_root/build_artifacts/broken
2023-04-12T06:57:50.7696870Z WARNING:conda_build.build:Tests failed for vtk-9.2.6-egl_py310h1234567_3.conda - moving package to /home/conda/feedstock_root/build_artifacts/broken
2023-04-12T06:57:50.7950733Z TESTS FAILED: vtk-9.2.6-egl_py310h1234567_3.conda
2023-04-12T06:57:57.0057810Z ##[error]Bash exited with code '1'.
2023-04-12T06:57:57.0126083Z ##[section]Finishing: Run docker build

setuptools is in the test requirements.

basnijholt commented 1 year ago

@conda-forge/vtk, can someone please take a look here and review? 🙏

BTW: all builds are succeeding, I just did an interactive rebase to clean up the commits a bit.

basnijholt commented 1 year ago

@hmaarrfk, thanks a lot for your help!

@Tobias-Fischer, thanks for reviewing!

@jgukelberger, this is finally merged :tada: