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

chore(auto-cpufreq-installer): removed dependence on record files for removal #581

Merged
merged 2 commits into from
Oct 14, 2023
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
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Example of `auto-cpufreq --stats` CLI output
* [Snap store](#snap-store)
* [AUR package (Arch/Manjaro Linux)](#aur-package-archmanjaro-linux)
* [NixOS](#nixos)
* [For developers](#installation-development-mode-only)
* [Post Installation](#post-installation)
* [Configuring auto-cpufreq](#configuring-auto-cpufreq)
* [1: power_helper.py script (Snap package install only)](#1-power_helperpy-script-snap-package-install-only)
Expand Down Expand Up @@ -204,6 +205,26 @@ services.auto-cpufreq.enable = true;
```
</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
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`.

Expand Down
9 changes: 4 additions & 5 deletions auto-cpufreq-installer
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ function setup_venv {

source "${venv_dir}/bin/activate"
python3 -m pip install --upgrade pip wheel
python3 -m pip install -r requirements.txt
}

# tool install
function install {
pip3 install .
python -m pip install .
mkdir -p /usr/local/share/auto-cpufreq/
cp -r scripts/ /usr/local/share/auto-cpufreq/
cp -r images/ /usr/local/share/auto-cpufreq/
Expand Down Expand Up @@ -119,7 +118,7 @@ function manual_install {

-----

python3 setup.py install --record files.txt
pip3 install .
mkdir -p /usr/local/share/auto-cpufreq/
cp -r scripts/ /usr/local/share/auto-cpufreq/

Expand Down Expand Up @@ -208,7 +207,7 @@ fi
}

function tool_remove {
files="files.txt"
# files="files.txt"
share_dir="/usr/local/share/auto-cpufreq/"

srv_install="/usr/local/bin/auto-cpufreq-install"
Expand Down Expand Up @@ -249,7 +248,7 @@ function tool_remove {
fi

# 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

# files cleanup
Expand Down
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

44 changes: 0 additions & 44 deletions setup.old.py

This file was deleted.