Skip to content

Commit 4bda43a

Browse files
Updates for Python 3.
* Replace distutils with packaging.version in rpm generator. * Use `python3` instead of `python` in shebang line for shell scripts.
2 parents dac72d0 + a0316c4 commit 4bda43a

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

bloom/generators/rpm/generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
import textwrap
4646

4747
from dateutil import tz
48-
from distutils.version import LooseVersion
48+
from packaging.version import Version
4949
from time import strptime
5050

5151
from bloom.generators import BloomGenerator
@@ -302,7 +302,7 @@ def generate_substitutions_from_package(
302302
# Changelog
303303
if releaser_history:
304304
sorted_releaser_history = sorted(releaser_history,
305-
key=lambda k: LooseVersion(k), reverse=True)
305+
key=lambda k: Version(k), reverse=True)
306306
sorted_releaser_history = sorted(sorted_releaser_history,
307307
key=lambda k: strptime(releaser_history.get(k)[0], '%a %b %d %Y'),
308308
reverse=True)

scripts/bloom-export-upstream

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

scripts/bloom-generate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

scripts/bloom-release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

scripts/bloom-update

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

scripts/git-bloom-branch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

scripts/git-bloom-config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

scripts/git-bloom-generate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

scripts/git-bloom-import-upstream

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

scripts/git-bloom-patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
"""
44
This is a place holder script for use in testing.

0 commit comments

Comments
 (0)