mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-24 22:24:51 +02:00
auto-cpufreq-installer: removed dependence on record files for removal (#581)
* docs: updated instructions for pyproject config * chore: post pyproject integration cleanup Changes include Removed setup.py and requirements.txt file and removed dependence in record files.txt generated by setup.py
This commit is contained in:
parent
964f2f5efe
commit
5d4ba17d69
21
README.md
21
README.md
@ -36,6 +36,7 @@ Example of `auto-cpufreq --stats` CLI output
|
|||||||
* [Snap store](#snap-store)
|
* [Snap store](#snap-store)
|
||||||
* [AUR package (Arch/Manjaro Linux)](#aur-package-archmanjaro-linux)
|
* [AUR package (Arch/Manjaro Linux)](#aur-package-archmanjaro-linux)
|
||||||
* [NixOS](#nixos)
|
* [NixOS](#nixos)
|
||||||
|
* [For developers](#installation-development-mode-only)
|
||||||
* [Post Installation](#post-installation)
|
* [Post Installation](#post-installation)
|
||||||
* [Configuring auto-cpufreq](#configuring-auto-cpufreq)
|
* [Configuring auto-cpufreq](#configuring-auto-cpufreq)
|
||||||
* [1: power_helper.py script (Snap package install only)](#1-power_helperpy-script-snap-package-install-only)
|
* [1: power_helper.py script (Snap package install only)](#1-power_helperpy-script-snap-package-install-only)
|
||||||
@ -204,6 +205,26 @@ services.auto-cpufreq.enable = true;
|
|||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### Installation (Development mode only)
|
||||||
|
|
||||||
|
- If you have the poetry installed on you
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/AdnanHodzic/auto-cpufreq.git
|
||||||
|
cd auto-cpufreq
|
||||||
|
poetry install
|
||||||
|
poetry run auto-cpufreq --help
|
||||||
|
```
|
||||||
|
|
||||||
|
- Alternatively, we can use editable pip install for development purposes
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/AdnanHodzic/auto-cpufreq.git
|
||||||
|
cd auto-cpufreq
|
||||||
|
# Setup your Virtual Environment (Instructions left here for brevity)
|
||||||
|
pip3 install -e .
|
||||||
|
auto-cpufreq
|
||||||
|
```
|
||||||
|
- Regularly run `poetry update` if you get any inconsistent lock file issues.
|
||||||
|
|
||||||
## Post Installation
|
## Post Installation
|
||||||
After installation `auto-cpufreq` will be available as a binary and you can refer to [auto-cpufreq modes and options](https://github.com/AdnanHodzic/auto-cpufreq#auto-cpufreq-modes-and-options) for more information on how to run and configure `auto-cpufreq`.
|
After installation `auto-cpufreq` will be available as a binary and you can refer to [auto-cpufreq modes and options](https://github.com/AdnanHodzic/auto-cpufreq#auto-cpufreq-modes-and-options) for more information on how to run and configure `auto-cpufreq`.
|
||||||
|
|
||||||
|
@ -55,12 +55,11 @@ function setup_venv {
|
|||||||
|
|
||||||
source "${venv_dir}/bin/activate"
|
source "${venv_dir}/bin/activate"
|
||||||
python3 -m pip install --upgrade pip wheel
|
python3 -m pip install --upgrade pip wheel
|
||||||
python3 -m pip install -r requirements.txt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# tool install
|
# tool install
|
||||||
function install {
|
function install {
|
||||||
pip3 install .
|
python -m pip install .
|
||||||
mkdir -p /usr/local/share/auto-cpufreq/
|
mkdir -p /usr/local/share/auto-cpufreq/
|
||||||
cp -r scripts/ /usr/local/share/auto-cpufreq/
|
cp -r scripts/ /usr/local/share/auto-cpufreq/
|
||||||
cp -r images/ /usr/local/share/auto-cpufreq/
|
cp -r images/ /usr/local/share/auto-cpufreq/
|
||||||
@ -119,7 +118,7 @@ function manual_install {
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
python3 setup.py install --record files.txt
|
pip3 install .
|
||||||
mkdir -p /usr/local/share/auto-cpufreq/
|
mkdir -p /usr/local/share/auto-cpufreq/
|
||||||
cp -r scripts/ /usr/local/share/auto-cpufreq/
|
cp -r scripts/ /usr/local/share/auto-cpufreq/
|
||||||
|
|
||||||
@ -208,7 +207,7 @@ fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tool_remove {
|
function tool_remove {
|
||||||
files="files.txt"
|
# files="files.txt"
|
||||||
share_dir="/usr/local/share/auto-cpufreq/"
|
share_dir="/usr/local/share/auto-cpufreq/"
|
||||||
|
|
||||||
srv_install="/usr/local/bin/auto-cpufreq-install"
|
srv_install="/usr/local/bin/auto-cpufreq-install"
|
||||||
@ -249,7 +248,7 @@ function tool_remove {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# remove auto-cpufreq and all its supporting files
|
# remove auto-cpufreq and all its supporting files
|
||||||
[ -f $files ] && cat $files | xargs sudo rm -rf && rm -f $files
|
# [ -f $files ] && cat $files | xargs sudo rm -rf && rm -f $files
|
||||||
[ -d $share_dir ] && rm -rf $share_dir
|
[ -d $share_dir ] && rm -rf $share_dir
|
||||||
|
|
||||||
# files cleanup
|
# files cleanup
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
setuptools
|
|
||||||
psutil
|
|
||||||
click
|
|
||||||
distro
|
|
||||||
requests
|
|
||||||
PyGObject
|
|
44
setup.old.py
44
setup.old.py
@ -1,44 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
with open("README.md") as readme_file:
|
|
||||||
readme = readme_file.read()
|
|
||||||
|
|
||||||
this = os.path.dirname(os.path.realpath(__file__))
|
|
||||||
|
|
||||||
|
|
||||||
def read(name):
|
|
||||||
with open(os.path.join(this, name)) as f:
|
|
||||||
return f.read()
|
|
||||||
|
|
||||||
# Used for the tar.gz/snap releases
|
|
||||||
VERSION = "2.0.0"
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name="auto-cpufreq",
|
|
||||||
setuptools_git_versioning={
|
|
||||||
"starting_version": VERSION,
|
|
||||||
"template": "{tag}+{sha}",
|
|
||||||
"dev_template": "{tag}+{sha}",
|
|
||||||
"dirty_template": "{tag}+{sha}.post{ccount}.dirty"
|
|
||||||
},
|
|
||||||
setup_requires=["setuptools-git-versioning"],
|
|
||||||
description="Automatic CPU speed & power optimizer for Linux",
|
|
||||||
long_description=readme,
|
|
||||||
author="Adnan Hodzic",
|
|
||||||
author_email="adnan@hodzic.org",
|
|
||||||
url="https://github.com/AdnanHodzic/auto-cpufreq",
|
|
||||||
packages=["auto_cpufreq", "auto_cpufreq/gui"],
|
|
||||||
install_requires=read("requirements.txt"),
|
|
||||||
include_package_data=True,
|
|
||||||
zip_safe=True,
|
|
||||||
license="GPLv3",
|
|
||||||
keywords="linux cpu speed power frequency turbo optimzier auto cpufreq",
|
|
||||||
classifiers=[
|
|
||||||
"Development Status :: 5 - Production/Stable",
|
|
||||||
"Intended Audience :: Developers",
|
|
||||||
"Operating System :: POSIX :: Linux" "Environment :: Console" "Natural Language :: English",
|
|
||||||
],
|
|
||||||
scripts=["bin/auto-cpufreq", "bin/auto-cpufreq-gtk"],
|
|
||||||
)
|
|
Loading…
x
Reference in New Issue
Block a user