Skip to content

Commit

Permalink
Merge branch 'main' into PR branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rgommers committed Nov 30, 2022
2 parents 25915e7 + f6ba6b7 commit ecfd527
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
30 changes: 15 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
`weave` provides tools for including C/C++ code within Python code. Inlining
C/C++ code within Python generally results in speedups of 1.5x to 30x over
algorithms written in pure Python.
``scipy-weave`` provides tools for including C/C++ code within Python code.
Inlining C/C++ code within Python generally results in speedups of 1.5x to 30x
over algorithms written in pure Python.

`weave` is the stand-alone version of the deprecated Scipy submodule
``scipy.weave``. The official repo for `weave` supports Python 2.x only, and is provided for users that need
new versions of Scipy (from which the ``weave`` submodule may be removed) but
have existing code that still depends on ``scipy.weave``. This fork provides experimental support for Python 3.
``scipy-weave`` is the stand-alone version of the removed SciPy submodule
``scipy.weave``. It is provided for users that need versions of SciPy from
which the ``weave`` submodule has been removed but have existing code that
still depends on ``scipy.weave``. **For new code, users are recommended to use
Cython.**

For the moment, this experimental port of `weave`, is not on PyPI, so, if you would like to try it out, you can clone the repo and install it running pip from the root folder::
Note that the Python 3.x support is new as of version 0.19.0 (Nov 2022), and is
*experimental*. It is not tested on all Python 3.x versions.
For Python 2.6-2.7, use versions 0.17.0 or 0.18.0

pip install .
To install ``scipy-weave``, use of pip is recommended::

To run an example::
pip install scipy-weave

python fibonacci.py
To run the tests::

python runtests.py"
Note that the import name for ``scipy-weave`` is ``weave``. To run the tests::

python -c "import weave; weave.test('full')"
28 changes: 18 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
#!/usr/bin/env python
"""Weave: a C++ compiler for Python.
"""scipy-weave: a C++ compiler for Python 2.
Weave provides tools for including C/C++ code within Python code. Inlining
C/C++ code within Python generally results in speedups of 1.5x to 30x over
algorithms written in pure Python.
scipy-weave provides tools for including C/C++ code within Python code.
Inlining C/C++ code within Python generally results in speedups of 1.5x to 30x
over algorithms written in pure Python.
Weave is the stand-alone version of the deprecated Scipy submodule
``scipy-weave`` is the stand-alone version of the removed SciPy submodule
``scipy.weave``. It is Python 2.x only, and is provided for users that need
new versions of Scipy (from which the ``weave`` submodule may be removed) but
versions of SciPy from which the ``weave`` submodule has been removed but
have existing code that still depends on ``scipy.weave``. For new code, users
are recommended to use Cython.
To install ``scipy-weave``, use of pip is recommended::
pip install scipy-weave
Note that the import name for ``scipy-weave`` is ``weave``. To run the tests::
python2 -c "import weave; weave.test('full')"
"""

DOCLINES = __doc__.split("\n")
Expand All @@ -37,7 +45,7 @@


MAJOR = 0
MINOR = 18
MINOR = 19
MICRO = 0
ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
Expand Down Expand Up @@ -88,7 +96,7 @@ def get_version_info():
GIT_REVISION = "Unknown"

if not ISRELEASED:
FULLVERSION += '.dev-' + GIT_REVISION[:7]
FULLVERSION += '.dev0+' + GIT_REVISION[:7]

return FULLVERSION, GIT_REVISION

Expand Down Expand Up @@ -155,8 +163,8 @@ def setup_package():
cmdclass = {}

metadata = dict(
name = 'weave',
maintainer = "Weave developers",
name = 'scipy-weave',
maintainer = "scipy-weave developers",
maintainer_email = "scipy-dev@scipy.org",
description = DOCLINES[0],
long_description = "\n".join(DOCLINES[2:]),
Expand Down

0 comments on commit ecfd527

Please sign in to comment.