Skip to content

Commit

Permalink
Install actual scripts stubs
Browse files Browse the repository at this point in the history
Since core-admin no longer install them, this package finally can
provide them without conflicts.
  • Loading branch information
marmarek committed May 11, 2017
1 parent 6c47765 commit cf0cf57
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rpm_spec/qubes-core-admin-client.spec
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ make -C doc DESTDIR=$RPM_BUILD_ROOT \
%defattr(-,root,root,-)
%doc LICENSE
%config /etc/xdg/autostart/qvm-start-gui.desktop
%{_bindir}/qubes-*
%{_bindir}/qvm-*
%{_mandir}/man1/qvm-*.1*
%{_mandir}/man1/qubes*.1*

Expand Down
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# vim: fileencoding=utf-8

import os
import setuptools
import sys

Expand All @@ -9,6 +10,18 @@
if sys.version_info[0:2] < (3, 5):
exclude += ['qubesadmin.events']

# don't import: import * is unreliable and there is no need, since this is
# compile time and we have source files
def get_console_scripts():
if sys.version_info[0:2] >= (3, 4):
for filename in os.listdir('./qubesadmin/tools'):
basename, ext = os.path.splitext(os.path.basename(filename))
if basename in ['__init__', 'dochelpers'] or ext != '.py':
continue
yield '{} = qubesadmin.tools.{}:main'.format(
basename.replace('_', '-'), basename)


if __name__ == '__main__':
setuptools.setup(
name='qubesadmin',
Expand All @@ -20,6 +33,7 @@
url='https://www.qubes-os.org/',
packages=setuptools.find_packages(exclude=exclude),
entry_points={
'console_scripts': list(get_console_scripts()),
'qubesadmin.vm': [
'AppVM = qubesadmin.vm:AppVM',
'TemplateVM = qubesadmin.vm:TemplateVM',
Expand Down

0 comments on commit cf0cf57

Please sign in to comment.