-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http_request: new recipe #24778
base: master
Are you sure you want to change the base?
http_request: new recipe #24778
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Some minor comments after a first pass :)
def _min_cppstd(self): | ||
return 17 | ||
|
||
@property | ||
def _compilers_minimum_version(self): | ||
return { | ||
"apple-clang": "10", | ||
"clang": "7", | ||
"gcc": "7.1", | ||
"msvc": "192", | ||
"Visual Studio": "15.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a missing validate()
method to check these values, see the template in https://github.com/conan-io/conan-center-index/blob/master/docs/package_templates/cmake_package/all/conanfile.py#L80 as to how to do it
homepage = "https://github.com/Nevermore1994/http-request" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
topics = ("http", "https", "modern C++") | ||
package_type = "library" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a header-only
recipe, so
package_type = "library" | |
package_type = "header-only" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking upstream, there are .cpp files, shouldnt we be building those then?
package_type = "library" | ||
settings = "os", "arch", "compiler", "build_type" | ||
options = { | ||
"with_openssl": [True, False] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In upstream, this option is called DISABLE_HTTPS
, we might want to have symmetry there :)
@@ -0,0 +1,17 @@ | |||
from conans import ConanFile, CMake, tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for v1 test packages for new recipes :)
# TODO: to remove in conan v2 once legacy generators removed | ||
self.cpp_info.names["cmake_find_package"] = "http_request" | ||
self.cpp_info.names["cmake_find_package_multi"] = "http_request" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed :)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Quite sorry about the incesant bot noise, it got a bit confused there :/ |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments!
find_package(http-request REQUIRED CONFIG) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE http-request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified this to be in line with upstream's cmakelist
if self.options.with_openssl: | ||
self.requires("openssl/[>=1.1 <4]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/Nevermore1994/http-request#notes seems to note that openssl is required in Windows and not optional. Is this right? Should this not be an option to disable it on Windows? Or how does this work? Thanks!
Conan v1 pipeline ❌Failure in build 15 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. Conan v2 pipeline ❌
The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping Failure in build 8 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
Summary
Changes to recipe: http_request/1.0.0
Motivation
A modern C++ lightweight cross-platform HTTP request library
https://github.com/Nevermore1994/http-request
Details
changes