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

Missing dist-info breaks project on version 3.4.0 #1155

Closed
Scoppio opened this issue Oct 3, 2022 · 1 comment · Fixed by #1156
Closed

Missing dist-info breaks project on version 3.4.0 #1155

Scoppio opened this issue Oct 3, 2022 · 1 comment · Fixed by #1156
Labels
Milestone

Comments

@Scoppio
Copy link
Contributor

Scoppio commented Oct 3, 2022

The new version 3.4.0 requires the presence of the METADATA file on dist-info folder, otherwise the project breaks and is unable to load.

__version__ = importlib.metadata.version(__package__)

This is the only place where this information is ever looked and in no way it is important or vital for the correct operation of the application.

This is a breaking change for all applications where the deployment strips metadata and other files to reduce size.

@Scoppio Scoppio added the bug label Oct 3, 2022
@snowman2
Copy link
Member

snowman2 commented Oct 3, 2022

Related to:

One potential path forward: https://setuptools.pypa.io/en/latest/userguide/declarative_config.html

In __init__.py convert the version to a string and copy the version from setup.cfg.

In setup.cfg:

version = attr: pyproj.__version__

A PR with the fix is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants