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
VERSIONto 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file poetry_plugin_private-2.0.1-py3-none-any.whl.
File metadata
- Download URL: poetry_plugin_private-2.0.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86e7bf1293e42e79a8f7efc7d29aa71c16929452eeadef521f4d4a3ef5516134
|
|
| MD5 |
a91320c765c7d1ff7258f4e3fbd31305
|
|
| BLAKE2b-256 |
96783c42218865e8eb7344dd9ff9977b0f737105418888afedf3c03aaf0912ad
|