You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+25-12Lines changed: 25 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,13 @@ xasm
5
5
6
6
*NOTE: this is in beta*
7
7
8
-
A Cross-Python bytecode Assembler
8
+
A cross-version Python bytecode assembler
9
9
10
10
11
11
Introduction
12
12
------------
13
13
14
-
The Python `xasm` module has routines for assembly, and has a command to
14
+
The Python ``xasm`` module has routines for assembly, and has a command to
15
15
assemble bytecode for several different versions of Python.
16
16
17
17
Here are some potential uses:
@@ -23,10 +23,10 @@ Here are some potential uses:
23
23
* Foil decompilers like uncompyle6_ so that they can’t disassemble bytecode (at least for now)
24
24
25
25
This support the same kinds of bytecode that xdis_ supports. This is
26
-
pretty much all released bytecode, although we tend to lag behind the
26
+
pretty much all released bytecode before Python 3.11. We tend to lag behind the
27
27
latest Python releases.
28
28
29
-
The code requires Python 2.7 or later.
29
+
The code requires Python 3.6 or later.
30
30
31
31
Assembly files
32
32
--------------
@@ -47,17 +47,30 @@ See how-to-use_ for more detail. Some general some principles:
47
47
Installation
48
48
------------
49
49
50
-
The standard Python routine:
50
+
*If you are using Python 3.11 or later*, you can install from PyPI using the name ``xasm``::
51
51
52
-
::
53
-
54
-
pip install -e .
55
-
pip install -r requirements-dev.txt
52
+
pip install xasm
56
53
57
-
A GNU makefile is also provided so :code:`make install` (possibly as root or
54
+
A GNU makefile is also provided so ``make install`` (possibly as root or
58
55
sudo) will do the steps above.
59
56
60
57
58
+
*If you are using Python before 3.11*, do not install using PyPI, but instead install using a file in the [GitHub Releases section](https://github.com/rocky/python-xasm/releases). Older Python used to use `easy_install <https://python101.pythonlibrary.org/chapter29_pip.html#using-easy-install>`_. But this is no longer supported in PyPi or newer Python versions. And vice versa, *poetry* nor *pip*, (the newer ways) are not supported on older Pythons.
59
+
60
+
If the Python version you are running xasm is between Python 3.6 through 3.11, use a tarball called xasm_36-*x.y.z*.tar.gz.
61
+
62
+
If the Python version you are running xasm is 3.11 or later, use a file called xasm-*x.y.z*.tar.gz.
63
+
64
+
Similarly, a tarball with or without the underscore *xx*, e.g., xasm_36-*x.y.z*.tar.gz. works only from Python 3.11 or greater.
65
+
66
+
Rationale for using Git Branches
67
+
++++++++++++++++++++++++++++++++
68
+
69
+
It is currently impossible (if not impractical) to have one Python source code of this complexity and with this many features that can run both Python 3.6 and Python 3.13+. The languages have drifted so much, and packaging is vastly different.
70
+
71
+
A GNU makefile is also provided so :code:`make install` (possibly as root or sudo) will do the steps above.
72
+
73
+
61
74
Testing
62
75
-------
63
76
@@ -137,8 +150,8 @@ Here is an assembly for the above:
137
150
RETURN_VALUE
138
151
139
152
140
-
The above can be created automatically from Python source code using the `pydisasm`
141
-
command from `xdis`:
153
+
The above can be created automatically from Python source code using the ``pydisasm``
0 commit comments