AcademySoftwareFoundation / AcademySoftwareFoundation/openfx

Conan recipe packaging suggestions

Open
#238 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
570
Forks
152
PR merge metrics
No merged PRs in 30d

Description

Currently the `package()` method for the `conanfile.py` recipe does the following:

```
def package(self):
copy(self, "cmake/*", src=self.source_folder, dst=self.package_folder)
copy(self, "LICENSE, README.md, INSTALL.md", src=self.source_folder, dst=self.package_folder)
copy(self, "include/*.h", src=self.source_folder, dst=self.package_folder)
copy(self,"HostSupport/include/*.h", src=self.source_folder, dst=self.package_folder)
copy(self,"Support/*.h", src=self.source_folder, dst=self.package_folder)
copy(self,"Support/Plugins/include/*.h", src=self.source_folder, dst=self.package_folder)
copy(self,"*.a", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False)
copy(self,"*.lib", src=self.build_folder, dst=os.path.join(self.package_folder, "lib"), keep_path=False)
copy(self,"*.ofx", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False)
copy(self,"*.dll", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False)
copy(self,"*.so", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False)
```

This doesn't really follow the directory layout for more recipes in the Conan Center Index:

- package provided CMake files go in `lib/cmake/` (CCI recipes delete those to only retain the ones auto-generated by Conan, but aswf-docker typically comments out those deletions to allow building outside of Conan)
- license files go into a `licenses` directory (aswf-docker adds a `package-name` subdirectory to avoid clashes when installing multiple Conan packages into the same location)
- examples and other support files should probably go into something like `shared/openfx/{Examples,HostSupport,Support}`, although it seems that `HostSupport` and `Support` only contain include files, so perhaps those should be subdirectories of the top level `include`?

This would require adjusting the `package_info()` method accordingly.

Happy to discuss this further / submit a PR if it makes sense.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing conanfile.py, especially the package() and package_info() methods, then compare their layout with Conan Center Index recipes mentioned in the issue. Decide and document the target locations for CMake files, licenses, examples, and support headers; done means the package contents follow that layout and package_info() points consumers to the resulting paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.