类似于pip的Ansible集合安装器。
项目描述
pip4a
Ansible集合的类似pip安装。
功能
- 促进“短暂”的开发方法
- 确保当前开发环境是隔离的
- 安装所有集合的Python要求
- 安装所有集合的测试要求
- 检查缺失的系统包
- 将当前集合符号链接到当前Python解释器的site-packages
- 将所有集合依赖项安装到当前Python解释器的site-packages
将集合放入Python site-packages目录,它们将被Ansible以及Python和pytest发现。
用法
设置开发环境
$ pip install pip4a --user
$ git clone <collection_repo>
$ cd <collection_repo>
$ pip4a install -e .\[test] --venv venv
INFO: Found collection name: network.interfaces from /home/bthornto/github/network.interfaces/galaxy.yml.
INFO: Creating virtual environment: /home/bthornto/github/network.interfaces/venv
INFO: Virtual environment: /home/bthornto/github/network.interfaces/venv
INFO: Using specified interpreter: /home/bthornto/github/network.interfaces/venv/bin/python
INFO: Requirements file /home/bthornto/github/network.interfaces/requirements.txt is empty, skipping
INFO: Installing python requirements from /home/bthornto/github/network.interfaces/test-requirements.txt
INFO: Installing ansible-core.
INFO: Initializing build directory: /home/bthornto/github/network.interfaces/build
INFO: Copying collection to build directory using git ls-files.
INFO: Running ansible-galaxy to build collection.
INFO: Running ansible-galaxy to install collection and it's dependencies.
INFO: Removing installed /home/bthornto/github/network.interfaces/venv/lib64/python3.11/site-packages/ansible_collections/network/interfaces
INFO: Symlinking /home/bthornto/github/network.interfaces/venv/lib64/python3.11/site-packages/ansible_collections/network/interfaces to /home/bthornto/github/network.interfaces
WARNING: A virtual environment was specified but has not been activated.
WARNING: Please activate the virtual environment:
source venv/bin/activate
拆除开发环境
$ pip4a uninstall ansible.scm
INFO Found collection name: ansible.scm from /home/bthornto/github/ansible.scm/galaxy.yml.
INFO Requirements file /home/bthornto/github/ansible.scm/requirements.txt is empty, skipping
INFO Uninstalling python requirements from /home/bthornto/github/ansible.scm/test-requirements.txt
INFO Removed ansible.utils: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible/utils
INFO Removed ansible.utils*.info: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible.utils-2.10.3.info
INFO Removed ansible.scm: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible/scm
INFO Removed collection namespace root: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections/ansible
INFO Removed collection root: /home/bthornto/github/ansible.scm/venv/lib64/python3.11/site-packages/ansible_collections
帮助
pip4a --help
pip4a install --help
pip4a uninstall --help
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。
源代码分发
pip4a-0.2.17.tar.gz (47.8 kB 查看哈希值)
构建分发
pip4a-0.2.17-py3-none-any.whl (41.2 kB 查看哈希值)
关闭
pip4a-0.2.17.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | db372e88c258f3ec478f7fc9416bf1bf774379ceb45aa7e4f2a55cfff1f3884b |
|
MD5 | 502a927bfdef0e34f9ae78a3132c6224 |
|
BLAKE2b-256 | 1eeeb67629c4e8694cc29e78e5471ead2d937a7a59de2c6639627ee60155e528 |
关闭
pip4a-0.2.17-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 4d0a4cc27a37180f7d140765e0bda9652fc7fa47c593eccc290ec8bf10b15bf9 |
|
MD5 | 0e85a2500c36501e0c93b23a26f533f1 |
|
BLAKE2b-256 | 3f4a8aba55dacfcaba5453cbff611ccf0f79792f6428b921cfccc15028a9289f |