Skip to content

Commit 1dfb08a

Browse files
committed
Allow to install on Python 3.4
1 parent dba9d40 commit 1dfb08a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/source/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Note: For Mac OS X you will need to have cmake ``brew install cmake`` and pkg-co
2121
Released Version
2222
-----------------
2323

24-
pwntools is available as a ``pip`` package for both Python2 and Python3.
24+
pwntools is available as a ``pip`` package for Python3. Version v5.0.0 requires Python3.10 or later.
2525

2626
Python3
2727
^^^^^^^

pwnlib/libcdb.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import six
1010
import tempfile
1111
import struct
12+
import sys
1213

1314
from pwnlib.context import context
1415
from pwnlib.elf import ELF
@@ -498,7 +499,7 @@ def _extract_tarfile(cache_dir, data_filename, tarball):
498499

499500
def _extract_debfile(cache_dir, package_filename, package):
500501
# Extract data.tar in the .deb archive.
501-
if six.PY2:
502+
if sys.version_info < (3, 6):
502503
if not which('ar'):
503504
log.error('Missing command line tool "ar" to extract .deb archive. Please install "ar" first.')
504505

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ classifiers = [
3131
]
3232
keywords = ["pwntools", "exploit", "ctf", "capture", "the", "flag", "binary", "wargame", "overflow", "stack", "heap", "defcon"]
3333

34-
requires-python = ">=3.10"
34+
requires-python = ">=3.4"
3535
dependencies = [
3636
"paramiko>=1.15.2",
3737
"mako>=1.0.0",
@@ -52,7 +52,7 @@ dependencies = [
5252
"six>=1.12.0",
5353
"rpyc",
5454
"colored_traceback",
55-
"unix-ar",
55+
"unix-ar; python_version>='3.6'",
5656
"zstandard",
5757
]
5858

0 commit comments

Comments
 (0)