PaxPrz
PaxPrz

Reputation: 1928

poetry: How to ignore beta version and install latest alpha version?

I've a package registry for my package framework. I want to get the latest alpha version from the package registry while there are beta versions available for same release. Example

Registry:
  - framework 0.0.1a0
  - framework 0.0.1a1
  - framework 0.0.1b0
  - framework 0.0.1b1

My pypoetry.toml file

[tool.poetry.dependencies]
framework = {version = "^0.0.1", allow-prerelease = true}

I want to install framework latest alpha version (0.0.1a1) while this configuration installs (0.0.1b1).

Upvotes: 0

Views: 1794

Answers (1)

Woong Ze Yi
Woong Ze Yi

Reputation: 41

Install package of a specified version by adding a version variable and an "allow pre-releases" tag (--allow-prereleases) if its a pre-release package in your poetry add command.

For example:

                                 Specify the package version here
                                          vvvvvvvvvvv
poetry add --allow-prereleases bit-vector="^0.42.0a0"
                               ^^^^^^^^^^
                      Replace it with the package name

GitHub link to the exact issue

Upvotes: 1

Related Questions