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

Remove use of distutils #554

Merged
merged 1 commit into from
Jun 26, 2024
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
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Source: safeeyes
Section: utils
Priority: optional
Maintainer: Gobinath Loganathan <slgobinath@gmail.com>
Build-Depends: debhelper (>= 10), dh-python, python3, python3-setuptools
Build-Depends: debhelper (>= 10), dh-python, python3, python3-packaging
Standards-Version: 3.9.6
X-Python3-Version: >= 3.5
X-Python3-Version: >= 3.12
Homepage: https://github.com/slgobinath/SafeEyes/

Package: safeeyes
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-ayatanaappindicator3-0.1, python3 (>= 3.5.0), python3-xlib, python3-dbus, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil, python3-croniter
Depends: ${misc:Depends}, ${python3:Depends}, gir1.2-ayatanaappindicator3-0.1, python3 (>= 3.12.0), python3-xlib, python3-dbus, gir1.2-notify-0.7, python3-babel, x11-utils, xprintidle, alsa-utils, python3-psutil, python3-croniter
Description: Safe Eyes
Safe Eyes is a simple tool to remind you to take periodic breaks for your eyes. This is essential for anyone spending more time on the computer to avoid eye strain and other physical problems.
.
Expand Down
5 changes: 3 additions & 2 deletions safeeyes/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@

import logging
import random
from distutils.version import LooseVersion
from enum import Enum

from packaging.version import parse

from safeeyes import utility


Expand Down Expand Up @@ -323,7 +324,7 @@ def __init__(self, init=True):
else:
user_config_version = str(
meta_obj.get('config_version', '0.0.0'))
if LooseVersion(user_config_version) != LooseVersion(system_config_version):
if parse(user_config_version) != parse(system_config_version):
# Update the user config
self.__merge_dictionary(
self.__user_config, self.__system_config)
Expand Down
4 changes: 2 additions & 2 deletions safeeyes/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import shutil
import subprocess
import threading
from distutils.version import LooseVersion
from logging.handlers import RotatingFileHandler
from pathlib import Path

Expand All @@ -43,6 +42,7 @@
from gi.repository import Gtk
from gi.repository import GLib
from gi.repository import GdkPixbuf
from packaging.version import parse

gi.require_version('Gdk', '3.0')

Expand Down Expand Up @@ -547,7 +547,7 @@ def __update_plugin_config(plugin, plugin_config, config):
if plugin_config is None:
config['plugins'].remove(plugin)
else:
if LooseVersion(plugin.get('version', '0.0.0')) != LooseVersion(plugin_config['meta']['version']):
if parse(plugin.get('version', '0.0.0')) != parse(plugin_config['meta']['version']):
# Update the configuration
plugin['version'] = plugin_config['meta']['version']
setting_ids = []
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'psutil',
'croniter',
'PyGObject',
'packaging',
'python-xlib'
]

Expand Down
Loading