Skip to main content

A plugin that contains dynamic version numbers and default PyPI repository source settings.

Project description

#README

!IMPORTANT! Please upgrade to version 2.0.0. Adapted to Poetry >=2.0.0.

Related information

Build <*.whl> binary package

Location: [PROJECT_ROOT]/.env

POETRY_VIRTUALENVS_IN_PROJECT=true
POETRY_PLUGIN_PRIVATE_DISABLE_LOG=true
POETRY_PYPI_MIRROR_URL=http://pypi.stone.cs/simple/
cd [PROJECT_ROOT]
make

Install plugin

pip install "poetry-plugin-private>=2.0.0"

Modify pyproject.toml configuration

Add the following content to support reading the __version__ variable dynamic version number

Location: <Env>:VERSION or [Package]/__init__.py:__version__

**When source = init, the value of the environment variable VERSION is first detected as the version number. Otherwise, the value of the __version__ variable is read from the [Package]/__init__.py file as the version number. **

[tool.poetry-version-plugin]
source = "init"

Env: VERSION

[tool.poetry-version-plugin]
source = "env"

Set environment variables to modify the default PyPI source address

Linux

export POETRY_VIRTUALENVS_IN_PROJECT="true"
export POETRY_PYPI_MIRROR_DISABLE_CACHE="true"
export POETRY_PLUGIN_PRIVATE_DISABLE_LOG="true"
export POETRY_PYPI_MIRROR_URL="http://pypi.stone.cs/simple/"

Windows 10/11

[Environment]::SetEnvironmentVariable("POETRY_VIRTUALENVS_IN_PROJECT", "true", "User");
[Environment]::SetEnvironmentVariable("POETRY_PLUGIN_PRIVATE_DISABLE_LOG", "true", "User");
[Environment]::SetEnvironmentVariable("POETRY_PYPI_MIRROR_DISABLE_CACHE", "true", "User");
[Environment]::SetEnvironmentVariable("POETRY_PYPI_MIRROR_URL", "http://pypi.stone.cs/simple/", "User");

Features to be supported

  • Support environment variable VERSION to dynamically set the build version number.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poetry_plugin_private-2.0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file poetry_plugin_private-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_plugin_private-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86e7bf1293e42e79a8f7efc7d29aa71c16929452eeadef521f4d4a3ef5516134
MD5 a91320c765c7d1ff7258f4e3fbd31305
BLAKE2b-256 96783c42218865e8eb7344dd9ff9977b0f737105418888afedf3c03aaf0912ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page