mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-27 07:34:25 +02:00
Revert "Fixed the --version command when installed from source (#344)"
This reverts commit d2dba2fc313a753036d4598a3b56d67b42b9a00b.
This commit is contained in:
parent
000ccf04fb
commit
3a4beb34c5
@ -12,7 +12,6 @@ import time
|
|||||||
import click
|
import click
|
||||||
import warnings
|
import warnings
|
||||||
import configparser
|
import configparser
|
||||||
import pkg_resources
|
|
||||||
from math import isclose
|
from math import isclose
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from shutil import which
|
from shutil import which
|
||||||
@ -112,7 +111,7 @@ except PermissionError:
|
|||||||
# display running version of auto-cpufreq
|
# display running version of auto-cpufreq
|
||||||
def app_version():
|
def app_version():
|
||||||
|
|
||||||
print("auto-cpufreq version: ", end="")
|
print("auto-cpufreq version:")
|
||||||
|
|
||||||
# snap package
|
# snap package
|
||||||
if os.getenv("PKG_MARKER") == "SNAP":
|
if os.getenv("PKG_MARKER") == "SNAP":
|
||||||
@ -121,13 +120,19 @@ def app_version():
|
|||||||
elif dist_name in ["arch", "manjaro", "garuda"]:
|
elif dist_name in ["arch", "manjaro", "garuda"]:
|
||||||
aur_pkg_check = call("pacman -Qs auto-cpufreq > /dev/null", shell=True)
|
aur_pkg_check = call("pacman -Qs auto-cpufreq > /dev/null", shell=True)
|
||||||
if aur_pkg_check == 1:
|
if aur_pkg_check == 1:
|
||||||
print(pkg_resources.require("auto-cpufreq")[0].version)
|
print(
|
||||||
|
"Git commit:",
|
||||||
|
check_output(["git", "describe", "--always"]).strip().decode(),
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
print(getoutput("pacman -Qi auto-cpufreq | grep Version"))
|
print(getoutput("pacman -Qi auto-cpufreq | grep Version"))
|
||||||
else:
|
else:
|
||||||
# source code (auto-cpufreq-installer)
|
# source code (auto-cpufreq-installer)
|
||||||
try:
|
try:
|
||||||
print(pkg_resources.require("auto-cpufreq")[0].version)
|
print(
|
||||||
|
"Git commit:",
|
||||||
|
check_output(["git", "describe", "--always"]).strip().decode(),
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(repr(e))
|
print(repr(e))
|
||||||
pass
|
pass
|
||||||
|
6
setup.py
6
setup.py
@ -15,11 +15,7 @@ def read(name):
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="auto-cpufreq",
|
name="auto-cpufreq",
|
||||||
version_config={
|
version="1.0",
|
||||||
"template": "{tag}.{sha}",
|
|
||||||
"dev_template": "{tag}.{sha}"
|
|
||||||
},
|
|
||||||
setup_requires=["setuptools-git-versioning"],
|
|
||||||
description="Automatic CPU speed & power optimizer for Linux",
|
description="Automatic CPU speed & power optimizer for Linux",
|
||||||
long_description=readme,
|
long_description=readme,
|
||||||
author="Adnan Hodzic",
|
author="Adnan Hodzic",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user