Name | vcspm JSON |
Version |
1.0.4
JSON |
| download |
home_page | |
Summary | Vinx的C/C++源码包管理器 |
upload_time | 2023-09-08 08:21:44 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | LGPL-2.1-or-later |
keywords |
vcspm
c++
package manager
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# VCSPM
一个使用简单的C/C++源码包管理器。
## 功能
- 支持本地包、远程包、远程源码文件、远程压缩包、git仓库、hg仓库、svn仓库等
- 包代码位于项目目录中,可以轻松访问
- 能够指定包的任何 git 标签、提交或分支
- 可筛选所需的文件
- 下载的包将缓存到用户目录,避免再次下载
## 要求
- Python >= 3.6
- Git >= 2.27
- Hg
- Svn
- patch
> 需要将以上程序路径添加到Path环境变量中
## 用法
有关完整示例,请参阅[示例](./example/)。
在项目目录中创建一个vcspm.json文件,并在字段中添加所需的包packages作为对象:
```json
{
"packages": {
"package": {
"version": "1.0.0",
"type": "local",
"path": "D:/package-1.0.0",
"include": [],
"exclude": []
}
}
}
```
命令行执行vcspm即可。
### 指定包仓库地址
包仓库用于存储预定义的包信息及补丁文件。
路径格式为`包仓库地址/包名首字母小写/包名/版本号/`
`vcspm.json`为包信息描述文件。
`patch.zip`为补丁或脚本文件,将自动解压到`vcspm/patchs/包名/`文件夹中。
```json
{
"service_url": "包仓库地址url",
"packages": {
}
}
```
### 指定包安装目录
```json
{
"install_dir": "vcspm/packages",
"packages": {
}
}
```
### 本地包
当指定`path`时将忽略`url`。
```json
{
"packages": {
"pkg_name": {
"version": "版本号",
"type": "local",
"url": "本地包路径",
"path": "本地包路径"
}
}
}
```
### 远程仓库包
只需指定版本号,其余信息自动从`service_url`地址中获取。
```json
{
"packages": {
"pkg_name": "版本号"
}
}
```
### 远程源码文件
`hash_type`可以为`SHA1`、`SHA256`。
```json
{
"packages": {
"pkg_name": {
"version": "版本号",
"type": "sourcefile",
"url": "源文件url",
"hash_type": "hash类型",
"file_hash": "文件指纹"
}
}
}
```
### 远程源码压缩包
`url`中可使用${version}指代版本号。
`url`可以指定为列表,第一个链接下载失败后自动尝试第二个,以此类推。
`rm_top_dir`为true将移除压缩包中的顶层目录。
```json
{
"packages": {
"pkg_name": {
"version": "版本号",
"type": "archive",
"url": "压缩包url",
"hash_type": "hash类型-SHA1-SHA256",
"file_hash": "文件指纹",
"rm_top_dir": "true"
}
}
}
```
### Git仓库
当指定`git`时将忽略`url`。
`revision`可以为提交、标签、分支。
```json
{
"packages": {
"pkg_name": {
"version": "版本号",
"type": "git",
"url": "git地址",
"git": "git地址",
"revision": "commit或者tag"
}
}
}
```
### 筛选文件
使用`include`和`exclude`筛选文件,有选择的将需要的文件复制到包安装目录。
当`include`和`exclude`存在相同文件时,排除相应文件。
支持Unix shell 风格的通配符,如下:
| 模式 | 含意 |
| :------- | :-------------------------- |
| `*` | 匹配所有 |
| `?` | 匹配任何单个字符 |
| `[seq]` | 匹配 *seq* 中的任何字符 |
| `[!seq]` | 匹配任何不在 *seq* 中的字符 |
对于字面值匹配,请将原字符用方括号括起来。 例如,`'[?]'` 将匹配字符 `'?'`。
```json
{
"packages": {
"pkg_name": {
"include": [
"包含的文件",
""
],
"exclude": [
"排除的文件",
""
]
}
}
}
```
## 命令行参数
| 长选项 |短选项| 描述 |
|-------------------|----|----------|
| --help | -h | 输出帮助 |
| --service-url | -s | 包仓库地址 |
| --list | -l | 列出全部可用的包 |
| --require | | 获取指定的包 |
| --skip | | 跳过指定的包 |
| --clean | -c | 获取之前清除指定的包 |
| --clean-all | -C | 获取之前清除全部包 |
| --debug | | 输出调试信息 |
| --break-on-error | | 出现错误立即中断获取 |
##
Raw data
{
"_id": null,
"home_page": "",
"name": "vcspm",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "vcspm,C++,package manager",
"author": "",
"author_email": "Vinx911 <Buddyhe911@163.com>",
"download_url": "https://files.pythonhosted.org/packages/36/c3/5c72903c9603602f8afe07e981b0030d49227f87fd99090ee2416de870ee/vcspm-1.0.4.tar.gz",
"platform": null,
"description": "# VCSPM\r\n\u4e00\u4e2a\u4f7f\u7528\u7b80\u5355\u7684C/C++\u6e90\u7801\u5305\u7ba1\u7406\u5668\u3002\r\n\r\n## \u529f\u80fd\r\n- \u652f\u6301\u672c\u5730\u5305\u3001\u8fdc\u7a0b\u5305\u3001\u8fdc\u7a0b\u6e90\u7801\u6587\u4ef6\u3001\u8fdc\u7a0b\u538b\u7f29\u5305\u3001git\u4ed3\u5e93\u3001hg\u4ed3\u5e93\u3001svn\u4ed3\u5e93\u7b49\r\n- \u5305\u4ee3\u7801\u4f4d\u4e8e\u9879\u76ee\u76ee\u5f55\u4e2d\uff0c\u53ef\u4ee5\u8f7b\u677e\u8bbf\u95ee\r\n- \u80fd\u591f\u6307\u5b9a\u5305\u7684\u4efb\u4f55 git \u6807\u7b7e\u3001\u63d0\u4ea4\u6216\u5206\u652f\r\n- \u53ef\u7b5b\u9009\u6240\u9700\u7684\u6587\u4ef6\r\n- \u4e0b\u8f7d\u7684\u5305\u5c06\u7f13\u5b58\u5230\u7528\u6237\u76ee\u5f55\uff0c\u907f\u514d\u518d\u6b21\u4e0b\u8f7d\r\n\r\n## \u8981\u6c42\r\n- Python >= 3.6\r\n- Git >= 2.27\r\n- Hg\r\n- Svn\r\n- patch\r\n\r\n> \u9700\u8981\u5c06\u4ee5\u4e0a\u7a0b\u5e8f\u8def\u5f84\u6dfb\u52a0\u5230Path\u73af\u5883\u53d8\u91cf\u4e2d\r\n\r\n## \u7528\u6cd5\r\n\u6709\u5173\u5b8c\u6574\u793a\u4f8b\uff0c\u8bf7\u53c2\u9605[\u793a\u4f8b](./example/)\u3002\r\n\r\n\u5728\u9879\u76ee\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2avcspm.json\u6587\u4ef6\uff0c\u5e76\u5728\u5b57\u6bb5\u4e2d\u6dfb\u52a0\u6240\u9700\u7684\u5305packages\u4f5c\u4e3a\u5bf9\u8c61: \r\n```json\r\n{\r\n \"packages\": {\r\n \"package\": {\r\n \"version\": \"1.0.0\",\r\n \"type\": \"local\",\r\n \"path\": \"D:/package-1.0.0\",\r\n \"include\": [],\r\n \"exclude\": []\r\n }\r\n }\r\n}\r\n```\r\n\u547d\u4ee4\u884c\u6267\u884cvcspm\u5373\u53ef\u3002\r\n\r\n### \u6307\u5b9a\u5305\u4ed3\u5e93\u5730\u5740\r\n\u5305\u4ed3\u5e93\u7528\u4e8e\u5b58\u50a8\u9884\u5b9a\u4e49\u7684\u5305\u4fe1\u606f\u53ca\u8865\u4e01\u6587\u4ef6\u3002\r\n\r\n\u8def\u5f84\u683c\u5f0f\u4e3a`\u5305\u4ed3\u5e93\u5730\u5740/\u5305\u540d\u9996\u5b57\u6bcd\u5c0f\u5199/\u5305\u540d/\u7248\u672c\u53f7/`\r\n\r\n`vcspm.json`\u4e3a\u5305\u4fe1\u606f\u63cf\u8ff0\u6587\u4ef6\u3002\r\n\r\n`patch.zip`\u4e3a\u8865\u4e01\u6216\u811a\u672c\u6587\u4ef6\uff0c\u5c06\u81ea\u52a8\u89e3\u538b\u5230`vcspm/patchs/\u5305\u540d/`\u6587\u4ef6\u5939\u4e2d\u3002\r\n\r\n```json\r\n{\r\n \"service_url\": \"\u5305\u4ed3\u5e93\u5730\u5740url\",\r\n \"packages\": {\r\n \r\n }\r\n}\r\n```\r\n\r\n### \u6307\u5b9a\u5305\u5b89\u88c5\u76ee\u5f55\r\n```json\r\n{\r\n \"install_dir\": \"vcspm/packages\",\r\n \"packages\": {\r\n \r\n }\r\n}\r\n```\r\n\r\n### \u672c\u5730\u5305\r\n\u5f53\u6307\u5b9a`path`\u65f6\u5c06\u5ffd\u7565`url`\u3002\r\n\r\n```json\r\n{\r\n \"packages\": {\r\n \"pkg_name\": { \r\n \"version\": \"\u7248\u672c\u53f7\",\r\n \"type\": \"local\",\r\n \"url\": \"\u672c\u5730\u5305\u8def\u5f84\",\r\n \"path\": \"\u672c\u5730\u5305\u8def\u5f84\"\r\n }\r\n }\r\n}\r\n```\r\n\r\n### \u8fdc\u7a0b\u4ed3\u5e93\u5305\r\n\u53ea\u9700\u6307\u5b9a\u7248\u672c\u53f7\uff0c\u5176\u4f59\u4fe1\u606f\u81ea\u52a8\u4ece`service_url`\u5730\u5740\u4e2d\u83b7\u53d6\u3002\r\n\r\n```json\r\n{\r\n \"packages\": {\r\n \"pkg_name\": \"\u7248\u672c\u53f7\"\r\n }\r\n}\r\n```\r\n\r\n### \u8fdc\u7a0b\u6e90\u7801\u6587\u4ef6\r\n`hash_type`\u53ef\u4ee5\u4e3a`SHA1`\u3001`SHA256`\u3002\r\n```json\r\n{\r\n \"packages\": {\r\n \"pkg_name\": { \r\n \"version\": \"\u7248\u672c\u53f7\",\r\n \"type\": \"sourcefile\",\r\n \"url\": \"\u6e90\u6587\u4ef6url\",\r\n \"hash_type\": \"hash\u7c7b\u578b\",\r\n \"file_hash\": \"\u6587\u4ef6\u6307\u7eb9\"\r\n }\r\n }\r\n}\r\n```\r\n\r\n### \u8fdc\u7a0b\u6e90\u7801\u538b\u7f29\u5305\r\n`url`\u4e2d\u53ef\u4f7f\u7528${version}\u6307\u4ee3\u7248\u672c\u53f7\u3002\r\n`url`\u53ef\u4ee5\u6307\u5b9a\u4e3a\u5217\u8868\uff0c\u7b2c\u4e00\u4e2a\u94fe\u63a5\u4e0b\u8f7d\u5931\u8d25\u540e\u81ea\u52a8\u5c1d\u8bd5\u7b2c\u4e8c\u4e2a\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002\r\n`rm_top_dir`\u4e3atrue\u5c06\u79fb\u9664\u538b\u7f29\u5305\u4e2d\u7684\u9876\u5c42\u76ee\u5f55\u3002\r\n\r\n```json\r\n{\r\n \"packages\": {\r\n \"pkg_name\": { \r\n \"version\": \"\u7248\u672c\u53f7\",\r\n \"type\": \"archive\",\r\n \"url\": \"\u538b\u7f29\u5305url\",\r\n \"hash_type\": \"hash\u7c7b\u578b-SHA1-SHA256\",\r\n \"file_hash\": \"\u6587\u4ef6\u6307\u7eb9\",\r\n \"rm_top_dir\": \"true\"\r\n }\r\n }\r\n}\r\n```\r\n\r\n### Git\u4ed3\u5e93\r\n\u5f53\u6307\u5b9a`git`\u65f6\u5c06\u5ffd\u7565`url`\u3002\r\n`revision`\u53ef\u4ee5\u4e3a\u63d0\u4ea4\u3001\u6807\u7b7e\u3001\u5206\u652f\u3002\r\n\r\n```json\r\n{\r\n \"packages\": {\r\n \"pkg_name\": { \r\n \"version\": \"\u7248\u672c\u53f7\",\r\n \"type\": \"git\",\r\n \"url\": \"git\u5730\u5740\",\r\n \"git\": \"git\u5730\u5740\",\r\n \"revision\": \"commit\u6216\u8005tag\"\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n### \u7b5b\u9009\u6587\u4ef6\r\n\u4f7f\u7528`include`\u548c`exclude`\u7b5b\u9009\u6587\u4ef6\uff0c\u6709\u9009\u62e9\u7684\u5c06\u9700\u8981\u7684\u6587\u4ef6\u590d\u5236\u5230\u5305\u5b89\u88c5\u76ee\u5f55\u3002\r\n\u5f53`include`\u548c`exclude`\u5b58\u5728\u76f8\u540c\u6587\u4ef6\u65f6\uff0c\u6392\u9664\u76f8\u5e94\u6587\u4ef6\u3002\r\n\r\n\u652f\u6301Unix shell \u98ce\u683c\u7684\u901a\u914d\u7b26\uff0c\u5982\u4e0b\uff1a\r\n\r\n| \u6a21\u5f0f | \u542b\u610f |\r\n| :------- | :-------------------------- |\r\n| `*` | \u5339\u914d\u6240\u6709 |\r\n| `?` | \u5339\u914d\u4efb\u4f55\u5355\u4e2a\u5b57\u7b26 |\r\n| `[seq]` | \u5339\u914d *seq* \u4e2d\u7684\u4efb\u4f55\u5b57\u7b26 |\r\n| `[!seq]` | \u5339\u914d\u4efb\u4f55\u4e0d\u5728 *seq* \u4e2d\u7684\u5b57\u7b26 |\r\n\r\n\u5bf9\u4e8e\u5b57\u9762\u503c\u5339\u914d\uff0c\u8bf7\u5c06\u539f\u5b57\u7b26\u7528\u65b9\u62ec\u53f7\u62ec\u8d77\u6765\u3002 \u4f8b\u5982\uff0c`'[?]'` \u5c06\u5339\u914d\u5b57\u7b26 `'?'`\u3002\r\n\r\n\r\n```json\r\n{\r\n \"packages\": {\r\n \"pkg_name\": { \r\n \"include\": [\r\n \"\u5305\u542b\u7684\u6587\u4ef6\",\r\n \"\"\r\n ],\r\n \"exclude\": [\r\n \"\u6392\u9664\u7684\u6587\u4ef6\",\r\n \"\"\r\n ]\r\n }\r\n }\r\n}\r\n```\r\n\r\n## \u547d\u4ee4\u884c\u53c2\u6570\r\n\r\n| \u957f\u9009\u9879 |\u77ed\u9009\u9879| \u63cf\u8ff0 |\r\n|-------------------|----|----------|\r\n| --help | -h | \u8f93\u51fa\u5e2e\u52a9 |\r\n| --service-url | -s | \u5305\u4ed3\u5e93\u5730\u5740 |\r\n| --list | -l | \u5217\u51fa\u5168\u90e8\u53ef\u7528\u7684\u5305 |\r\n| --require | | \u83b7\u53d6\u6307\u5b9a\u7684\u5305 |\r\n| --skip | | \u8df3\u8fc7\u6307\u5b9a\u7684\u5305 |\r\n| --clean | -c | \u83b7\u53d6\u4e4b\u524d\u6e05\u9664\u6307\u5b9a\u7684\u5305 |\r\n| --clean-all | -C | \u83b7\u53d6\u4e4b\u524d\u6e05\u9664\u5168\u90e8\u5305 |\r\n| --debug | | \u8f93\u51fa\u8c03\u8bd5\u4fe1\u606f |\r\n| --break-on-error | | \u51fa\u73b0\u9519\u8bef\u7acb\u5373\u4e2d\u65ad\u83b7\u53d6 |\r\n\r\n## \r\n",
"bugtrack_url": null,
"license": "LGPL-2.1-or-later",
"summary": "Vinx\u7684C/C++\u6e90\u7801\u5305\u7ba1\u7406\u5668",
"version": "1.0.4",
"project_urls": {
"Changelog": "https://github.com/Vinx911/vcspm",
"Documentation": "https://github.com/Vinx911/vcspm",
"Homepage": "https://github.com/Vinx911/vcspm",
"Source": "https://github.com/Vinx911/vcspm"
},
"split_keywords": [
"vcspm",
"c++",
"package manager"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e259d4ca5d9b8f47fa5a89773f18219410b2421e372cb76b7ede839ef381615a",
"md5": "d7961a792ed3d4b6927e164b8e61ae65",
"sha256": "3482f845b70d260c301dd833ec00bd91a10564ced64d00e6bea7e6972cf628b7"
},
"downloads": -1,
"filename": "vcspm-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d7961a792ed3d4b6927e164b8e61ae65",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 23344,
"upload_time": "2023-09-08T08:21:41",
"upload_time_iso_8601": "2023-09-08T08:21:41.892019Z",
"url": "https://files.pythonhosted.org/packages/e2/59/d4ca5d9b8f47fa5a89773f18219410b2421e372cb76b7ede839ef381615a/vcspm-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "36c35c72903c9603602f8afe07e981b0030d49227f87fd99090ee2416de870ee",
"md5": "e640d10b140b2e730a54ff6d770dc751",
"sha256": "9956191fe32fff527d743929a71b1a095befe0d344da7cca68623dc05434c0d3"
},
"downloads": -1,
"filename": "vcspm-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "e640d10b140b2e730a54ff6d770dc751",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26111,
"upload_time": "2023-09-08T08:21:44",
"upload_time_iso_8601": "2023-09-08T08:21:44.012487Z",
"url": "https://files.pythonhosted.org/packages/36/c3/5c72903c9603602f8afe07e981b0030d49227f87fd99090ee2416de870ee/vcspm-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-08 08:21:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Vinx911",
"github_project": "vcspm",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "vcspm"
}