Skip to content

Commit e9d9bd9

Browse files
authored
Fix installation on Python 3.5 and lower on stable (#2533)
* Fix installation on Python 3.5 and lower on stable The unix-ar package requires Python 3.6. Only install it on Python 3.6 then and use the Python 2 fallback for Python <= 3.5 too. * Update CHANGELOG
1 parent 9472ec1 commit e9d9bd9

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ The table below shows which release corresponds to each branch, and what date th
112112
[2476]: https://github.com/Gallopsled/pwntools/pull/2476
113113
[2364]: https://github.com/Gallopsled/pwntools/pull/2364
114114

115+
## 4.14.1
116+
117+
- [#2533][2533] Fix installation on Python 3.5 and lower
118+
119+
[2533]: https://github.com/Gallopsled/pwntools/pull/2533
120+
115121
## 4.14.0 (`stable`)
116122

117123
- [#2356][2356] Add local libc database provider for libcdb

pwnlib/libcdb.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import time
99
import six
1010
import tempfile
11+
import sys
1112

1213
from pwnlib.context import context
1314
from pwnlib.elf import ELF
@@ -419,7 +420,7 @@ def _extract_tarfile(cache_dir, data_filename, tarball):
419420

420421
def _extract_debfile(cache_dir, package_filename, package):
421422
# Extract data.tar in the .deb archive.
422-
if six.PY2:
423+
if sys.version_info < (3, 6):
423424
if not which('ar'):
424425
log.error('Missing command line tool "ar" to extract .deb archive. Please install "ar" first.')
425426

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dependencies = [
5656
"colored_traceback<0.4; python_version < '3'",
5757
"colored_traceback; python_version >= '3'",
5858
"pathlib2; python_version < '3.4'",
59-
"unix-ar; python_version >= '3'",
59+
"unix-ar; python_version >= '3.6'",
6060
"zstandard",
6161
]
6262

0 commit comments

Comments
 (0)