Skip to main content

包含以太网 TAP 配置杂项数据文件的 Python 模块。

项目描述

pythondata-misc-tapcfg

misc tapcfg 需要的非 Python 文件打包到 Python 模块中,以便它们可以与 Python 库和工具一起使用。

这对于使用 LiteX等工具很有用。

数据文件可以在 Python 模块下找到pythondata_misc_tapcfg。该 pythondata_misc_tapcfg.data_location值可用于查找文件系统上的文件。

直接获取数据文件的示例;

import pythondata_misc_tapcfg

my_data_file = "abc.txt"

with open(os.path.join(pythondata_misc_tapcfg.data_location, my_data_file)) as f:
    print(f.read())

litex.data.find使用API获取数据文件的示例;

from pythondata_misc_tapcfg import data_file

my_data_file = "abc.txt"

with open(data_file(my_data_file)) as f:
    print(f.read())

数据文件来自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

pip与 git 存储库一起使用

您可以使用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 install --user pythondata-misc-tapcfg

requirements.txt文件

使用添加到您的 Pythonrequirements.txt文件中;

pythondata-misc-tapcfg

问题和修复

这个包是 使用pythondata-auto 工具集从https://github.com/enjoy-digital/tapcfg中的源自动生成的。可能无法监控此 pythondata 存储库上的拉取请求和问题。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

pythondata-misc-tapcfg-0.0.post517.tar.gz (196.1 kB 查看哈希

已上传 source

内置分布

pythondata_misc_tapcfg-0.0.post517-py3-none-any.whl (295.9 kB 查看哈希

已上传 py3