Remove for real setup.py.
What it was doing has been deprecated in modern setuptools and isn't encouraged these days, now is there a specific Python standard for it.
This commit is contained in:
parent
78797390fe
commit
8ae9c70ebc
78
setup.py
78
setup.py
@ -1,78 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import os, glob, sys
|
|
||||||
import os.path
|
|
||||||
from shutil import copyfile
|
|
||||||
from setuptools import find_namespace_packages
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
# handle flags for package manager like aurman and pacaur.
|
|
||||||
# Allow both environment variable and command line flag
|
|
||||||
forceSettingsFlag = (
|
|
||||||
"--force-settings" in sys.argv or
|
|
||||||
os.environ.get('FENRIR_FORCE_SETTINGS') == '1'
|
|
||||||
)
|
|
||||||
if "--force-settings" in sys.argv:
|
|
||||||
sys.argv.remove("--force-settings")
|
|
||||||
|
|
||||||
dataFiles = []
|
|
||||||
|
|
||||||
# Handle locale files
|
|
||||||
localeFiles = glob.glob('locale/*/LC_MESSAGES/*.mo')
|
|
||||||
for localeFile in localeFiles:
|
|
||||||
lang = localeFile.split(os.sep)[1]
|
|
||||||
destDir = f'/usr/share/locale/{lang}/LC_MESSAGES'
|
|
||||||
dataFiles.append((destDir, [localeFile]))
|
|
||||||
|
|
||||||
# Handle other configuration files
|
|
||||||
directories = glob.glob('config/*')
|
|
||||||
for directory in directories:
|
|
||||||
files = glob.glob(directory+'/*')
|
|
||||||
destDir = ''
|
|
||||||
if 'config/punctuation' in directory :
|
|
||||||
destDir = '/etc/fenrirscreenreader/punctuation'
|
|
||||||
elif 'config/keyboard' in directory:
|
|
||||||
destDir = '/etc/fenrirscreenreader/keyboard'
|
|
||||||
elif 'config/settings' in directory:
|
|
||||||
destDir = '/etc/fenrirscreenreader/settings'
|
|
||||||
if not forceSettingsFlag:
|
|
||||||
try:
|
|
||||||
files = [f for f in files if not f.endswith('settings.conf')]
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
elif 'config/scripts' in directory:
|
|
||||||
destDir = '/usr/share/fenrirscreenreader/scripts'
|
|
||||||
if destDir != '':
|
|
||||||
dataFiles.append((destDir, files))
|
|
||||||
|
|
||||||
files = glob.glob('config/sound/default/*')
|
|
||||||
destDir = '/usr/share/sounds/fenrirscreenreader/default'
|
|
||||||
dataFiles.append((destDir, files))
|
|
||||||
files = glob.glob('config/sound//template/*')
|
|
||||||
destDir = '/usr/share/sounds/fenrirscreenreader/template'
|
|
||||||
dataFiles.append((destDir, files))
|
|
||||||
files = glob.glob('tools/*')
|
|
||||||
dataFiles.append(('/usr/share/fenrirscreenreader/tools', files))
|
|
||||||
dataFiles.append(('/usr/share/man/man1', ['docs/fenrir.1']))
|
|
||||||
|
|
||||||
def read(fname):
|
|
||||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
|
||||||
|
|
||||||
setup(
|
|
||||||
# Include additional files into the package
|
|
||||||
include_package_data=True,
|
|
||||||
zip_safe=False,
|
|
||||||
|
|
||||||
data_files=dataFiles,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
print('')
|
|
||||||
print('To have Fenrir start at boot:')
|
|
||||||
print('sudo systemctl enable fenrir')
|
|
||||||
print('Pulseaudio users may want to run:')
|
|
||||||
print('/usr/share/fenrirscreenreader/tools/configure_pulse.sh')
|
|
||||||
print('once as their user account and once as root to configure Pulseaudio.')
|
|
||||||
print('Please install the following packages manually:')
|
|
||||||
print('- Speech-dispatcher: for the default speech driver')
|
|
||||||
print('- Espeak: as basic TTS engine')
|
|
||||||
print('- sox: is a player for the generic sound driver')
|
|
@ -3,5 +3,5 @@
|
|||||||
|
|
||||||
# Fenrir TTY screen reader
|
# Fenrir TTY screen reader
|
||||||
# By Chrys, Storm Dragon, and contributers.
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
version = "2025.01.28"
|
version = "2025.01.30"
|
||||||
codeName = "testing"
|
codeName = "testing"
|
||||||
|
Loading…
Reference in New Issue
Block a user