Commit graph

17 commits

Author SHA1 Message Date
Peter Johnson
c1069f191a * floatnum.pxi: yasm_floatnum doesn't support any ops other than NEG,
other cleanups along the lines of intnum.

svn path=/trunk/yasm/; revision=1492
2006-04-16 08:48:28 +00:00
Peter Johnson
2534dd4c5a * symrec.pxi: Revamp to more correctly generate Symbol objects, support
most dictionary functions (but not yet iterator protocol).
* yasm.pyx: Add Py_INCREF, Py_DECREF, malloc, free externals.
* coretype.pxi: Rename c_print to print_, add some missing yasm_expr_op
enum values.

svn path=/trunk/yasm/; revision=1491
2006-04-16 08:41:41 +00:00
Peter Johnson
1370082ddf * intnum.pxi: Use correct name for NotImplementedError.
svn path=/trunk/yasm/; revision=1490
2006-04-16 02:56:54 +00:00
Peter Johnson
67eda0506b * intnum.pxi: Implement full set of integer and comparison functions.
svn path=/trunk/yasm/; revision=1489
2006-04-16 02:27:01 +00:00
Peter Johnson
bbf23a557d * intnum.c (yasm_intnum_create_sized): New, reverse function of
yasm_intnum_get_sized().
* intnum.h (yasm_intnum_create_sized): Prototype.

* yasm.pyx: Bring in _PyLong_From/AsByteArray functions.
* intnum.pyx: Use yasm_intnum_create_sized(), etc to implement full 128-bit
number handling.

* intnum.c (yasm_intnum_get_str): Return strings in hex rather than in
decimal.

svn path=/trunk/yasm/; revision=1488
2006-04-15 09:59:17 +00:00
Peter Johnson
8909d99167 * python-yasm/Makefile.inc: .python_build needs to depend on
libyasm_a_SOURCES otherwise the Python bindings don't get updated when
libyasm changes.

svn path=/trunk/yasm/; revision=1487
2006-04-15 08:43:54 +00:00
Peter Johnson
8c82c94d11 * python-yasm/Makefile.inc: Since we aren't using buildtools to call Pyrex,
we shouldn't need to remove the build directory.  Not removing it speeds up
the build considerably (we don't have to rebuild all of the Python bindings
just because the Makefile changed, for example).

svn path=/trunk/yasm/; revision=1486
2006-04-15 08:03:42 +00:00
Peter Johnson
5c36a0551f * setup.py: strip() opts["srcdir"] to unbreak distcheck.
svn path=/trunk/yasm/; revision=1462
2006-04-05 05:36:06 +00:00
Peter Johnson
56496896e0 * setup.py: Incorporate cleanups suggested by Michael Urman.
svn path=/trunk/yasm/; revision=1461
2006-04-05 03:37:46 +00:00
Peter Johnson
a79593f923 Quiet warnings in Pyrex code by adding "-w" if GCC detected.
* configure.ac: Pass GCC value to Makefile
* Makefile.inc: Pass GCC value to python-setup.txt
* setup.py: Check GCC value and append -w if necessary.

svn path=/trunk/yasm/; revision=1460
2006-04-05 02:26:19 +00:00
Peter Johnson
949965d5cb * pyrex.m4: Add a little documentation.
* setup.py, yasm.pyx, *.pxi: Add copyright/license.

svn path=/trunk/yasm/; revision=1458
2006-04-04 08:06:39 +00:00
Peter Johnson
b22db3f5ca Be much smarter at checking for and running Pyrex. Pyrex is a Python module
and the "pyrexc" command is just a wrapper, so instead of looking for
"pyrexc" look for the module instead.

* pyrex.m4: New macro to check Pyrex version.
* m4/Makefile.inc: Add to dist.
* configure.ac: Use macro to check for Pyrex >= 0.9.3.
* python-yasm/Makefile.inc: Run Python directly instead of pyrexc wrapper.

svn path=/trunk/yasm/; revision=1457
2006-04-04 07:51:42 +00:00
Peter Johnson
a5d91fba6a Hook Python module into the build (even though it's pretty incomplete),
enabled with --enable-python (defaults to auto-detect).

Thanks to some magic in python-yasm/Makefile.inc and setup.py, this actually
plays nicely with automake distcheck.

* m4/pythonhead.m4: Script to find Python.h.
* m4/Makefile.inc: Include it in distfiles.
* configure.ac: Add --enable-python option and Python and Pyrex detection.
* tools/Makefile.inc: Pull tools/python-yasm/Makefile.inc into build.
* python-yasm/Makefile.inc: Add automake build magic for extension.
* setup.py: Likewise.

svn path=/trunk/yasm/; revision=1456
2006-04-04 06:07:32 +00:00
Peter Johnson
2e851878e4 * bytecode.pxi: Fix definition of yasm_dv_create_string().
svn path=/trunk/yasm/; revision=1455
2006-04-04 06:02:18 +00:00
Peter Johnson
549534bc03 * value.pxi, expr.pxi: Copy instead of NULL'ing origin; this will look much
more pythonic on the python side, although it will cause much additional
object churn, and will not be fast.

svn path=/trunk/yasm/; revision=1453
2006-04-03 04:54:27 +00:00
Peter Johnson
5f284d738c python-yasm: Modularize and clean up. Note the modularization is a little
bit broken: you need to remove yasm.c before running python setup.py build
or the pyrex step may not actually run.

svn path=/trunk/yasm/; revision=1450
2006-04-03 04:32:25 +00:00
Michael Urman
02eb686f36 Checkin of initial work on a pyrex python binding for yasm. Very little
works so far. Build it with the command {{{python setup.py build}}}, and
optionally symlink to the built yasm.so to enable importing it from a
python started in the same directory.

svn path=/trunk/yasm/; revision=1449
2006-04-02 08:13:31 +00:00