Commit graph

27 commits

Author SHA1 Message Date
whitequark 416b2531ae Revert "Add PEP 518 pyproject.toml."
This reverts commit 7fca037f9c.

This broke editable installs and has to be reverted due to a number
of pip issues:
  * pypa/pip#6375
  * pypa/pip#6434
  * pypa/pip#6438

We can put this back once PEP 517/518 support editable installs.
Until then the legacy behavior will suffice, and we should just teach
people to install the dependencies in virtualenvs or something...
2020-07-01 08:24:47 +00:00
whitequark 7fca037f9c Add PEP 518 pyproject.toml.
This is necessary to be able to install nMigen into a virtualenv that
does not have `wheel` installed in certain cases.

See #349.
2020-07-01 05:58:34 +00:00
whitequark 39c3bacb79 setup: link to proper location for docs. 2020-06-30 23:13:44 +00:00
whitequark 8dacbbb2b2 Don't use pkg_resources.
This package is deprecated and introduces a massive amount of startup
latency. On my machine with 264 installed Python packages, it reduces
the time required to `import nmigen` from ~100ms to ~200ms.
2020-06-30 22:11:47 +00:00
whitequark eddc397509 _yosys: add a way to retrieve Yosys data directory.
This is important for CXXRTL, since that's where its include files
are located.
2020-06-14 00:31:34 +00:00
whitequark 9c80c32c30 setup: exclude tests.
The inclusion of tests in the package was completely unintentional
and a result of my lack of knowledge of setuptools. If you are using
nmigen.test.utils, please copy the parts you need to your own code
because the nmigen.test code can and will change without notice.
2020-05-31 14:14:27 +00:00
whitequark b9799b4c4a back.verilog: fall back to nmigen_yosys package.
The nmigen-yosys PyPI package provides a custom, minimal build of
Yosys that uses (at the moment) wasmtime-py to deliver a single
WASM binary that can run on many platforms, and eliminates the need
to build Yosys from source.

Not only does this lower barrier to entry for new nMigen developers,
but also decouples nMigen from Yosys' yearly release cycle, which
lets us use new features and drop workarounds for Yosys bugs earlier.

The source for the nmigen-yosys package is provided at:
  https://github.com/nmigen/nmigen-yosys
The package is built from upstream source and released automatically
with no manual steps.

Fixes #371.
2020-05-22 16:51:00 +00:00
whitequark c79caead33 setup: bump pyvcd to ~=0.2.
We don't use any of the deprecated functionality, and the added
requirement of Python 3.6+ matches ours.

Having a requirement for pyvcd ~=0.1.4 was actually the cause of
the error I tried to fix in commit 6e1145e2. It had nothing to do
with Jinja2 (though it is definitely still good to have the tighter
requirement on Jinja2); the cause of the error was that pip would
install Jinja2, schedule installing markupsafe, install pyvcd 0.2.0
and then choke on the pyvcd 0.1.4 requirement, which would prevent
it from installing markupsafe &c. Why it does that is beyond me.
2020-04-02 11:23:49 +00:00
whitequark 6e1145e2e7 setup: tighten version constraint on Jinja2.
I remember thinking that not constraining it properly might bite us
someday, but assumed that Jinja2 will always stay version 2. Now it
looks like Jinja2 3.0.0a1 got released, pip picks it by default, and
it's currently broken (something about markupsafe missing).

Do what needed to be done in the first place.
2020-04-02 01:35:39 +00:00
whitequark 38aa9fb671 setup: update project URLs. 2020-02-09 17:03:06 +00:00
whitequark 7df70059d1 back.pysim: redesign the simulator.
The redesign introduces no fundamental incompatibilities, but it does
involve minor breaking changes:
  * The simulator commands were moved from hdl.ast to back.pysim
    (instead of only being reexported from back.pysim).
  * back.pysim.DeadlineError was removed.

Summary of changes:
  * The new simulator compiles HDL to Python code and is >6x faster.
    (The old one compiled HDL to lots of Python lambdas.)
  * The new simulator is a straightforward, rigorous implementation
    of the Synchronous Reactive Programming paradigm, instead of
    a pile of ad-hoc code with no particular design driving it.
  * The new simulator never raises DeadlineError, and there is no
    limit on the amount of delta cycles.
  * The new simulator robustly handles multiclock designs.
  * The new simulator can be reset, such that the compiled design
    can be reused, which can save significant runtime with large
    designs.
  * Generators can no longer be added as processes, since that would
    break reset(); only generator functions may be. If necessary,
    they may be added by wrapping them into a generator function;
    a deprecated fallback does just that. This workaround will raise
    an exception if the simulator is reset and restarted.
  * The new simulator does not depend on Python extensions.
    (The old one required bitarray, which did not provide wheels.)

Fixes #28.
Fixes #34.
Fixes #160.
Fixes #161.
Fixes #215.
Fixes #242.
Fixes #262.
2019-11-28 21:05:34 +00:00
whitequark 045f5e19a2 setup: fix commit 5198d99b. 2019-10-16 14:57:40 +00:00
whitequark 5198d99b5e setup: don't append local version for tags.
PyPI rejects any archives with local version.
2019-10-15 04:05:13 +00:00
whitequark 52f36025a9 rpc: add support for Yosys RPC protocol. 2019-09-30 17:38:54 +00:00
Emily f2550021c3 setup: improve repository detection. 2019-09-20 14:01:18 +00:00
Emily 6f12272533 setup: add setuptools dependency. 2019-09-20 14:01:18 +00:00
whitequark 284b533995 setup: replace versioneer with setuptools_scm.
Has the same problems with git-archive but is much less invasive.
2019-09-06 05:20:42 +00:00
whitequark 1b54eb80da vendor.board: split off into nmigen-boards package.
The iCE40 programmers are also moved, since they're board-specific.
(It looks like iceprog isn't, but it only works with Lattice
evaluation kits.)

Fixes #80.
2019-06-04 09:52:33 +00:00
whitequark 578dba263f Add versioneer. 2019-05-26 11:20:13 +00:00
Alain Péteut 342bdbe75a setup.py: constrain Python version
Installation should be constraint to supported Python versions, using `python_requires`,
refer to [1] for details.

[1] https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
2019-02-22 08:45:28 +00:00
whitequark 8cc900c4ef setup: update pyvcd dependency, for var_type="string". 2018-12-19 17:17:25 +00:00
whitequark 7fa82a70be back.pysim: eliminate most dictionary lookups.
This makes the Glasgow testsuite about 30% faster.
2018-12-18 16:36:54 +00:00
whitequark 1580b6e542 Lower Python version requirement to 3.6. 2018-12-15 17:03:23 +00:00
whitequark 55e729f68a setup: add missing import. 2018-12-14 02:32:37 +00:00
whitequark fb27c2520b back.pysim: new simulator backend (WIP). 2018-12-13 18:02:46 +00:00
whitequark 48330f8742 setup: check Python version. 2018-12-13 07:47:07 +00:00
whitequark 4d3258013d Initial commit. 2018-12-12 03:18:44 +00:00