跳转到主要内容

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

项目描述

pythondata-misc-tapcfg

将用于misc tapcfg的数据文件打包到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

使用带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文件

使用以下方式将内容添加到Python的requirements.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

使用requirements.txt文件

使用以下方式将内容添加到Python的requirements.txt文件中;

pythondata-misc-tapcfg

问题和修复

此软件包使用pythondata-auto工具集从https://github.com/enjoy-digital/tapcfg的源自动生成。此pythondata存储库的pull请求和问题可能不会得到监控。

项目详情


下载文件

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

源分布

pythondata-misc-tapcfg-0.0.post517.tar.gz (196.1 kB 查看散列)

上传时间

构建分布

pythondata_misc_tapcfg-0.0.post517-py3-none-any.whl (295.9 kB 查看散列)

上传时间 Python 3

支持