-
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
feat: add recipe for ua-nodeset #7312
Merged
conan-center-bot
merged 22 commits into
conan-io:master
from
Mo-Tay:feat-add-ua-nodeset
Sep 28, 2021
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
7f91dde
feat: add files and env-variables for ua-nodeset
Mo-Tay 71779d1
fix: use tarballs instead of git
Mo-Tay 4943e8d
fix: undo changes to open62541
Mo-Tay 436166e
fix: change path variable to env variable
Mo-Tay 029882b
formating: add newline
Mo-Tay 20d1b52
fix: use user.info variable and add test_package
Mo-Tay 941df87
fix: change package name to all smallcase
Mo-Tay d09c96a
fix: correct rename
Mo-Tay b1f2beb
fix: correct the version, remove unwanted imports
Mo-Tay 79fd9ed
fix: rename nodeset_path to nodeset_dir
Pro 9decffa
fix: minor issues in conanfile
Pro 4e2471f
Add missing license file
Pro 3a11220
Fix: do not copy license file
Pro 9ab696f
fix test_package to use nodeset_dir
Pro 7dc143f
Apply suggestions from code review
Pro 3723652
fix: minor fixes for license file
Pro aa96f30
Apply suggestions from code review
Pro 094027b
Update recipes/ua-nodeset/all/conanfile.py
Pro fafc3b6
fix: use correct version
Pro 1aff707
fix: retrigger build
Pro b063d0e
fix: change version to `PADIM-1.02-2021-07-21`
Pro 49b808d
fix: lowercase version
Pro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
sources: | ||
"padim-1.02-2021-07-21": | ||
# This is just the latest tag on the 1.04 release branch as of 23Sep2021 | ||
url: https://github.com/OPCFoundation/UA-Nodeset/archive/refs/tags/PADIM-1.02-2021-07-21.tar.gz | ||
sha256: 05c83369ea82cd275d47ccc46a6d919c81392e2d0b7444a3e538ee3ba482dbee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
required_conan_version = ">=1.33.0" | ||
|
||
|
||
class UaNodeSetConan(ConanFile): | ||
name = "ua-nodeset" | ||
license = "MIT" | ||
description = "UANodeSets and other normative files which are released with a specification" | ||
homepage = "https://github.com/OPCFoundation/UA-Nodeset" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
topics = ("opc-ua-specifications", "uanodeset", "normative-files", "companion-specification") | ||
|
||
no_copy_source = True | ||
|
||
@property | ||
def _source_subfolder(self): | ||
return "source_subfolder" | ||
|
||
def _extract_license(self): | ||
content = tools.load(os.path.join(self.source_folder, self._source_subfolder, "AnsiC", "opcua_clientapi.c")) | ||
license_contents = content[2:content.find("*/", 1)] | ||
tools.save("LICENSE", license_contents) | ||
|
||
def source(self): | ||
tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) | ||
|
||
def build(self): | ||
pass | ||
|
||
|
||
def package(self): | ||
Pro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
self._extract_license() | ||
self.copy("*", dst="res", src=self._source_subfolder) | ||
self.copy("LICENSE", dst="licenses") | ||
|
||
|
||
def package_info(self): | ||
self.cpp_info.libdirs = [] | ||
Mo-Tay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
self.cpp_info.resdirs = ["res"] | ||
self.user_info.nodeset_dir = os.path.join(self.package_folder, "res") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
|
||
|
||
class TestUaNodeSetConan(ConanFile): | ||
|
||
def build(self): | ||
pass | ||
|
||
def test(self): | ||
assert os.path.exists(os.path.join(self.deps_user_info["ua-nodeset"].nodeset_dir, "PLCopen")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
versions: | ||
Mo-Tay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"padim-1.02-2021-07-21": | ||
folder: all |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 see there are some sources (
opcua_clientapi.c
at very least), but I don't see anything built/compiled in the conanfile.there is nothing included or linked in the test package as well, it only checks for some
PLCopen
file.could you explain how this project is exactly used?
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.
These source files are just example files which could be used in combination with the official OPC Foundation reference ANSI C implementation, which is not open source.
The other files, especially the NodeSet2.xml files (together with their Types.xsd and NodeId.csv) files are machine-readable descriptions of an OPC UA companion specification.
The open62541 stack includes the nodeset generator, which generates C Code from these XML files, to correctly initialize an OPC UA Server with a given companion specification.
That script is added in #7314 to open62541.
So open62541 depends on ua-nodeset if one wants to create a pre-initialized OPC UA server.
ua-nodeset conan package is just delivering the resource files, and no libraries or binaries.