spring cleaning part 2
setup.py
This commit is contained in:
parent
933a4b82db
commit
a023fb708e
9
Makefile
9
Makefile
@ -1,5 +1,8 @@
|
||||
RPMS_DIR=rpm/
|
||||
VERSION := $(shell cat version)
|
||||
|
||||
PYTHON ?= python3
|
||||
|
||||
help:
|
||||
@echo "make rpms -- generate binary rpm packages"
|
||||
@echo "make res -- compile resources"
|
||||
@ -27,6 +30,12 @@ res:
|
||||
translations:
|
||||
lrelease-qt4 qubesmanager.pro
|
||||
|
||||
python:
|
||||
$(PYTHON) ./setup.py build
|
||||
|
||||
python_install:
|
||||
$(PYTHON) ./setup.py install -O1 --skip-build --root $(DESTDIR)
|
||||
|
||||
update_ts: res
|
||||
pylupdate4 qubesmanager.pro
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/python2
|
||||
import qubesmanager.main
|
||||
|
||||
qubesmanager.main.main()
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
import qubesmanager.settings
|
||||
|
||||
qubesmanager.settings.main()
|
||||
|
@ -41,8 +41,8 @@ SOURCES = \
|
||||
qubesmanager/ui_settingsdlg.py
|
||||
|
||||
TRANSLATIONS = \
|
||||
i18n/qubesmanager_en.ts \
|
||||
i18n/qubesmanager_es.ts
|
||||
qubesmanager/i18n/qubesmanager_en.ts \
|
||||
qubesmanager/i18n/qubesmanager_es.ts
|
||||
|
||||
|
||||
CODECFORTR = UTF-8
|
||||
|
@ -25,26 +25,17 @@ The Graphical Qubes VM Manager.
|
||||
|
||||
%build
|
||||
make ui res translations
|
||||
python3 -m compileall qubesmanager
|
||||
python3 -O -m compileall qubesmanager
|
||||
make python
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin/
|
||||
cp qubes-manager $RPM_BUILD_ROOT/usr/bin
|
||||
cp qubes-vm-settings $RPM_BUILD_ROOT/usr/bin
|
||||
make python_install \
|
||||
DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/libexec/qubes-manager/
|
||||
cp qubesmanager/mount_for_backup.sh $RPM_BUILD_ROOT/usr/libexec/qubes-manager/
|
||||
cp qubesmanager/qvm_about.sh $RPM_BUILD_ROOT/usr/libexec/qubes-manager/
|
||||
cp qubesmanager/qvm_net.py $RPM_BUILD_ROOT/usr/libexec/qubes-manager/
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{python3_sitelib}/qubesmanager/
|
||||
cp -r qubesmanager/__pycache__ $RPM_BUILD_ROOT%{python3_sitelib}/qubesmanager/
|
||||
cp qubesmanager/*.py $RPM_BUILD_ROOT%{python3_sitelib}/qubesmanager/
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{python3_sitelib}/qubesmanager/i18n
|
||||
cp i18n/qubesmanager_*.qm $RPM_BUILD_ROOT%{python3_sitelib}/qubesmanager/i18n/
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
|
||||
cp qubes-manager.desktop $RPM_BUILD_ROOT/usr/share/applications
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/xdg/autostart/
|
||||
@ -65,13 +56,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
/usr/bin/qubes-manager
|
||||
/usr/bin/qubes-vm-settings
|
||||
/usr/libexec/qubes-manager/mount_for_backup.sh
|
||||
/usr/libexec/qubes-manager/qvm_about.sh
|
||||
/usr/libexec/qubes-manager/qvm_net.py
|
||||
/usr/libexec/qubes-manager/qvm_net.pyo
|
||||
/usr/libexec/qubes-manager/qvm_net.pyc
|
||||
|
||||
%dir %{python3_sitelib}/qubesmanager
|
||||
%{python3_sitelib}/qubesmanager/__pycache__
|
||||
%{python3_sitelib}/qubesmanager/__init__.py
|
||||
@ -110,6 +99,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{python3_sitelib}/qubesmanager/ui_informationnotes.py
|
||||
%{python3_sitelib}/qubesmanager/ui_networknotes.py
|
||||
%{python3_sitelib}/qubesmanager/i18n/qubesmanager_*.qm
|
||||
%{python3_sitelib}/qubesmanager/i18n/qubesmanager_*.ts
|
||||
|
||||
%dir %{python3_sitelib}/qubesmanager-*.egg-info
|
||||
%{python3_sitelib}/qubesmanager-*.egg-info/*
|
||||
|
||||
/usr/share/applications/qubes-manager.desktop
|
||||
/etc/xdg/autostart/qubes-manager.desktop
|
||||
/etc/dbus-1/system.d/org.qubesos.QubesManager.conf
|
||||
|
23
setup.py
Normal file
23
setup.py
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/python3 -O
|
||||
# vim: fileencoding=utf-8
|
||||
|
||||
import setuptools
|
||||
|
||||
if __name__ == '__main__':
|
||||
setuptools.setup(
|
||||
name='qubesmanager',
|
||||
version=open('version').read().strip(),
|
||||
author='Invisible Things Lab',
|
||||
author_email='qubes-devel@googlegroups.com',
|
||||
description='Qubes OS Manager',
|
||||
license='GPL2+',
|
||||
url='https://www.qubes-os.org/',
|
||||
packages=setuptools.find_packages(),
|
||||
package_data={
|
||||
'qubesmanager': ['i18n/*']
|
||||
},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'qubes-vm-settings = qubesmanager.settings:main',
|
||||
],
|
||||
})
|
Loading…
Reference in New Issue
Block a user