added necessary files for snap + first working snap version
This commit is contained in:
parent
239a8a307c
commit
144c7b5aeb
|
@ -1,8 +1,12 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
#
|
||||||
|
# auto-cpufreq - Automatic CPU speed & power optimizer for Linux
|
||||||
|
#
|
||||||
|
# Blog post: http://foolcontrol.org/?p=3124
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
sys.path.append('../')
|
sys.path.append('../')
|
||||||
from app_source.core import *
|
from source.core import *
|
||||||
|
|
||||||
# cli
|
# cli
|
||||||
@click.command()
|
@click.command()
|
||||||
|
@ -20,7 +24,7 @@ def main(monitor, live, daemon, install, log):
|
||||||
print("\nExample usage:\nauto-cpufreq --monitor")
|
print("\nExample usage:\nauto-cpufreq --monitor")
|
||||||
print("\n-----\n")
|
print("\n-----\n")
|
||||||
|
|
||||||
s.call(["python3", "auto-cpufreq", "--help"])
|
s.call(["python3", "bin/auto-cpufreq", "--help"])
|
||||||
footer(79)
|
footer(79)
|
||||||
else:
|
else:
|
||||||
if daemon:
|
if daemon:
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
psutil
|
||||||
|
click
|
||||||
|
distro
|
||||||
|
power
|
|
@ -0,0 +1,35 @@
|
||||||
|
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()
|
||||||
|
setup(
|
||||||
|
name='auto-cpufreq',
|
||||||
|
version='1.0',
|
||||||
|
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=['source'],
|
||||||
|
install_requires=read('requirements.txt'),
|
||||||
|
include_package_data=True,
|
||||||
|
zip_safe=True,
|
||||||
|
licence='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']
|
||||||
|
)
|
|
@ -0,0 +1,34 @@
|
||||||
|
name: auto-cpufreq
|
||||||
|
base: core18
|
||||||
|
version: '1.0' # just for humans, typically '1.2+git' or '1.3.2'
|
||||||
|
summary: Automatic CPU speed & power optimizer for Linux
|
||||||
|
description: |
|
||||||
|
Automatic CPU speed & power optimizer for Linux based on active
|
||||||
|
monitoring of laptop's battery state, CPU usage and system load.
|
||||||
|
Ultimately allowing you to improve battery life without making
|
||||||
|
any compromises.
|
||||||
|
|
||||||
|
grade: devel # must be 'stable' to release into candidate/stable channels
|
||||||
|
confinement: devmode # use 'strict' once you have the right plugs and slots
|
||||||
|
|
||||||
|
parts:
|
||||||
|
auto-cpufreq:
|
||||||
|
# See 'snapcraft plugins'
|
||||||
|
plugin: python
|
||||||
|
python-version: python3
|
||||||
|
source: .
|
||||||
|
#stage-packages:
|
||||||
|
# - python3-pip
|
||||||
|
# - python3-dev
|
||||||
|
#python-packages:
|
||||||
|
# - psutil
|
||||||
|
# - click
|
||||||
|
# - distro
|
||||||
|
# - power
|
||||||
|
|
||||||
|
apps:
|
||||||
|
auto-cpufreq:
|
||||||
|
command: bin/auto-cpufreq
|
||||||
|
environment:
|
||||||
|
LC_ALL: C.UTF-8
|
||||||
|
LANG: C.UTF-8
|
Loading…
Reference in New Issue