Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support no-binary flag for poetry installer #76

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,21 @@ Optionally can export dependency tree to requirements.txt file.


### Inputs
| Name | Description | Optional | Default value |
|---------------------------|:---------------------------------------------------------------------------------------------------------------------------|-----------|-----------------------------|
| pypi_repo_url | URL of python package index (for custom packages) | True | "" |
| pypi_token_username | Package index authentication username. | True | "" |
| pypi_token | Package index authentication token or password. | True | "" |
| export_requirements | Set to `true` if need to generate requirements.txt. **Optional** defaults to **false**. | True | false |
| export_credentials | If export_requirements is set to true, it exports requirements.txt with --with-credentials flag. Otherwise, does nothing. | True | true |
| requirements_path | Path to requirements.txt to be generated (relative to sources root). | True | .container/requirements.txt |
| install_preview | Install preview version of Poetry. This should be set to **true** in build process until Poetry version 1.2.0 is released. | True | false |
| version | Version to install. If value is 'latest', script will install the latest available version of Poetry. | True | latest |
| install_extras | List of optional dependencies to install, separated by space. If value is 'all', all extras will be installed | True | |
| install_only_dependencies | If set to true, installs only dependencies for project, adds the parameter `--no-root` to `poetry install` command. | True | false |
| skip_dependencies | If set to true, installs only poetry without installing dependencies. | True | false |
| export_dev_requirements | If export_requirements is set to true, it exports dev requirements.txt with --without-dev flag. Otherwise, does nothing. | True | true |
| Name | Description | Optional | Default value |
|---------------------------|:-------------------------------------------------------------------------------------------------------------------------------|-----------|-----------------------------|
| pypi_repo_url | URL of python package index (for custom packages) | True | "" |
| pypi_token_username | Package index authentication username. | True | "" |
| pypi_token | Package index authentication token or password. | True | "" |
| export_requirements | Set to `true` if need to generate requirements.txt. **Optional** defaults to **false**. | True | false |
| export_credentials | If export_requirements is set to true, it exports requirements.txt with --with-credentials flag. Otherwise, does nothing. | True | true |
| requirements_path | Path to requirements.txt to be generated (relative to sources root). | True | .container/requirements.txt |
| install_preview | Install preview version of Poetry. | True | false |
| version | Version to install. If value is 'latest', script will install the latest available version of Poetry. | True | latest |
| install_extras | List of optional dependencies to install, separated by space. If value is 'all', all extras will be installed | True | |
| install_only_dependencies | If set to true, installs only dependencies for project, adds the parameter `--no-root` to `poetry install` command. | True | false |
| skip_dependencies | If set to true, installs only poetry without installing dependencies. | True | false |
| export_dev_requirements | If export_requirements is set to true, it exports dev requirements.txt with --without-dev flag. Otherwise, does nothing. | True | true |
| no_binary_dependencies | Dependencies that must be built from source - equivalent to installer.no-binary setting in Poetry. Example: "bottleneck,numpy" | True | "" |

### Outputs
| Name | Description |
Expand Down
9 changes: 8 additions & 1 deletion install_poetry/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ inputs:
default: "latest"

install_extras:
description: |
description: |
List of optional dependencies to install, separated by space.
Optional. Default is empty. If value is 'all', all extras will be installed
required: false
Expand All @@ -79,6 +79,12 @@ inputs:
required: false
default: "false"

no_binary_dependencies:
description: |
Dependencies that must be built from source, comma-separated - equivalent to installer.no-binary setting in Poetry.
required: false
default: ""

outputs:
custom_repo_name:
description: "Name of configured custom repository to poetry push command"
Expand All @@ -92,6 +98,7 @@ runs:
env:
POETRY_HTTP_BASIC_CUSTOM_REPO_USERNAME: ${{ inputs.pypi_token_username }}
POETRY_HTTP_BASIC_CUSTOM_REPO_PASSWORD: ${{ inputs.pypi_token }}
POETRY_INSTALLER_NO_BINARY: ${{ inputs.no_binary_dependencies }}
EXPORT_REQUIREMENTS: ${{ inputs.export_requirements }}
REQUIREMENTS_PATH: ${{ inputs.requirements_path }}
REPO_URL: ${{ inputs.pypi_repo_url }}
Expand Down
Loading