Commit Graph

7 Commits

Author SHA1 Message Date
Kodi Arfer
d3fa375052 Migrate from Nose to pytest 2017-04-26 14:00:11 -07:00
Kodi Arfer
2b11b9be20 Automatically read and write bytecode
Importing or executing a Hy file now loads the byte-compiled version if it exists and is up to date, and if not, the source is byte-compiled after it's parsed.

This change can speed up Hy a lot. Here are some examples comparing run times of the current master (491b474e) to this commit, on my laptop with Python 3.6:

- `nosetests --exclude='test_bin'` goes from 3.8 s to 0.7 s (a 5-fold speedup)
- `hy -c '(print "hello world")` goes from 0.47 s to 0.20 s (a 2-fold speedup)
- Rogue TV's startup goes from 3.6 s to 0.4 s (a 9-fold speedup)

Accompanying changes include:

- `setup.py` now creates and installs bytecode for `hy.core`, `hy.contrib`, and `hy.extra`.
- The `hyc` command under Python 3 now creates bytecode in `__pycache__`, as usual for Python 3, instead of putting the `.pyc` right next to the source file like Python 2 does.

I've removed a test of `hy.extra.anaphoric.a-if` that triggers #1268 when the test file is byte-compiled and then hits some weird `macroexpand` bug or something when I try to work around that—Nose crashes when trying to produce an error message, and I can't seem to replicate the bug without Nose.
2017-04-14 13:38:33 -07:00
Kodi Arfer
7a53fdb180 Fold .coveragerc into setup.cfg 2017-04-14 11:15:58 -07:00
Berker Peksag
504ba927de Add universal Wheel support. 2014-03-18 10:33:10 +02:00
Paul R. Tagliamonte
9b7181f4d3 Adding in some basic bits in 2013-03-02 20:58:58 -05:00
Paul Tagliamonte
f5836da2a5 Kill everything 2013-02-27 19:00:52 -05:00
Paul Tagliamonte
af8620dca9 coverage 2012-12-22 00:18:43 -05:00