Skip to content

Commit

Permalink
Switch to Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Dec 19, 2019
1 parent 59d29eb commit 0987924
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ install-vm:

.PHONY: install-dom0
install-dom0:
python2 setup.py install -O1 --root $(DESTDIR)
python3 setup.py install -O1 --root $(DESTDIR)
make install -C doc

.PHONY: get-sources
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Maintainer: Jason Mehring <nrgaway@gmail.com>
Build-Depends:
debhelper (>= 9~),
quilt,
python-yaml,
python3-yaml,
tree
Standards-Version: 3.9.5
Homepage: http://www.qubes-os.org
Expand Down
2 changes: 1 addition & 1 deletion qubesctl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/python3
'''
Directly call a salt command in the modules, does not require a running salt
minion to run.
Expand Down
3 changes: 1 addition & 2 deletions qubessalt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python2
# coding=utf-8
#
# The Qubes OS Project, http://www.qubes-os.org
Expand Down Expand Up @@ -90,7 +89,7 @@ def prepare_salt_config_for_vm(self):
'--id={}'.format(self.vm.name), '--output=yaml',
'pillar.items'], stdout=subprocess.PIPE)
(pillar_items_output, _) = p.communicate()
pillar_data = yaml.safe_load(pillar_items_output)
pillar_data = yaml.safe_load(pillar_items_output.decode())
pillar_data = pillar_data['local']
# remove source pillar files
# TODO: remove also pillar modules
Expand Down
2 changes: 1 addition & 1 deletion rpm_spec/qubes-mgmt-salt-dom0.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Requires: qubes-mgmt-salt
Requires: qubes-mgmt-salt-dom0-qvm
Requires: qubes-mgmt-salt-dom0-update
Requires: qubes-mgmt-salt-dom0-virtual-machines
BuildRequires: PyYAML
BuildRequires: python3-pyyaml
BuildRequires: tree
Conflicts: qubes-mgmt-salt-vm

Expand Down
2 changes: 1 addition & 1 deletion rpm_spec/qubes-mgmt-salt-vm.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ URL: http://www.qubes-os.org/
Group: System administration tools
BuildArch: noarch
Requires: qubes-mgmt-salt
BuildRequires: PyYAML
BuildRequires: python3-pyyaml
BuildRequires: tree
Requires(post): /usr/bin/qubesctl
Conflicts: qubes-mgmt-salt-dom0
Expand Down
17 changes: 9 additions & 8 deletions rpm_spec/qubes-mgmt-salt.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ BuildArch: noarch
Requires: salt >= 2015.5
Requires: salt-minion
Requires: qubes-mgmt-salt-base
BuildRequires: PyYAML
BuildRequires: python3-pyyaml
BuildRequires: tree
BuildRequires: pandoc
BuildRequires: python-setuptools
BuildRequires: python2-devel
BuildRequires: python3-setuptools
BuildRequires: python3-devel

Source0: %{name}-%{version}.tar.gz

Expand Down Expand Up @@ -45,7 +45,7 @@ Group: System administration tools
Requires: salt
Requires: salt-minion
Conflicts: qubes-mgmt-salt-base-top < 4.1.0
BuildRequires: PyYAML
BuildRequires: python3-pyyaml
BuildArch: noarch

%description config
Expand Down Expand Up @@ -108,10 +108,11 @@ rm -rf %{buildroot}/srv/formulas/.gitignore

%files admin-tools
/usr/bin/qubesctl
%dir %{python2_sitelib}/qubessalt-*egg-info
%{python2_sitelib}/qubessalt-*egg-info/*
%dir %{python2_sitelib}/qubessalt
%{python2_sitelib}/qubessalt/__init__.py*
%dir %{python3_sitelib}/qubessalt-*egg-info
%{python3_sitelib}/qubessalt-*egg-info/*
%dir %{python3_sitelib}/qubessalt
%{python3_sitelib}/qubessalt/__init__.py*
%{python3_sitelib}/qubessalt/__pycache__/*


%files shared-formulas
Expand Down
2 changes: 1 addition & 1 deletion yaml-dumper
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2 -O
#!/usr/bin/python3 -O
# -*- coding: utf-8 -*-`
#
# vim: set ts=4 sw=4 sts=4 et :
Expand Down

0 comments on commit 0987924

Please sign in to comment.