New packaging guidelines:
https://fedoraproject.org/wiki/Packaging:Python#Multiple_Python_Runtimes https://fedorahosted.org/fpc/ticket/327#comment:9 --- scripts/makebumpver | 2 +- scripts/makeupdates | 2 +- scripts/pylintcodediff | 2 +- tests/action_test.py | 2 +- tests/devicefactory_test.py | 2 +- tests/devicelibs_test/btrfs_test.py | 2 +- tests/devicelibs_test/crypto_test.py | 2 +- tests/devicelibs_test/dasd_test.py | 2 +- tests/devicelibs_test/lvm_test.py | 2 +- tests/devicelibs_test/mdraid_interrogate_test.py | 2 +- tests/devicelibs_test/mdraid_test.py | 2 +- tests/devicelibs_test/raid_test.py | 2 +- tests/devicelibs_test/swap_test.py | 2 +- tests/devices_test.py | 2 +- tests/formats_test/fs_test.py | 2 +- tests/formats_test/fslabeling.py | 2 +- tests/formats_test/fstesting.py | 2 +- tests/formats_test/init_test.py | 2 +- tests/formats_test/labeling_test.py | 2 +- tests/formats_test/selinux_test.py | 2 +- tests/partitioning_test.py | 2 +- tests/size_test.py | 2 +- tests/storagetestcase.py | 2 +- tests/udev_test.py | 2 +- tests/util_test.py | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/scripts/makebumpver b/scripts/makebumpver index 52e5be8..6f4110a 100755 --- a/scripts/makebumpver +++ b/scripts/makebumpver @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # makebumpver - Increment version number and add in RPM spec file changelog # block. Ensures rhel*-branch commits reference RHEL bugs. diff --git a/scripts/makeupdates b/scripts/makeupdates index e3e6a0c..8dbbab6 100755 --- a/scripts/makeupdates +++ b/scripts/makeupdates @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # makeupdates - Generate an updates.img containing changes since the last # tag. diff --git a/scripts/pylintcodediff b/scripts/pylintcodediff index 4e30453..7d584c5 100755 --- a/scripts/pylintcodediff +++ b/scripts/pylintcodediff @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # pylintcodediff --- Locate pylint errors corresponding to changed lines # diff --git a/tests/action_test.py b/tests/action_test.py index 6440832..1dfd5b1 100644 --- a/tests/action_test.py +++ b/tests/action_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2
import unittest
diff --git a/tests/devicefactory_test.py b/tests/devicefactory_test.py index 8ea43cb..f35164d 100644 --- a/tests/devicefactory_test.py +++ b/tests/devicefactory_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2
import unittest
diff --git a/tests/devicelibs_test/btrfs_test.py b/tests/devicelibs_test/btrfs_test.py index e3f658e..96d7da8 100755 --- a/tests/devicelibs_test/btrfs_test.py +++ b/tests/devicelibs_test/btrfs_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import os import os.path import subprocess diff --git a/tests/devicelibs_test/crypto_test.py b/tests/devicelibs_test/crypto_test.py index cd7de7a..851cd5f 100755 --- a/tests/devicelibs_test/crypto_test.py +++ b/tests/devicelibs_test/crypto_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest
import tempfile diff --git a/tests/devicelibs_test/dasd_test.py b/tests/devicelibs_test/dasd_test.py index 98f2cd1..86ba852 100644 --- a/tests/devicelibs_test/dasd_test.py +++ b/tests/devicelibs_test/dasd_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest
import blivet.devicelibs.dasd as dasd diff --git a/tests/devicelibs_test/lvm_test.py b/tests/devicelibs_test/lvm_test.py index d88c451..e61a1d2 100755 --- a/tests/devicelibs_test/lvm_test.py +++ b/tests/devicelibs_test/lvm_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest import glob
diff --git a/tests/devicelibs_test/mdraid_interrogate_test.py b/tests/devicelibs_test/mdraid_interrogate_test.py index cee2421..bb72137 100755 --- a/tests/devicelibs_test/mdraid_interrogate_test.py +++ b/tests/devicelibs_test/mdraid_interrogate_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest import time import uuid diff --git a/tests/devicelibs_test/mdraid_test.py b/tests/devicelibs_test/mdraid_test.py index 4cd50a3..ebbb4e1 100755 --- a/tests/devicelibs_test/mdraid_test.py +++ b/tests/devicelibs_test/mdraid_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest import time
diff --git a/tests/devicelibs_test/raid_test.py b/tests/devicelibs_test/raid_test.py index ba1a580..6dac706 100644 --- a/tests/devicelibs_test/raid_test.py +++ b/tests/devicelibs_test/raid_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest
import blivet.devicelibs.raid as raid diff --git a/tests/devicelibs_test/swap_test.py b/tests/devicelibs_test/swap_test.py index 1b8e1aa..1080b87 100755 --- a/tests/devicelibs_test/swap_test.py +++ b/tests/devicelibs_test/swap_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest
import blivet.devicelibs.swap as swap diff --git a/tests/devices_test.py b/tests/devices_test.py index c526c74..9d88661 100644 --- a/tests/devices_test.py +++ b/tests/devices_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # vim:set fileencoding=utf-8
import os diff --git a/tests/formats_test/fs_test.py b/tests/formats_test/fs_test.py index 6bbafeb..ea2c60f 100755 --- a/tests/formats_test/fs_test.py +++ b/tests/formats_test/fs_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest
import blivet.formats.fs as fs diff --git a/tests/formats_test/fslabeling.py b/tests/formats_test/fslabeling.py index 9c6dabb..89cebdb 100644 --- a/tests/formats_test/fslabeling.py +++ b/tests/formats_test/fslabeling.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2
import abc from six import add_metaclass diff --git a/tests/formats_test/fstesting.py b/tests/formats_test/fstesting.py index 491e8b2..a5040fe 100644 --- a/tests/formats_test/fstesting.py +++ b/tests/formats_test/fstesting.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2
import abc from six import add_metaclass diff --git a/tests/formats_test/init_test.py b/tests/formats_test/init_test.py index 6fc11c6..f6a27ce 100644 --- a/tests/formats_test/init_test.py +++ b/tests/formats_test/init_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import copy import unittest
diff --git a/tests/formats_test/labeling_test.py b/tests/formats_test/labeling_test.py index 25206b1..f21e167 100755 --- a/tests/formats_test/labeling_test.py +++ b/tests/formats_test/labeling_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import unittest
from tests import loopbackedtestcase diff --git a/tests/formats_test/selinux_test.py b/tests/formats_test/selinux_test.py index 0c9d4c1..a04119c 100755 --- a/tests/formats_test/selinux_test.py +++ b/tests/formats_test/selinux_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import os import selinux import tempfile diff --git a/tests/partitioning_test.py b/tests/partitioning_test.py index f31154a..8c16cff 100644 --- a/tests/partitioning_test.py +++ b/tests/partitioning_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2
import unittest from mock import Mock diff --git a/tests/size_test.py b/tests/size_test.py index e60c6d1..a7b3916 100644 --- a/tests/size_test.py +++ b/tests/size_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # # tests/storage/size_tests.py # Size test cases for the blivet module diff --git a/tests/storagetestcase.py b/tests/storagetestcase.py index 0b3f26d..06ef738 100644 --- a/tests/storagetestcase.py +++ b/tests/storagetestcase.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2
import unittest from mock import Mock diff --git a/tests/udev_test.py b/tests/udev_test.py index e3e817d..28686e0 100644 --- a/tests/udev_test.py +++ b/tests/udev_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2
import unittest import mock diff --git a/tests/util_test.py b/tests/util_test.py index 13b8d06..5ce6ed2 100644 --- a/tests/util_test.py +++ b/tests/util_test.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2
import unittest from decimal import Decimal
On Mon, Feb 09, 2015 at 08:56:17AM -0800, Brian C. Lane wrote:
New packaging guidelines:
https://fedoraproject.org/wiki/Packaging:Python#Multiple_Python_Runtimes https://fedorahosted.org/fpc/ticket/327#comment:9
scripts/makebumpver | 2 +- scripts/makeupdates | 2 +- scripts/pylintcodediff | 2 +- tests/action_test.py | 2 +- tests/devicefactory_test.py | 2 +- tests/devicelibs_test/btrfs_test.py | 2 +- tests/devicelibs_test/crypto_test.py | 2 +- tests/devicelibs_test/dasd_test.py | 2 +- tests/devicelibs_test/lvm_test.py | 2 +- tests/devicelibs_test/mdraid_interrogate_test.py | 2 +- tests/devicelibs_test/mdraid_test.py | 2 +- tests/devicelibs_test/raid_test.py | 2 +- tests/devicelibs_test/swap_test.py | 2 +- tests/devices_test.py | 2 +- tests/formats_test/fs_test.py | 2 +- tests/formats_test/fslabeling.py | 2 +- tests/formats_test/fstesting.py | 2 +- tests/formats_test/init_test.py | 2 +- tests/formats_test/labeling_test.py | 2 +- tests/formats_test/selinux_test.py | 2 +- tests/partitioning_test.py | 2 +- tests/size_test.py | 2 +- tests/storagetestcase.py | 2 +- tests/udev_test.py | 2 +- tests/util_test.py | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-)
And the check in runpylint.sh
diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh index 18200bf..f410e26 100755 --- a/tests/pylint/runpylint.sh +++ b/tests/pylint/runpylint.sh @@ -92,10 +92,10 @@ fi # run pylint one file / module at a time, otherwise it sometimes gets # confused if [ -z "$FILES" ]; then - # Test any file that either ends in .py or contains #!/usr/bin/python in + # Test any file that either ends in .py or contains #!/usr/bin/python2 in # the first line. Scan everything except old_tests FILES=$(findtestfiles ( -name '*.py' -o \ - -exec /bin/sh -c "head -1 {} | grep -q '#!/usr/bin/python'" ; ) -print | \ + -exec /bin/sh -c "head -1 {} | grep -q '#!/usr/bin/python2'" ; ) -print | \ egrep -v '(|/)doc/conf.py') fi
On 02/09/2015 12:01 PM, Brian C. Lane wrote:
And the check in runpylint.sh
diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh index 18200bf..f410e26 100755 --- a/tests/pylint/runpylint.sh +++ b/tests/pylint/runpylint.sh @@ -92,10 +92,10 @@ fi # run pylint one file / module at a time, otherwise it sometimes gets # confused if [ -z "$FILES" ]; then
- # Test any file that either ends in .py or contains #!/usr/bin/python in
- # Test any file that either ends in .py or contains #!/usr/bin/python2 in # the first line. Scan everything except old_tests FILES=$(findtestfiles ( -name '*.py' -o \
-exec /bin/sh -c "head -1 {} | grep -q '#!/usr/bin/python'" \; \) -print | \
fi-exec /bin/sh -c "head -1 {} | grep -q '#!/usr/bin/python2'" \; \) -print | \ egrep -v '(|/)doc/conf.py')
Can't we just leave that one alone? The test will work for both 2 and 3 (and I assume pylint deals with both 2 and 3 though I'm honestly not super sure), and it's not like we're going have to deal with files that start with "#!/usr/bin/python-haha-just-kidding"
On Wed, Feb 11, 2015 at 10:46:16AM -0500, David Shea wrote:
On 02/09/2015 12:01 PM, Brian C. Lane wrote:
And the check in runpylint.sh
diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh index 18200bf..f410e26 100755 --- a/tests/pylint/runpylint.sh +++ b/tests/pylint/runpylint.sh @@ -92,10 +92,10 @@ fi # run pylint one file / module at a time, otherwise it sometimes gets # confused if [ -z "$FILES" ]; then
- # Test any file that either ends in .py or contains #!/usr/bin/python in
- # Test any file that either ends in .py or contains #!/usr/bin/python2 in # the first line. Scan everything except old_tests FILES=$(findtestfiles ( -name '*.py' -o \
-exec /bin/sh -c "head -1 {} | grep -q '#!/usr/bin/python'" \; \) -print | \
-exec /bin/sh -c "head -1 {} | grep -q '#!/usr/bin/python2'" \; \) -print | \ egrep -v '(|/)doc/conf.py')
fi
Can't we just leave that one alone? The test will work for both 2 and 3 (and I assume pylint deals with both 2 and 3 though I'm honestly not super sure), and it's not like we're going have to deal with files that start with "#!/usr/bin/python-haha-just-kidding"
Actually, pylint doesn't. You need to run python3-pylint on python3. I think we're better off being explicit here.
anaconda-patches@lists.fedorahosted.org