Skip to content

Commit 997de3a

Browse files
committed
pip: Update readme with help output
1 parent 9c3e27b commit 997de3a

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

pip/readme.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ This requires `requirements-parser` which can be installed on your host with `pi
2020

2121
You can also list multiple packages in single command:
2222
```
23-
flatpak-pip-generator --runtime='org.freedesktop.Sdk//22.08' foo\>=1.0.0,\<2.0.0 bar
23+
flatpak-pip-generator --runtime='org.freedesktop.Sdk//22.08' foo\>=1.0.0,\<2.0.0 bar
2424
```
2525

26-
If your project contains a [requirements.txt file](https://pip.readthedocs.io/en/stable/user_guide/#requirements-files) with all the project dependencies, you can use
26+
If your project contains a [requirements.txt file](https://pip.readthedocs.io/en/stable/user_guide/#requirements-files) with all the project dependencies, you can use
2727
```
2828
flatpak-pip-generator --runtime='org.freedesktop.Sdk//22.08' --requirements-file='/the/path/to/requirements.txt' --output pypi-dependencies
2929
```
3030

31-
You can use that in your manifest like
31+
You can use that in your manifest like
3232
```json
3333
"modules": [
3434
"pypi-dependencies.json",
@@ -40,19 +40,35 @@ You can use that in your manifest like
4040

4141
## Options
4242

43-
* `--python2`: Build with Python 2. Note that you will have to build [the Python 2 shared-module](https://github.com/flathub/shared-modules/tree/master/python2.7) as it is not in any runtime.
44-
* `--build-isolation`: Enable build isolation with pip (recommended but not always work).
45-
* `--cleanup=(scripts|all)`: Add `cleanup` to the manifest. This is used when the packages installed are only used at build time.
46-
* `--build-only`: Alias to `--cleanup=all`.
47-
* `--requirements-file=`, `-r`: Reads the list of packages from `requirements.txt` file. Mutually exclusive with `--pyproject-file`.
48-
* `--pyproject-file=`: Reads the list of packages from `pyproject.toml` file. Mutually exclusive with `--requirements-file` or `r`.
49-
* `--ignore-pkg=`: Ignore a specific package name in a requirements-file, otherwise ignored.
50-
* `--checker-data`: This adds `x-checker-data` to modules so you will be notified when new releases happen. See [flatpak-external-data-checker](https://github.com/flathub/flatpak-external-data-checker) for more details.
51-
* `--runtime=`: Runs `pip` inside of a specific Flatpak runtime instead of on your host. Highly recommended for reproducability and portability. Examples would be `org.freedesktop.Sdk//22.08` or `org.gnome.Sdk/aarch64/43`.
52-
* `--ignore-errors=`: Allow the generation of empty or otherwise broken files when downloading packages fails.
53-
* `--ignore-installed=`: Comma-separated list of package names for which pip should ignore already installed packages. Useful when the package is installed in the SDK but not in the runtime.
54-
* `--output=`: Sets an output file.
55-
* `--yaml`: Outputs a YAML file.
43+
```
44+
usage: flatpak-pip-generator.py [-h] [--python2] [--cleanup {scripts,all}] [--requirements-file REQUIREMENTS_FILE] [--pyproject-file PYPROJECT_FILE] [--build-only] [--build-isolation]
45+
[--ignore-installed IGNORE_INSTALLED] [--checker-data] [--output OUTPUT] [--runtime RUNTIME] [--yaml] [--ignore-errors] [--ignore-pkg [IGNORE_PKG ...]]
46+
[packages ...]
47+
48+
positional arguments:
49+
packages
50+
51+
options:
52+
-h, --help show this help message and exit
53+
--python2 Look for a Python 2 package
54+
--cleanup {scripts,all}
55+
Select what to clean up after build
56+
--requirements-file, -r REQUIREMENTS_FILE
57+
Specify requirements.txt file. Cannot be used with pyproject file.
58+
--pyproject-file PYPROJECT_FILE
59+
Specify pyproject.toml file. Cannot be used with requirements file.
60+
--build-only Clean up all files after build
61+
--build-isolation Do not disable build isolation. Mostly useful on pip that does't support the feature.
62+
--ignore-installed IGNORE_INSTALLED
63+
Comma-separated list of package names for which pip should ignore already installed packages. Useful when the package is installed in the SDK but not in the runtime.
64+
--checker-data Include x-checker-data in output for the "Flatpak External Data Checker"
65+
--output, -o OUTPUT Specify output file name
66+
--runtime RUNTIME Specify a flatpak to run pip inside of a sandbox, ensures python version compatibility. Format: $RUNTIME_ID//$RUNTIME_BRANCH
67+
--yaml Use YAML as output format instead of JSON
68+
--ignore-errors Ignore errors when downloading packages
69+
--ignore-pkg [IGNORE_PKG ...]
70+
Ignore packages when generating the manifest. Needs to be specified with version constraints if present (e.g. --ignore-pkg 'foo>=3.0.0' 'baz>=21.0').
71+
```
5672

5773
## Development
5874

0 commit comments

Comments
 (0)