Python模块包含以太网TAP Config misc的数据文件。
pythondata-misc-tapcfg的Python项目详细描述
Python杂烩
打包的misc tapcfg所需的非Python文件 使它们可以与Python库和工具一起使用。在
这对于使用诸如 LiteX。在
数据文件可以在Python模块pythondata_misc_tapcfg
下找到。这个
pythondata_misc_tapcfg.data_location
值可用于查找文件上的文件
系统。在
直接获取数据文件的例子
importpythondata_misc_tapcfgmy_data_file="abc.txt"withopen(os.path.join(pythondata_misc_tapcfg.data_location,my_data_file))asf:print(f.read())
使用litex.data.find
API获取数据文件的示例
数据文件来自https://github.com/enjoy-digital/tapcfg
并使用git subtrees
导入到目录
pythondata_misc_tapcfg/data。在
从git存储库安装
手动
您可以手动安装软件包,但建议不要使用。在
git clone https://github.com/litex-hub/pythondata-misc-tapcfg.git
cd pythondata-misc-tapcfg
sudo python setup.py install
在git存储库中使用pip
您可以使用pip直接安装数据包 从github使用
pip install --user git+https://github.com/litex-hub/pythondata-misc-tapcfg.git
如果您想为整个系统而不是只为当前用户安装,
您需要删除--user
参数并以sudo的方式运行,如下所示
sudo pip install git+https://github.com/litex-hub/pythondata-misc-tapcfg.git
您可以使用以下命令安装存储库的特定版本:
pip install --user git+https://github.com/litex-hub/pythondata-misc-tapcfg.git@<tag>
pip install --user git+https://github.com/litex-hub/pythondata-misc-tapcfg.git@<branch>
pip install --user git+https://github.com/litex-hub/pythondata-misc-tapcfg.git@<hash>
使用requirements.txt
文件
使用以下命令添加到Pythonrequirements.txt
文件中
-e git+https://github.com/litex-hub/pythondata-misc-tapcfg.git
要使用特定版本的存储库,请使用以下命令:
-e https://github.com/litex-hub/pythondata-misc-tapcfg.git@<hash>
从PyPi安装
使用pip
pip install --user pythondata-misc-tapcfg
- 项目
标签: