Skip to content

Commit

Permalink
auto-cpufreq-installer: removed dependence on record files for removal (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
rootCircle committed Oct 14, 2023
1 parent 964f2f5 commit 5d4ba17
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 55 deletions.
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.

0 comments on commit 5d4ba17

Please sign in to comment.