Skip to content

Commit 5f56e6b

Browse files
committed
Update links to macropy3 wrapper
1 parent 2795b71 commit 5f56e6b

3 files changed

Lines changed: 21 additions & 21 deletions

File tree

doc/macros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Our extensions to the Python language are built on [MacroPy](https://github.com/azazel75/macropy), from the PyPI package ``macropy3``.
44

5-
Because in Python macro expansion occurs *at import time*, Python programs whose main module uses macros, such as [our unit tests that contain usage examples](../unpythonic/syntax/test/), cannot be run directly. Instead, run them via the included [generic MacroPy3 bootstrapper](macropy3). For convenience, ``setup.py`` installs this bootstrapper.
5+
Because in Python macro expansion occurs *at import time*, Python programs whose main module uses macros, such as [our unit tests that contain usage examples](../unpythonic/syntax/test/), cannot be run directly. Instead, run them via the included [generic MacroPy3 bootstrapper](../macropy3). For convenience, ``setup.py`` installs this bootstrapper.
66

77
**The bootstrapper is moving!** *Starting with `unpythonic` v0.14.1, it is already distributed in [imacropy](https://github.com/Technologicat/imacropy) [[PyPI](https://pypi.org/project/imacropy/)], which is its new, permanent home. It will be removed from `unpythonic` starting in v0.15.0. The reason is the bootstrapper is a general add-on for MacroPy, not specific to `unpythonic`.*
88

@@ -1084,7 +1084,7 @@ x0, ..., *xs = call_cc[f(...) if p else g(...)]
10841084
call_cc[f(...) if p else g(...)]
10851085
```
10861086

1087-
*NOTE*: ``*xs`` may need to be written as ``*xs,`` in order to explicitly make the LHS into a tuple. The variant without the comma seems to work when run with [the bootstrapper](macropy3) from a ``.py``, but fails in code run interactively in [the IPython+MacroPy console](https://github.com/azazel75/macropy/pull/20).
1087+
*NOTE*: ``*xs`` may need to be written as ``*xs,`` in order to explicitly make the LHS into a tuple. The variant without the comma seems to work when run with [the bootstrapper](../macropy3) from a ``.py``, but fails in code run interactively in [the IPython+MacroPy console](https://github.com/azazel75/macropy/pull/20).
10881088

10891089
*NOTE*: ``f()`` and ``g()`` must be **literal function calls**. Sneaky trickery (such as calling indirectly via ``unpythonic.misc.call`` or ``unpythonic.fun.curry``) is not supported. (The ``prefix`` and ``curry`` macros, however, **are** supported; just order the block macros as shown in the final section of this README.) This limitation is for simplicity; the ``call_cc[]`` needs to patch the ``cc=...`` kwarg of the call being made.
10901090

runtests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def main():
5656
else:
5757
totalfails += runtests("macros",
5858
listtestmodules(os.path.join("unpythonic", "syntax", "test")),
59-
[os.path.join("macro_extras", "macropy3"), "-m"])
59+
["macropy3", "-m"])
6060

6161
if not totalfails:
6262
print(CPASS + "*** ALL OK ***" + CEND)

setup.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
#
2727
# This is also the top level of its source tree, relative to the top-level project directory setup.py resides in.
2828
#
29-
libname="unpythonic"
29+
libname = "unpythonic"
3030

3131
# Short description for package list on PyPI
3232
#
33-
SHORTDESC="Supercharge your Python with parts of Lisp and Haskell."
33+
SHORTDESC = "Supercharge your Python with parts of Lisp and Haskell."
3434

3535
# Long description for package homepage on PyPI
3636
#
37-
DESC="""We provide missing features for Python, mainly from the list processing
37+
DESC = """We provide missing features for Python, mainly from the list processing
3838
tradition, but with some haskellisms mixed in. We place a special emphasis on
3939
**clear, pythonic syntax**.
4040
@@ -255,14 +255,14 @@ def my_yield(value, cc):
255255
# Set up data files for packaging.
256256
#
257257
# Directories (relative to the top-level directory where setup.py resides) in which to look for data files.
258-
datadirs = ()
258+
datadirs = ()
259259

260260
# File extensions to be considered as data files. (Literal, no wildcards.)
261-
dataexts = (".py", ".ipynb", ".sh", ".lyx", ".tex", ".txt", ".pdf")
261+
dataexts = (".py", ".ipynb", ".sh", ".lyx", ".tex", ".txt", ".pdf")
262262

263263
# Standard documentation to detect (and package if it exists).
264264
#
265-
standard_docs = ["README", "LICENSE", "TODO", "CHANGELOG", "AUTHORS"] # just the basename without file extension
265+
standard_docs = ["README", "LICENSE", "TODO", "CHANGELOG", "AUTHORS"] # just the basename without file extension
266266
standard_doc_exts = [".md", ".rst", ".txt", ""] # commonly .md for GitHub projects, but other projects may use .rst or .txt (or even blank).
267267

268268
#########################################################
@@ -287,10 +287,10 @@ def my_yield(value, cc):
287287
detected_docs = []
288288
for docname in standard_docs:
289289
for ext in standard_doc_exts:
290-
filename = "".join( (docname, ext) ) # relative to the directory in which setup.py resides
290+
filename = "".join((docname, ext)) # relative to the directory in which setup.py resides
291291
if os.path.isfile(filename):
292292
detected_docs.append(filename)
293-
datafiles.append( ('.', detected_docs) )
293+
datafiles.append(('.', detected_docs))
294294

295295
# Extract __version__ from the package __init__.py
296296
# (since it's not a good idea to actually run __init__.py during the build process).
@@ -307,23 +307,23 @@ def my_yield(value, cc):
307307
version = ast.parse(line).body[0].value.s
308308
break
309309
else:
310-
print( "WARNING: Version information not found in '%s', using placeholder '%s'" % (init_py_path, version), file=sys.stderr )
310+
print("WARNING: Version information not found in '%s', using placeholder '%s'" % (init_py_path, version), file=sys.stderr)
311311
except FileNotFoundError:
312-
print( "WARNING: Could not find file '%s', using placeholder version information '%s'" % (init_py_path, version), file=sys.stderr )
312+
print("WARNING: Could not find file '%s', using placeholder version information '%s'" % (init_py_path, version), file=sys.stderr)
313313

314314
#########################################################
315315
# Call setup()
316316
#########################################################
317317

318318
setup(
319-
name = "unpythonic",
320-
version = version,
321-
author = "Juha Jeronen",
322-
author_email = "juha.m.jeronen@gmail.com",
323-
url = "https://github.com/Technologicat/unpythonic",
319+
name="unpythonic",
320+
version=version,
321+
author="Juha Jeronen",
322+
author_email="juha.m.jeronen@gmail.com",
323+
url="https://github.com/Technologicat/unpythonic",
324324

325-
description = SHORTDESC,
326-
long_description = DESC,
325+
description=SHORTDESC,
326+
long_description=DESC,
327327

328328
license = "BSD",
329329

@@ -367,7 +367,7 @@ def my_yield(value, cc):
367367
# This **does not** automatically recurse into subpackages, so they must also be declared.
368368
#
369369
packages = ["unpythonic", "unpythonic.syntax"],
370-
scripts = ["macro_extras/macropy3"],
370+
scripts = ["macropy3"],
371371

372372
zip_safe = False, # macros are not zip safe, because the zip importer fails to find sources, and MacroPy needs them.
373373

0 commit comments

Comments
 (0)