Skip to content

Commit 0d50093

Browse files
Support no-binary flag for poetry installer (#76)
1 parent cb7d2e3 commit 0d50093

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,21 @@ Optionally can export dependency tree to requirements.txt file.
7171
7272
7373
### Inputs
74-
| Name | Description | Optional | Default value |
75-
|---------------------------|:---------------------------------------------------------------------------------------------------------------------------|-----------|-----------------------------|
76-
| pypi_repo_url | URL of python package index (for custom packages) | True | "" |
77-
| pypi_token_username | Package index authentication username. | True | "" |
78-
| pypi_token | Package index authentication token or password. | True | "" |
79-
| export_requirements | Set to `true` if need to generate requirements.txt. **Optional** defaults to **false**. | True | false |
80-
| export_credentials | If export_requirements is set to true, it exports requirements.txt with --with-credentials flag. Otherwise, does nothing. | True | true |
81-
| requirements_path | Path to requirements.txt to be generated (relative to sources root). | True | .container/requirements.txt |
82-
| 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 |
83-
| version | Version to install. If value is 'latest', script will install the latest available version of Poetry. | True | latest |
84-
| install_extras | List of optional dependencies to install, separated by space. If value is 'all', all extras will be installed | True | |
85-
| install_only_dependencies | If set to true, installs only dependencies for project, adds the parameter `--no-root` to `poetry install` command. | True | false |
86-
| skip_dependencies | If set to true, installs only poetry without installing dependencies. | True | false |
87-
| export_dev_requirements | If export_requirements is set to true, it exports dev requirements.txt with --without-dev flag. Otherwise, does nothing. | True | true |
74+
| Name | Description | Optional | Default value |
75+
|---------------------------|:-------------------------------------------------------------------------------------------------------------------------------|-----------|-----------------------------|
76+
| pypi_repo_url | URL of python package index (for custom packages) | True | "" |
77+
| pypi_token_username | Package index authentication username. | True | "" |
78+
| pypi_token | Package index authentication token or password. | True | "" |
79+
| export_requirements | Set to `true` if need to generate requirements.txt. **Optional** defaults to **false**. | True | false |
80+
| export_credentials | If export_requirements is set to true, it exports requirements.txt with --with-credentials flag. Otherwise, does nothing. | True | true |
81+
| requirements_path | Path to requirements.txt to be generated (relative to sources root). | True | .container/requirements.txt |
82+
| install_preview | Install preview version of Poetry. | True | false |
83+
| version | Version to install. If value is 'latest', script will install the latest available version of Poetry. | True | latest |
84+
| install_extras | List of optional dependencies to install, separated by space. If value is 'all', all extras will be installed | True | |
85+
| install_only_dependencies | If set to true, installs only dependencies for project, adds the parameter `--no-root` to `poetry install` command. | True | false |
86+
| skip_dependencies | If set to true, installs only poetry without installing dependencies. | True | false |
87+
| export_dev_requirements | If export_requirements is set to true, it exports dev requirements.txt with --without-dev flag. Otherwise, does nothing. | True | true |
88+
| no_binary_dependencies | Dependencies that must be built from source - equivalent to installer.no-binary setting in Poetry. Example: "bottleneck,numpy" | True | "" |
8889

8990
### Outputs
9091
| Name | Description |

install_poetry/action.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ inputs:
6060
default: "latest"
6161

6262
install_extras:
63-
description: |
63+
description: |
6464
List of optional dependencies to install, separated by space.
6565
Optional. Default is empty. If value is 'all', all extras will be installed
6666
required: false
@@ -79,6 +79,12 @@ inputs:
7979
required: false
8080
default: "false"
8181

82+
no_binary_dependencies:
83+
description: |
84+
Dependencies that must be built from source, comma-separated - equivalent to installer.no-binary setting in Poetry.
85+
required: false
86+
default: ""
87+
8288
outputs:
8389
custom_repo_name:
8490
description: "Name of configured custom repository to poetry push command"
@@ -92,6 +98,7 @@ runs:
9298
env:
9399
POETRY_HTTP_BASIC_CUSTOM_REPO_USERNAME: ${{ inputs.pypi_token_username }}
94100
POETRY_HTTP_BASIC_CUSTOM_REPO_PASSWORD: ${{ inputs.pypi_token }}
101+
POETRY_INSTALLER_NO_BINARY: ${{ inputs.no_binary_dependencies }}
95102
EXPORT_REQUIREMENTS: ${{ inputs.export_requirements }}
96103
REQUIREMENTS_PATH: ${{ inputs.requirements_path }}
97104
REPO_URL: ${{ inputs.pypi_repo_url }}

0 commit comments

Comments
 (0)