Matthew Martin β β π on Nostr: #python versions ``` def version_from_metadata(package: str) -> str: return ...
#python versions
```
def version_from_metadata(package: str) -> str:
return metadata.version(package)
```
This works great until you switch lock files to `COPY src/* /app` in your dockerfile and now you are back to manually updating the `__version__` string by hand again.
Wait, did I write something to solve this recently?
https://pypi.org/project/metametameta/
```
def version_from_metadata(package: str) -> str:
return metadata.version(package)
```
This works great until you switch lock files to `COPY src/* /app` in your dockerfile and now you are back to manually updating the `__version__` string by hand again.
Wait, did I write something to solve this recently?
https://pypi.org/project/metametameta/