Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Updated to Python3 / Gtk3 for >= Ubuntu 20.04 support #70

Open
wants to merge 114 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
73f19b0
Initial buggy port to python3
cdberkstresser Apr 12, 2020
bf43837
Updating some glade stuff
cdberkstresser Apr 12, 2020
220c4a8
changing out table and renaming labels
cdberkstresser Apr 13, 2020
89ba5fd
Finished changing all tables to grids
cdberkstresser Apr 13, 2020
5c41321
converting hboxes and vboxes
cdberkstresser Apr 13, 2020
0c56e18
finished converting deprecated widgets
cdberkstresser Apr 13, 2020
b0ac403
Fixing resize errors
cdberkstresser Apr 13, 2020
948fc89
Fixing crash on config open and left aligning project link
cdberkstresser Apr 14, 2020
a2c8cb3
Fixing icons for program
cdberkstresser Apr 14, 2020
c0ecf19
Fixing working directory errors for loading icons
cdberkstresser Apr 14, 2020
2ae6aa0
Fixing multiple cores and work units
cdberkstresser Apr 14, 2020
5993cbe
adding try/catch for version
cdberkstresser Apr 14, 2020
2d0e7f1
Wrapping labels of slot dialog
ffissore Apr 19, 2020
447b3fa
Converting slot option `value` to string, in order to avoid `ValueError`
ffissore Apr 19, 2020
5728568
Merge branch 'ffissore-master'
cdberkstresser Apr 19, 2020
6cf51bf
linting round 0
cdberkstresser Apr 19, 2020
8eb8bde
Adding encoding utf8 to run on windows
cdberkstresser Apr 19, 2020
881ea66
Using Default Geometry from Glade
cdberkstresser Apr 19, 2020
2debca3
Bug Fixes 0
cdberkstresser Apr 20, 2020
0a2c336
Fixing theme and rendering combos
cdberkstresser Apr 20, 2020
c17825a
Assuming first entry of comboboxes is the default one, select it if n…
ffissore Apr 19, 2020
b0fd94b
Removing unnecessary double parentheses when calling `print`
ffissore Apr 19, 2020
5170f92
Fixed donor and team button links
ffissore Apr 20, 2020
b2b7ef5
Made get_widget_str_value more generic when getting the selected valu…
ffissore Apr 20, 2020
0997abc
Updated project stats URL
ffissore Apr 20, 2020
f8929b6
Removed a warning about not having specified the gtk version
ffissore Apr 20, 2020
92c5655
Changing is not -1 literal to != -1
cdberkstresser Apr 20, 2020
cf86821
Merge branch 'fixes'
cdberkstresser Apr 20, 2020
1999df6
Fixed "copy log" button
ffissore Apr 20, 2020
87866ff
Wrapping text of the about dialog
ffissore Apr 20, 2020
743ca56
Merge pull request #3 from cdberkstresser/fixes
cdberkstresser Apr 20, 2020
11bd5ab
init
cdberkstresser Apr 20, 2020
43e3c0b
utf8 and disable icon
cdberkstresser Apr 20, 2020
ad4a993
Removing about icon from help -> about
cdberkstresser Apr 20, 2020
eed72c9
Fixing constructor for Connection
cdberkstresser Apr 20, 2020
ff6d4b5
fixing pygobject dependency
cdberkstresser Apr 20, 2020
dd52db1
[debian] Create debian packaging information
braiam Apr 21, 2020
e7b75e1
Sorting queue entries
ffissore Apr 23, 2020
2624156
Show progress percentage on progress bar
ffissore Apr 23, 2020
4eeee02
Restored original font size on toolbar buttons
ffissore Apr 23, 2020
7744a4a
Merge pull request #10 from cdberkstresser/fixes
cdberkstresser Apr 23, 2020
ba26774
Sorting queue entries
ffissore Apr 23, 2020
dc53515
Show progress percentage on progress bar
ffissore Apr 23, 2020
34b26b4
Restored original font size on toolbar buttons
ffissore Apr 23, 2020
904c6e1
Merge branch 'master' of https://github.com/braiam/fah-control into b…
cdberkstresser Apr 26, 2020
fe10d91
changes to compat and changelog to version 7.7.0
cdberkstresser Apr 26, 2020
06d5908
Merge branch 'braiam-master'
cdberkstresser Apr 26, 2020
06c9085
fixing expert settings overflow
cdberkstresser Apr 26, 2020
1a3a9d5
Workflow for packaging debian file
cdberkstresser Apr 26, 2020
0ea2c2e
debian/control: Moved build dependencies and wrap-and-sort
braiam Apr 26, 2020
4d97928
Merge https://github.com/braiam/fah-control into braiam-master
cdberkstresser Apr 27, 2020
61555e0
Merge branch 'braiam-master'
cdberkstresser Apr 27, 2020
02e74f4
Updating workflow to install debian package
cdberkstresser Apr 27, 2020
e8a2cdb
Reverting package workflow install
cdberkstresser Apr 27, 2020
a4a04b3
Update packagedeb.yml
cdberkstresser Apr 27, 2020
82b7e54
reverting workflow.
cdberkstresser Apr 27, 2020
359dec1
Use bytes literals where appropriate
mat8913 Apr 27, 2020
e36024c
Upgrade exception handling to Python3
r-barnes Mar 22, 2020
39bb260
Revert "Removing about icon from help -> about"
ffissore Apr 27, 2020
0306b07
Porting changes from #56
nikolaik Apr 30, 2020
d8c2fff
Get running on macos
nikolaik Mar 28, 2020
f553fa4
Porting changes from #56
guystreeter Apr 30, 2020
aca0d86
Tuning UI margins
ffissore Apr 30, 2020
ea68ff9
Imports cleanup
ffissore Apr 30, 2020
24ccb18
Fixed about dialog icon and orientation
ffissore Apr 30, 2020
652c86e
Fixed app icon loading mechanism
ffissore Apr 30, 2020
a87fcb3
Fixed preferences dialog orientation
ffissore Apr 30, 2020
166173f
Fixing Wash U credit
cdberkstresser May 1, 2020
6f370a3
Merge pull request #14 from cdberkstresser/goodness-from-other-prs
cdberkstresser May 1, 2020
3070d2a
Don't close FahViewer on FahControl close
informatorius May 3, 2020
7c1d175
Merge branch 'issue#1385' of https://github.com/informatorius/fah-con…
cdberkstresser May 3, 2020
d19f5e1
Fixed self-changing slot/queue selection
ffissore May 4, 2020
f9ed6cb
Merge pull request #15 from cdberkstresser/self-selection
cdberkstresser May 6, 2020
7ae5c23
Workaround for weird log pane scrolling behaviour.
ffissore May 6, 2020
3b77c50
Fixed wrong usage os "is" and "!="
ffissore Aug 6, 2020
f5f56d4
Fixed wrong usage of mutable default arguments
ffissore Aug 6, 2020
7c72874
Added requirements.txt
ffissore Aug 6, 2020
b818486
Look for icon in local path and under /usr/share/pixmaps
ffissore Aug 6, 2020
e7d570b
Look for icon in local path and in other system folders as specified …
ffissore Aug 6, 2020
1edf028
Set client password from FAHControl, Fix for Linux dependencies
jcoffland Aug 14, 2020
601dfc2
Removed gpu-index, opencl-index and cuda-index config.
jcoffland Aug 14, 2020
b9bfe0a
Merge remote-tracking branch 'upstream/master' into master
ffissore Aug 25, 2020
b3737d2
Merge https://github.com/FoldingAtHome/fah-control into master
Artoria2e5 Dec 20, 2020
1fa8ceb
PyON: properly attribute code source
Artoria2e5 Dec 20, 2020
3ed57f9
Replace gtk module with gi for win32
Artoria2e5 Dec 20, 2020
8ae272a
Tell cx_Freeze to bring the dlls
Artoria2e5 Dec 20, 2020
5ec3c19
setup.py: include all of gi
Artoria2e5 Dec 20, 2020
0a0c495
It works! Eureka!
Artoria2e5 Dec 20, 2020
2748d5b
Update README and SConstruct to py3
Artoria2e5 Dec 21, 2020
83fc5a7
Merge pull request #19 from Artoria2e5/master
cdberkstresser Dec 23, 2020
403fc95
Fix PyON JSON parsing and exception string formatting.
kblaschke Dec 27, 2020
02fc18c
Merge pull request #20 from kblaschke/master
cdberkstresser Dec 28, 2020
460ef67
Update dependencies in README, add python-six
gardenappl Jan 8, 2021
f8cee6d
Merge pull request #21 from gardenappl/patch-1
cdberkstresser Jan 12, 2021
1876c32
Change module to import 'MutableMapping' variable
mlmatlock Dec 13, 2021
2b57930
Merge pull request #23 from mlmatlock/python_3.10_fix
cdberkstresser Jan 27, 2022
22d3ab2
debian: use debhelper 11; update depends
okaestne Feb 4, 2023
12e21f5
debian: ignore temp files and windows dlls
okaestne Feb 4, 2023
6f226b4
update .gitignore
okaestne Feb 4, 2023
523004f
debian/rules: add newline at end of file
okaestne Feb 4, 2023
8cded61
debian: install .desktop file (fixes #17)
okaestne Feb 4, 2023
17c0252
Merge pull request #27 from okaestne/fix-dpkg
cdberkstresser May 17, 2023
f2a5252
compatibility updates
cdberkstresser May 17, 2023
00ab483
resolving setup.py conflicts
cdberkstresser May 17, 2023
c4feb1d
Adding restore of size / position of main window
cdberkstresser May 17, 2023
bd0157c
removing window size options from prefs since auto saves
cdberkstresser May 17, 2023
74ab300
Update packagedeb.yml to ubuntu 22.04
cdberkstresser May 20, 2023
63133d1
Update packagedeb.yml to require dh-python
cdberkstresser May 20, 2023
678de34
Update packagedeb.yml python v4
cdberkstresser May 20, 2023
817ec23
Update packagedeb.yml python 3.11.3
cdberkstresser May 20, 2023
523c55a
Update packagedeb.yml again
cdberkstresser May 20, 2023
d80d863
Update packagedeb.yml who cares
cdberkstresser May 20, 2023
7f57ead
Update packagedeb.yml libgirepository1.0-dev
cdberkstresser May 20, 2023
3978c35
Update packagedeb.yml pygobject
cdberkstresser May 20, 2023
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
38 changes: 38 additions & 0 deletions .github/workflows/packagedeb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.11.3]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install PyGObject
sudo apt install python3-all debhelper python3-setuptools devscripts
pip install stdeb setuptools wheel twine
- name: Build with stdeb
run: |
python3 setup.py install




