mirror of
https://gitee.com/openharmony/third_party_pyyaml
synced 2024-11-23 07:20:31 +00:00
!1 add README and some other configuration files.
Merge pull request !1 from honghecun/master
This commit is contained in:
commit
7e579f0fc8
84
OAT.xml
Normal file
84
OAT.xml
Normal file
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
|
||||
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<oatconfig>
|
||||
<licensefile></licensefile>
|
||||
<policylist>
|
||||
<policy name="projectPolicy" desc="">
|
||||
<!--policyitem type="compatibility" name="GPL-2.0+" path="abc/.*" desc="Process that runs independently, invoked by the X process."/-->
|
||||
<!--policyitem type="license" name="LGPL" path="abc/.*" desc="Dynamically linked by module X"/-->
|
||||
<!--policyitem type="copyright" name="xxx" path="abc/.*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by X Company"/-->
|
||||
</policy>
|
||||
</policylist>
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filename" name="invalid-python-bytes-2-py3.loader-error" desc="Not a binary file, doesn't have any risk."/>
|
||||
<filteritem type="filename" name="latin.unicode" desc="Just a config file with special format, doesn't have any risk."/>
|
||||
<filteritem type="filename" name="emoticons.unicode" desc="Just a config file with special format, doesn't have any risk."/>
|
||||
<filteritem type="filename" name="emoticons2.unicode" desc="Just a config file with special format, doesn't have any risk."/>
|
||||
<filteritem type="filename" name="invalid-base64-data-2.loader-error" desc="Not a binary file, doesn't have any risk."/>
|
||||
<filteritem type="filename" name="odd-utf16.stream-error" desc="Not a binary file, doesn't have any risk."/>
|
||||
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||
</filefilter>
|
||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||
</filefilter>
|
||||
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
||||
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||
</filefilter>
|
||||
<filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
|
||||
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||
</filefilter>
|
||||
<filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
|
||||
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||
</filefilter>
|
||||
<filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
|
||||
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||
<!--filteritem type="filename" name="*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="abcdefg/.*.uvwxyz" desc="Describe the reason for filtering scan results"/-->
|
||||
<!--filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/-->
|
||||
</filefilter>
|
||||
|
||||
</filefilterlist>
|
||||
<licensematcherlist>
|
||||
<!--licensematcher name="uvwxyz License" desc="If the scanning result is InvalidLicense, you can define matching rules here. Note that quotation marks must be escaped.">
|
||||
<licensetext name="
|
||||
uvwxyz license textA xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
" desc=""/>
|
||||
<licensetext name="
|
||||
uvwxyz license textB xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
" desc=""/>
|
||||
</licensematcher-->
|
||||
</licensematcherlist>
|
||||
</oatconfig>
|
||||
</configuration>
|
53
README-EN.md
Normal file
53
README-EN.md
Normal file
@ -0,0 +1,53 @@
|
||||
PyYAML
|
||||
======
|
||||
|
||||
A full-featured YAML processing framework for Python
|
||||
|
||||
## Installation
|
||||
|
||||
To install, type `python setup.py install`.
|
||||
|
||||
By default, the `setup.py` script checks whether LibYAML is installed and if
|
||||
so, builds and installs LibYAML bindings.
|
||||
To skip the check and force installation of LibYAML bindings, use the option
|
||||
`--with-libyaml`: `python setup.py --with-libyaml install`.
|
||||
To disable the check and skip building and installing LibYAML bindings, use
|
||||
`--without-libyaml`: `python setup.py --without-libyaml install`.
|
||||
|
||||
When LibYAML bindings are installed, you may use fast LibYAML-based parser and
|
||||
emitter as follows:
|
||||
|
||||
>>> yaml.load(stream, Loader=yaml.CLoader)
|
||||
>>> yaml.dump(data, Dumper=yaml.CDumper)
|
||||
|
||||
If you don't trust the input YAML stream, you should use:
|
||||
|
||||
>>> yaml.safe_load(stream)
|
||||
|
||||
## Testing
|
||||
|
||||
PyYAML includes a comprehensive test suite.
|
||||
To run the tests, type `python setup.py test`.
|
||||
|
||||
## Further Information
|
||||
|
||||
* For more information, check the
|
||||
[PyYAML homepage](https://github.com/yaml/pyyaml).
|
||||
|
||||
* [PyYAML tutorial and reference](http://pyyaml.org/wiki/PyYAMLDocumentation).
|
||||
|
||||
* Discuss PyYAML with the maintainers on
|
||||
Matrix at https://matrix.to/#/#pyyaml:yaml.io or
|
||||
IRC #pyyaml irc.libera.chat
|
||||
|
||||
* Submit bug reports and feature requests to the
|
||||
[PyYAML bug tracker](https://github.com/yaml/pyyaml/issues).
|
||||
|
||||
## License
|
||||
|
||||
The PyYAML module was written by Kirill Simonov <xi@resolvent.net>.
|
||||
It is currently maintained by the YAML and Python communities.
|
||||
|
||||
PyYAML is released under the MIT license.
|
||||
|
||||
See the file LICENSE for more details.
|
11
README.OpenSource
Normal file
11
README.OpenSource
Normal file
@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"Name": "PyYAML",
|
||||
"License": "MIT License",
|
||||
"License File": "LICENSE",
|
||||
"Version Number": "6.0",
|
||||
"Owner": "xuyong59@huawei.com",
|
||||
"Upstream URL": "https://pypi.org/project/PyYAML",
|
||||
"Description": "A YAML parser and emitter for Python"
|
||||
}
|
||||
]
|
58
README.md
58
README.md
@ -1,53 +1,45 @@
|
||||
PyYAML
|
||||
======
|
||||
|
||||
A full-featured YAML processing framework for Python
|
||||
PyYAML是一套基于Python实现的全能YAML处理框架。
|
||||
|
||||
## Installation
|
||||
## 安装
|
||||
|
||||
To install, type `python setup.py install`.
|
||||
您可以通过执行`python setup.py install`完成LibYAML的安装。
|
||||
|
||||
By default, the `setup.py` script checks whether LibYAML is installed and if
|
||||
so, builds and installs LibYAML bindings.
|
||||
To skip the check and force installation of LibYAML bindings, use the option
|
||||
`--with-libyaml`: `python setup.py --with-libyaml install`.
|
||||
To disable the check and skip building and installing LibYAML bindings, use
|
||||
`--without-libyaml`: `python setup.py --without-libyaml install`.
|
||||
默认情况下,`setup.py`会检查LibYAML是否已安装,在LibYAML已安装的情况下会自动构建及安装LibYAML bindings。
|
||||
|
||||
When LibYAML bindings are installed, you may use fast LibYAML-based parser and
|
||||
emitter as follows:
|
||||
如果想忽略相应的检查直接安装LibYAML bindings,可以执行以下命令:
|
||||
|
||||
`--with-libyaml`: `python setup.py --with-libyaml install`。
|
||||
|
||||
如果想关闭检查且忽略构建及安装LibYAML bindings,可以执行以下命令:
|
||||
|
||||
`--without-libyaml`: `python setup.py --without-libyaml install`。
|
||||
|
||||
当LibYAML bindings成功安装之后,你可以按照以下方式进行YAML流的加载解析:
|
||||
|
||||
>>> yaml.load(stream, Loader=yaml.CLoader)
|
||||
>>> yaml.dump(data, Dumper=yaml.CDumper)
|
||||
|
||||
If you don't trust the input YAML stream, you should use:
|
||||
如果您不是很信任某个YAML输入流,可以通过安全模式进行加载:
|
||||
|
||||
>>> yaml.safe_load(stream)
|
||||
|
||||
## Testing
|
||||
## 测试
|
||||
|
||||
PyYAML includes a comprehensive test suite.
|
||||
To run the tests, type `python setup.py test`.
|
||||
PyYAML包含完整的测试套件,您可以通过执行 `python setup.py test`可以完成相应的测试用例的执行。
|
||||
|
||||
## Further Information
|
||||
## 更多信息
|
||||
|
||||
* For more information, check the
|
||||
[PyYAML homepage](https://github.com/yaml/pyyaml).
|
||||
* 如果您想获取更多关于PyYAML的信息,可以访问PyYAML官网[PyYAML homepage](https://github.com/yaml/pyyaml)和[PyYAML tutorial and reference](http://pyyaml.org/wiki/PyYAMLDocumentation)。
|
||||
|
||||
* 您也可以通过[Matrix](https://matrix.to/#/#pyyaml:yaml.io)或者IRC #pyyaml irc.libera.chat 和PyYAML的维护人员讨论问题。
|
||||
|
||||
* 您也可以通过访问[PyYAML bug tracker](https://github.com/yaml/pyyaml/issues)来提交您发现的关于PyYAML的任何Bug或者您想增加的新特性。
|
||||
|
||||
* [PyYAML tutorial and reference](http://pyyaml.org/wiki/PyYAMLDocumentation).
|
||||
## 协议
|
||||
|
||||
* Discuss PyYAML with the maintainers on
|
||||
Matrix at https://matrix.to/#/#pyyaml:yaml.io or
|
||||
IRC #pyyaml irc.libera.chat
|
||||
PyYAML模块由Kirill Simonov <xi@resolvent.net>编码实现,目前由YAML和Python社区负责维护。
|
||||
|
||||
* Submit bug reports and feature requests to the
|
||||
[PyYAML bug tracker](https://github.com/yaml/pyyaml/issues).
|
||||
|
||||
## License
|
||||
|
||||
The PyYAML module was written by Kirill Simonov <xi@resolvent.net>.
|
||||
It is currently maintained by the YAML and Python communities.
|
||||
|
||||
PyYAML is released under the MIT license.
|
||||
|
||||
See the file LICENSE for more details.
|
||||
PyYAML基于MIT协议发布,更多协议相关的内容可以访问LISENCE文件。
|
||||
|
Loading…
Reference in New Issue
Block a user