mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
translated
This commit is contained in:
parent
81072afb28
commit
9db933a987
@ -1,109 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Come test a new release of pipenv, the Python development tool)
|
||||
[#]: via: (https://fedoramagazine.org/come-test-a-new-release-of-pipenv-the-python-development-tool/)
|
||||
[#]: author: (torsava https://fedoramagazine.org/author/torsava/)
|
||||
|
||||
Come test a new release of pipenv, the Python development tool
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
**[Pipenv][2]** is a tool that helps Python developers maintain isolated virtual environments with specifacally defined set of dependencies to achieve reproducible development and deployment environments. It is similar to tools for different programming languages, such as bundler, composer, npm, cargo, yarn, etc.
|
||||
|
||||
A new version of pipenv, 2020.6.2, has been recently released. It is now available in Fedora 33 and rawhide. For older Fedoras, the maintainers decided to package it in [COPR][3] to be tested first. So come try it out, before they push it into stable Fedora versions. The new version doesn’t bring any fancy new features, but after two years of development it fixes a lot of problems and does many things differently under the hood. What worked for you previously should continue to work, but might behave slightly differently.
|
||||
|
||||
### How to get it
|
||||
|
||||
If you are already running Fedora 33 or rawhide, run _$ sudo dnf upgrade pipenv_ or _$ sudo dnf install pipenv_ and you’ll get the new version.
|
||||
|
||||
On Fedora 31 or Fedora 32, you’ll need to use a [copr repository][3] until such time comes that the tested package will be updated in the official place. To enable the repository, run:
|
||||
|
||||
```
|
||||
$ sudo dnf copr enable @python/pipenv
|
||||
```
|
||||
|
||||
Then to upgrade pipenv to the new version, run:
|
||||
|
||||
```
|
||||
$ sudo dnf upgrade pipenv
|
||||
```
|
||||
|
||||
Or, if you haven’t installed it yet, install it via:
|
||||
|
||||
```
|
||||
$ sudo dnf install pipenv
|
||||
```
|
||||
|
||||
In case you ever need to roll back to the officially maintained version, you can run:
|
||||
|
||||
```
|
||||
$ sudo dnf copr disable @python/pipenv
|
||||
$ sudo dnf distro-sync pipenv
|
||||
```
|
||||
|
||||
_COPR is not officially supported by Fedora infrastructure. Use packages at your own risk._
|
||||
|
||||
### How to use it
|
||||
|
||||
If you already have projects managed by the older version of pipenv, you should be able to use the new version in its place without issues. Let us know if something breaks.
|
||||
|
||||
If you are not yet familiar with pipenv or want to start a new project, here is a quick guide:
|
||||
|
||||
Create a working directory:
|
||||
|
||||
```
|
||||
$ mkdir new-project && cd new-project
|
||||
```
|
||||
|
||||
Initialize pipenv with Python 3:
|
||||
|
||||
```
|
||||
$ pipenv --three
|
||||
```
|
||||
|
||||
Install the packages you want, e.g.:
|
||||
|
||||
```
|
||||
$ pipenv install six
|
||||
```
|
||||
|
||||
Generate a Pipfile.lock file:
|
||||
|
||||
```
|
||||
$ pipenv lock
|
||||
```
|
||||
|
||||
Now you can commit the created Pipfile and Pipfile.lock files into your version control system (e.g. git) and others can use this command in the cloned repository to get the same environment:
|
||||
|
||||
```
|
||||
$ pipenv install
|
||||
```
|
||||
|
||||
See [pipenv’s documentation][4] for more examples.
|
||||
|
||||
### How to report problems
|
||||
|
||||
If you encounter any problems with the new pipenv version, please [report any issues in Fedora’s Bugzilla][5]. The maintainers of the pipenv package in official Fedora repositories and in the copr repository are the same. Please indicate in the text that the report is regarding this new version.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/come-test-a-new-release-of-pipenv-the-python-development-tool/
|
||||
|
||||
作者:[torsava][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/torsava/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2018/06/pipenv-install-816x345.jpg
|
||||
[2]: https://github.com/pypa/pipenv
|
||||
[3]: https://copr.fedorainfracloud.org/coprs/g/python/pipenv/
|
||||
[4]: https://pipenv.pypa.io/en/latest/install/
|
||||
[5]: https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=pipenv
|
@ -0,0 +1,110 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Come test a new release of pipenv, the Python development tool)
|
||||
[#]: via: (https://fedoramagazine.org/come-test-a-new-release-of-pipenv-the-python-development-tool/)
|
||||
[#]: author: (torsava https://fedoramagazine.org/author/torsava/)
|
||||
|
||||
快来测试 Python 开发工具 pipenv 的新版本
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
**[Pipenv][2]** 是一个可帮助 Python 开发人员维护具有特定一组依赖关系的隔离虚拟环境,以实现可重复的开发和部署环境的工具。它类似于其他编程语言中的工具如 bundler、composer、npm、cargo、yarn 等。
|
||||
|
||||
|
||||
最近发布了新版本的 pipenv 2020.6.2。现在可以在 Fedora 33 和 Rawhide 中使用它。对于较旧的 Fedora,维护人员决定在 [COPR][3] 中打包,然后进行测试。因此,在稳定版 Fedora 中安装之前请先尝试一下。新版本没有带来任何新颖的功能,但是经过两年的开发,它解决了许多问题,并且在底层做了很多不同的事情。之前可以正常工作的应该可以继续工作,但是可能会略有不同。
|
||||
|
||||
### 如何获取
|
||||
|
||||
如果你已经在运行 Fedora 33 或 Rawhide,请运行 _$ sudo dnf upgrade pipenv_ 或者 _$ sudo dnf install pipenv_,你将获得新版本。
|
||||
|
||||
在 Fedora 31 或 Fedora 32 上,你需要使用 [copr 仓库][3],直到经过测试的包出现在官方仓库中为止。要启用仓库,请运行:
|
||||
|
||||
```
|
||||
$ sudo dnf copr enable @python/pipenv
|
||||
```
|
||||
|
||||
然后将 pipenv 升级到新版本,运行:
|
||||
|
||||
```
|
||||
$ sudo dnf upgrade pipenv
|
||||
```
|
||||
|
||||
或者,如果尚未安装,请通过以下方式安装:
|
||||
|
||||
```
|
||||
$ sudo dnf install pipenv
|
||||
```
|
||||
|
||||
如果你需要回滚到官方维护的版本,可以运行:
|
||||
|
||||
```
|
||||
$ sudo dnf copr disable @python/pipenv
|
||||
$ sudo dnf distro-sync pipenv
|
||||
```
|
||||
|
||||
_COPR 不受 Fedora 基础架构的官方支持。使用软件包需要你自担风险。_
|
||||
|
||||
### 如何使用
|
||||
|
||||
如果你有用旧版本 pipenv 管理的项目,你应该可以毫无问题地使用新版本。让我们知道是否有问题。
|
||||
|
||||
如果你还不熟悉 pipenv 或想开始一个新项目,请参考以下快速指南:
|
||||
|
||||
创建一个工作目录:
|
||||
|
||||
```
|
||||
$ mkdir new-project && cd new-project
|
||||
```
|
||||
|
||||
使用 Python 3 初始化 pipenv:
|
||||
|
||||
```
|
||||
$ pipenv --three
|
||||
```
|
||||
|
||||
安装所需的软件包,例如:
|
||||
|
||||
```
|
||||
$ pipenv install six
|
||||
```
|
||||
|
||||
生成 Pipfile.lock 文件:
|
||||
|
||||
```
|
||||
$ pipenv lock
|
||||
```
|
||||
|
||||
现在,你可以将创建的 Pipfile 和 Pipfile.lock 文件提交到版本控制系统(例如 git)中,其他人可以在克隆的仓库中使用此命令来获得相同的环境:
|
||||
|
||||
```
|
||||
$ pipenv install
|
||||
```
|
||||
|
||||
有关更多示例,请参见 [pipenv 的文档][4]。
|
||||
|
||||
### 如何报告问题
|
||||
|
||||
如果你使用新版本的 pipenv 遇到任何问题,请[在 Fedora 的 Bugzilla中 报告问题][5]。Fedora 官方仓库和 copr 仓库中 pipenv 软件包的维护者是相同的。请在报告中指出是新版本。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/come-test-a-new-release-of-pipenv-the-python-development-tool/
|
||||
|
||||
作者:[torsava][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/torsava/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2018/06/pipenv-install-816x345.jpg
|
||||
[2]: https://github.com/pypa/pipenv
|
||||
[3]: https://copr.fedorainfracloud.org/coprs/g/python/pipenv/
|
||||
[4]: https://pipenv.pypa.io/en/latest/install/
|
||||
[5]: https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=pipenv
|
Loading…
Reference in New Issue
Block a user