eidheim / tiny-process-library

A small platform independent library making it simple to create and stop new processes in C++, as well as writing to stdin and reading from stdout and stderr of a new process
MIT License
338 stars 73 forks source link

Conan support #18

Closed sztomi closed 7 years ago

sztomi commented 7 years ago

I've added a conanfile.py to support uploading tiny-process-library to conan.io, which makes it easy to integrate with other projects. I've already created a package from my fork, and if this patch is accepted I suggest changing the URL in conanfile.py to the upstream repo. I branched off from the last release tag, so what's uploaded to conan is v1.0.5. (I don't know why it can't be automatically merged, sorry about that :()

eidheim commented 7 years ago

Thank you, but are additional files needed in a project source tree to create Conan packages, or is it just more convenient to do so? With all the emerging package and build systems, I'm thinking that the result would be a lot of extra files to support Conan and Meson and other new package/build systems. Note that I'm asking because I'm curious and with respect to other projects that I have:)

sztomi commented 7 years ago

are additional files needed in a project source tree to create Conan packages, or is it just more convenient to do so?

Neither - a conanfile can clone the repository and work from that (it's a few lines more but not difficult). The reason I did it this way was that I'm trying to upstream the package. I can also do it in a non-intrusive way, but I can't make a pull request from that :) Also, having the conanfile in your repo gives you the benefit of pulling dependencies via conan, which the other way does not really allow.

With all the emerging package and build systems, I'm thinking that the result would be a lot of extra files to support Conan and Meson and other new package/build systems.

Fair point, although conan is really only about dependencies and it's not a build system. Each conanfile.py can reference dependencies that also have a conanfile and get them automatically. It can also generate a cmake script which sets include and library paths.

eidheim commented 7 years ago

I'm going to read up on Conan and give this a bit more thought, but hopefully decide in a day or two. Thank you again for the explanation.

eidheim commented 7 years ago

First off, thank you very much for creating a Conan package. However, I sadly have decided against added extra files in my projects to support other build or package systems. I think this should be done in a non-intrusive way, and thus keep the project file structure as clean as possible. The second reason is that I have to prioritise my time, and I will not be able to answer issues that are related to many different package/build systems. I saw that packaging from external sources was an option in http://docs.conan.io/en/latest/packaging/creating_out.html, and hopefully this will be a decent alternative.

sztomi commented 7 years ago

That's alright and I totally understand. I'll make a non-intrusive package. I'll provide a link in this thread for people from the future. :)