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

Metadata simplify #1883

Merged
merged 5 commits into from
Sep 9, 2021
Merged

Metadata simplify #1883

merged 5 commits into from
Sep 9, 2021

Conversation

eli-schwartz
Copy link
Collaborator

Use more idiomatic setup.cfg where possible, preferring setuptools built-in features where possible instead of pbr-specific ones.

setuptools natively supports declarative setup.cfg for a long time now, so there's no need to
specify this in pbr when it can be done in a more stock manner
Use of pbr at runtime is super ugly, as all it does is use pkg_resources to
parse distribution versions and pkg_resources could do the exact same thing. But
they are both slow, because pkg_resources is (by design) slow.

importlib.metadata was added to the stdlib in python 3.8 to fulfill this use
case in a speedy and elegant manner.

FIXME: this entire schema is ugly, not merely at runtime -- use of pbr for
versioning from git is an outdated and stale idea, this should use
setuptools_scm instead which:
- is standard
- supports writing the version to _version.py
Do not rely on running pip to install dependencies, which e.g. distros cannot
do. Instead let this be specified directly as package metadata.

While we are at it, stop actually running pip install if DESTDIR is set, since
this is a fairly likely sign that guake is being installed in a distro
environment where pip install is not allowed.
Copy link
Collaborator

@Davidy22 Davidy22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds and runs fine, did some searching to make sure that cutting /data from here would have no side effects and grep doesn't turn up relevant references and the wheel looks fine too. The other changes look like updates to equivalent actions and ci still works, so I'll merge.

@Davidy22 Davidy22 merged commit 40a1244 into Guake:master Sep 9, 2021
@eli-schwartz eli-schwartz deleted the metadata-simplify branch September 9, 2021 12:10
@eli-schwartz
Copy link
Collaborator Author

Double checking history it seems that the data directory got deleted/moved in 4153ef3 at which point the data_files glob got forgotten.

@eli-schwartz
Copy link
Collaborator Author

At this point there is very little pbr still in use, so I am hopeful I will be able to get a modern and clean pure setup.cfg setup in the near future...

@eli-schwartz eli-schwartz mentioned this pull request Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants