add jsonschema dependency to artiq package #43

Closed
opened 2021-02-23 01:49:44 +08:00 by lriesebos · 1 comment
Contributor

@sb10q I think you forgot to add jsonschema as a dependency for the ARTIQ package.

let
    pkgs = import <nixpkgs> {};
    artiq-full = import <artiq-full> { inherit pkgs; };
in
    pkgs.mkShell {
        buildInputs = [
            (pkgs.python3.withPackages(ps: [
                # ARTIQ environment
                artiq-full.artiq
            ]))
        ];
    }
$ python
Python 3.8.5 (default, Jul 20 2020, 13:26:22) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import artiq.coredevice.jsondesc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/dy7ib4302z5ngplhlc6j21bm9zcsfws5-python3-3.8.5-env/lib/python3.8/site-packages/artiq/coredevice/jsondesc.py", line 3, in <module>
    from jsonschema import Draft7Validator, validators
ModuleNotFoundError: No module named 'jsonschema'
@sb10q I think you forgot to add `jsonschema` as a dependency for the ARTIQ package. ```nix let pkgs = import <nixpkgs> {}; artiq-full = import <artiq-full> { inherit pkgs; }; in pkgs.mkShell { buildInputs = [ (pkgs.python3.withPackages(ps: [ # ARTIQ environment artiq-full.artiq ])) ]; } ``` ```sh $ python Python 3.8.5 (default, Jul 20 2020, 13:26:22) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import artiq.coredevice.jsondesc Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/nix/store/dy7ib4302z5ngplhlc6j21bm9zcsfws5-python3-3.8.5-env/lib/python3.8/site-packages/artiq/coredevice/jsondesc.py", line 3, in <module> from jsonschema import Draft7Validator, validators ModuleNotFoundError: No module named 'jsonschema' ```
Owner

It's a development-only dependency, which isn't included with the artiq package (just like e.g. migen, misoc and rustc are also not included). Install it manually if you need it.

It's a development-only dependency, which isn't included with the ``artiq`` package (just like e.g. ``migen``, ``misoc`` and ``rustc`` are also not included). Install it manually if you need it.
sb10q closed this issue 2021-02-23 08:43:34 +08:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nix-scripts#43
No description provided.