diff options
| author | Florian Klink <flokli@flokli.de> | 2023-11-14 22:40:04 +0200 |
|---|---|---|
| committer | Florian Klink <flokli@flokli.de> | 2023-12-14 23:04:43 +0200 |
| commit | 96c1f0e798320e57f887006a5d01ccff9866a661 (patch) | |
| tree | e97affcf2301a4e35b9c200e52430552acb2f463 /pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch | |
| parent | 8e23dec5ac5ebc36057e980d4e6a3eb6a44da74b (diff) | |
python3.pkgs.reuse: make a python library
reuse actually can also be used as a python library:
https://github.com/fsfe/reuse-tool/blob/main/src/reuse/__init__.py#L11-L12
This change allows composing a python with `reuse` in `PYTHONPATH`:
```
$(nix-build -E "with import ./. {}; (python3.withPackages (ps: [ps.reuse]))")/bin/python
Python 3.11.5 (main, Aug 24 2023, 12:23:19) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import reuse
>>> reuse.__doc__
'reuse is a tool for compliance with the REUSE recommendations.\n\nAlthough the API is documented, it is **NOT** guaranteed stable between minor or\neven patch releases. The semantic versioning of this program pertains\nexclusively to the reuse CLI command. If you want to use reuse as a Python\nlibrary, you should pin reuse to an exact version.\n\nHaving given the above disclaimer, the API has been relatively stable\nnevertheless, and we (the maintainers) do make some efforts to not needlessly\nchange the public API.\n'
```
vs before:
```
❯ $(nix-build -E "with import ./. {}; (python3.withPackages (_: [ reuse]))")/bin/python
Python 3.11.5 (main, Aug 24 2023, 12:23:19) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import reuse
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'reuse'
```
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch')
0 files changed, 0 insertions, 0 deletions
