创建或管理python应用程序或包
pybundler的Python项目详细描述
pybundler
Manages python applicatons or packages.
创建python包的基本模板并管理python应用程序或包。 这个工具的目的是提供与ruby的bundler类似的体验。 这个包基于pypkg-generator和pipenv。
安装
OS X和Linux:
来自PYPI
$ pip3 install pybundler
从源头出发
$ git clone https://github.com/dany2691/pybundler.git
$ cd pybundler
$ python3 setup.py install
用法示例
打开终端并键入:
$ pybundler --help
它将显示:
Options: --install-all Installs all packages from Pipfile -i, --install TEXT Install a given package or the content of the Pipfile -u, --uninstall TEXT uninstalls a given dependecy -d, --dev If it is True, install dependency in dev section --lock Creates or updates the Pipfile.lock -s, --shell Spawns a shell within the virtualenv -b, --build-wheel Creates a source archive and a wheel for your package -t, --test-release Uploads the package to test.pypi.org -r, --release Uploads the package to pypi.org andpushes it to the git remote -p, --package Creates a new python package from scratch -v, --version Shows the current version of the package --help Show this message and exit.
这个工具的目的是提供与ruby的bundler类似的体验。所以你可以从头开始创建一个新的包。
$ pybundler --package
然后,将提示一个问题列表,以便自定义新软件包:
Please, enter the nanme of the package: : greate-project Enter the path of the project (default: current dir)[]: Do you want to include a license file? [y/N]: y Do you want to include a code of conduct file? [y/N]: y Do you want to include a Pipfile file? [y/N]: y Do you want to install pytest? [y/N]: y
因此,您可以在虚拟环境中安装像pipenv这样的依赖项:
$ pybundler --install numpy==1.16.2
您可以安装开发依赖项,如下所示:
$ pybundler --install pytest --dev
因此,与pipenv一样,可以从pipfile安装所有依赖项
$ pybundler --install-all
以下选项生成或更新pipfile.lock:
$ pybundler --lock
以下选项在virtualenv中生成一个shell:
$ pybundler --shell
要查看系统中安装的当前版本:
$ pybundler --version
为了使新包的发布自动化,我们提供了构建包并将其上载到pypi和远程git服务的下一个选项。
这是python setup.py sdist bdist_wheel的替代品
$ pybundler --build-wheel
下一个选项是将包上载到test.pypi.org:
$ pybundler --test-release
最后但并非最不重要的是,这一个,将包上传到pypi.org并将其推送到git远程:
$ pybundler --release
开发设置
此项目使用pipenv进行依赖性解析。这是一种混合 皮普和维图阿列诺夫。按照下面的说明设置开发环境。
$ git clone https://github.com/dany2691/pybundler.git
$ cd pybundler
$ pipenv shell
$ pipenv install -e .
要运行测试套件,请在pybundler目录中:
$ pytest -vv test/
发布历史记录
- 0.3.0分
- add:add--选项的版本标志
- 0.2.1条
- 修复:修复文档
- 0.2.0条
- 更改:项目的新名称,
pybundler
而不是py-bundler
- 更改:项目的新名称,
- 0.1.1条
- 修复:readme.md已修复,
text/markdown
而不是text/markadown
- 修复:readme.md已修复,
- 0.1.0条
- 第一次正确释放
- 添加:添加cli模块
- 0.0.1分
- 进行中的工作
元
丹尼尔·奥马尔·维加拉·佩雷斯–@dan1_net–daniel.omar.vergara@gmail.com
贡献
- 叉它(https://gitlab.com/hexagondata_projects/pybundler)
- 创建功能分支(
git checkout -b feature/fooBar
) - 提交更改(
git commit -am 'Add some fooBar'
) - 推到分支(
git push origin feature/fooBar
) - 创建新的拉取请求