10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
/version.txt
/FAHControl*.tar.gz
/fahcontrol*.pkg
/gui
/.pybuild

# debian packaging files
/debian/.debhelper/
/debian/debhelper-build-stamp
/debian/fahcontrol/
/debian/*.debhelper
/debian/*.substvars
/debian/files

# Temporary files
*~
6 changes: 3 additions & 3 deletions FAHControl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
'''
Folding@Home Client Control (FAHControl)
Copyright (C) 2010-2020 foldingathome.org
Expand Down Expand Up @@ -36,7 +36,7 @@ def set_proc_name(name):
libc.prctl(15, byref(buff), 0, 0, 0)


if sys.platform.startswith('linux'): set_proc_name('FAHControl')
if sys.platform.startswith('linux'): set_proc_name(b'FAHControl')

# If present, remove the Launch Services -psn_xxx_xxx argument
if len(sys.argv) > 1 and sys.argv[1][:4] == '-psn':
Expand All @@ -53,7 +53,7 @@ if options.exit:
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(single_app_addr)
sock.send('EXIT')
sock.send(b'EXIT')
if sock.recv(1024).strip() == 'OK': print ('Ok')
except Exception as e:
pass
Expand Down
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,19 @@ See: https://foldingathome.org/

## Debian / Ubuntu

sudo apt-get install -y python-stdeb python-gtk2 python-all debhelper \
dh-python
sudo apt-get install -y python3-stdeb python3-gi python3-all python3-six debhelper \
dh-python gir1.2-gtk-3.0

## RedHat / CentOS

sudo yum install -y pygtk2
sudo yum install -y python3-gobject python3-six

## Arch Linux / Manjaro

sudo pacman -S python python-setuptools python-gobject python-six

Alternatively, use the unofficial [AUR package](https://aur.archlinux.org/packages/fahcontrol/) (or [this one for the GTK3/Python3 fork](https://aur.archlinux.org/packages/fahcontrol-gtk3-git)

## Windows (MinGW in MSYS2)

pacman -S mingw-w64-x86_64-{gtk3,python-{cx_Freeze,gobject,six}}
8 changes: 4 additions & 4 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import os
env = Environment(ENV = os.environ)
try:
env.Tool('config', toolpath = [os.environ.get('CBANG_HOME')])
except Exception, e:
raise Exception, 'CBANG_HOME not set?\n' + str(e)
except Exception as e:
raise Exception('CBANG_HOME not set?\n' + str(e))

env.CBLoadTools('packager run_distutils osx fah-client-version')
env.CBAddVariables(
Expand All @@ -14,7 +14,7 @@ conf = env.CBConfigure()
# Version
try:
version = env.FAHClientVersion()
except Exception, e:
except Exception as e:
print(e)
version = '0.0.0'
env.Replace(PACKAGE_VERSION = version)
Expand Down Expand Up @@ -51,7 +51,7 @@ if env.GetPackageType() != 'rpm':

if int(env.get('cross_mingw', 0)):
# Use the cross compiled Python
gui = env.Command(target_dir, 'setup.py', 'python2.exe setup.py build')
gui = env.Command(target_dir, 'setup.py', 'python3.exe setup.py build')
else:
gui = env.RunDistUtils(Dir(target_dir), 'setup.py')

Expand Down
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
fahcontrol (7.7.0) unstable; urgency=medium

* Initial release. (Closes: #XXXXXX)

-- Braiam Peguero <[email protected]> Tue, 21 Apr 2020 07:25:35 -0400
32 changes: 32 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Source: fahcontrol
Section: science
Priority: optional
Maintainer: Braiam Peguero <[email protected]>
Build-Depends: debhelper-compat (= 11),
dh-python,
gir1.2-gtk-3.0,
python3,
python3-gi,
python3-six,
python3-setuptools
Standards-Version: 4.5.0
Homepage: https://foldingathome.org/
Vcs-Git: https://github.com/FoldingAtHome/fah-control.git
Vcs-Browser: https://github.com/FoldingAtHome/fah-control
Rules-Requires-Root: no
X-Python-Version: >= 3.6

Package: fahcontrol
Architecture: all
Depends: ${misc:Depends}, ${python3:Depends}
Suggests: fahclient, fahviewer
Description: Folding@home Client Control
Folding@home is a distributed computing project using volunteered
computer resources.
.
This package contains FAHControl, a graphical monitor and control
utility for the Folding@home client. It gives an overview of running
projects on the local and optional (remote) machines. Starting,
stopping and pausing of the running projects is also possible, as is
viewing the logs. It provides an Advanced view with
additional information and settings for enthusiasts and gurus.
1 change: 1 addition & 0 deletions debian/fahcontrol.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FAHControl.desktop usr/share/applications
7 changes: 7 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /usr/bin/make -f

#export DH_VERBOSE = 1
export PYBUILD_NAME = fahcontrol

%:
dh $@ --with python3 --buildsystem=pybuild
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
4 changes: 4 additions & 0 deletions debian/source/local-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tar-ignore = ".git"
tar-ignore = "__pycache__"
tar-ignore = "theme-engines"
tar-ignore = "FAHControl.egg-info"
8 changes: 4 additions & 4 deletions ez_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

This file can also be run as a script to install or upgrade setuptools.
"""
from __future__ import print_function


import sys
DEFAULT_VERSION = "0.6c11"
Expand Down Expand Up @@ -133,7 +133,7 @@ def download_setuptools(
with a '/'). `to_dir` is the directory where the egg will be downloaded.
`delay` is the number of seconds to pause before an actual download attempt.
"""
import urllib2, shutil
import urllib.request, urllib.error, urllib.parse, shutil
egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
url = download_base + egg_name
saveto = os.path.join(to_dir, egg_name)
Expand All @@ -159,7 +159,7 @@ def download_setuptools(
version, download_base, delay, url
); from time import sleep; sleep(delay)
log.warn("Downloading %s", url)
src = urllib2.urlopen(url)
src = urllib.request.urlopen(url)
# Read/write all in one block, so we don't create a corrupt file
# if the download is interrupted.
data = _validate_md5(egg_name, src.read())
Expand Down Expand Up @@ -256,7 +256,7 @@ def update_md5(filenames):
md5_data[base] = md5(f.read()).hexdigest()
f.close()

data = [" %r: %r,\n" % it for it in md5_data.items()]
data = [" %r: %r,\n" % it for it in list(md5_data.items())]
data.sort()
repl = "".join(data)

Expand Down
Loading