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

Drop pbr #1991

Merged
merged 4 commits into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ ChangeLog
guake/data/gschemas.compiled
.pytest_cache/
releasenotes/notes/reno.cache
guake/_version.py
guake/paths.py
guake/paths.py.dev
RELEASENOTES.rst
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ black:
checks: black-check flake8 pylint reno-lint

black-check:
PIPENV_IGNORE_VIRTUALENVS=1 pipenv run black --check $(MODULE)
PIPENV_IGNORE_VIRTUALENVS=1 pipenv run black --check $(MODULE) --extend-exclude $(MODULE)/_version.py

flake8:
PIPENV_IGNORE_VIRTUALENVS=1 pipenv run flake8 guake
Expand Down
1 change: 0 additions & 1 deletion docs/source/contributing/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Here are the system dependencies of Guake for its execution:
- ``python3-cairo``
- ``python3-dbus``
- ``python3-gi``
- ``python3-pbr``

Optional dependencies:

Expand Down
1 change: 0 additions & 1 deletion docs/source/user/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ You need to ensure the following points are met in your configuration:
- ``python3-cairo``
- ``python3-dbus``
- ``python3-gi``
- ``python3-pbr``
- ``python3-pip``
- ``python3``

Expand Down
16 changes: 3 additions & 13 deletions guake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,9 @@


def guake_version():
# Do not import in the module root to speed up the dbus communication as much as possible
# That being said, importlib.metadata is pretty speedy unlike pbr/pkg_resources
try:
import importlib.metadata as importlib_metadata
except ImportError:
try:
import importlib_metadata
except ImportError:
import pbr.version # Fallback for python < 3.8 unable to install importlib_metadata

return pbr.version.VersionInfo("guake").version_string()

return importlib_metadata.version("guake")
from ._version import version

return version


def vte_version():
Expand Down
1 change: 0 additions & 1 deletion guake/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ def main():
" python3 \\\n"
" python3-dbus \\\n"
" python3-gi \\\n"
" python3-pbr \\\n"
" python3-pip"
)
sys.exit(1)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
release_summary: >
Deprecated pbr

notes_for_package_maintainers:
- |
Switched from importlib + pbr to setuptools_scm for versioning
2 changes: 1 addition & 1 deletion scripts/bootstrap-dev-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [[ $RUN == "1" ]]; then
python-cairo \
python-dbus \
python-gobject \
python-pbr \
python-setuptools-scm \
vte3
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap-dev-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [[ $RUN == "1" ]]; then
python3-cairo \
python3-dbus \
python3-gi \
python3-pbr \
python3-setuptools-scm \
python3-pip \
libgirepository1.0-dev
fi
Expand Down
11 changes: 4 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ classifier =
packages =
guake
setup_requires =
pbr
setuptools>=57.5.0
setuptools_scm
install_requires =
importlib_metadata; python_version < '3.8'
typing; python_version < '3.5'

[files]
data_files =
share/guake/po = po/*
[options.data_files]
share/guake/po = po/*.mo

[options.entry_points]
console_scripts =
Expand All @@ -47,9 +47,6 @@ all_files = 1
[upload_sphinx]
upload-dir = doc/build/html

[pbr]
warnerrors = True

[wheel]
universal = 1

Expand Down
15 changes: 1 addition & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import setuptools

# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass

setuptools.setup(pbr=True)
setuptools.setup(use_scm_version={"write_to": "guake/_version.py"})