Commit Graph

7 Commits

Author SHA1 Message Date
Jeff Epler 8e5c389c95 setup.py: Improve installation of stubs
* Don't include a full path from the build system
 * Rename all packages to "foo-stubs"
 * Don't install stubs for standard packages like "os"

After this, I can `python setup.py install --user` to install the stubs
to my local environment, and successfully check code against the stubs,
such as
```
/$ mypy -c 'import busio; b: busio.I2C; b.readfrom_into(0x30, b"")'
<string>:1: error: Argument 2 to "readfrom_into" of "I2C" has incompatible type "bytes"; expected "Union[bytearray, memoryview, array[Any], ndarray, RGBMatrix]"
Found 1 error in 1 file (checked 1 source file)
```

The structure of a wheel built with `python setup.py bdist_wheel` looks
more like lxml-stubs, as well.
```
Archive:  dist/circuitpython_stubs-7.0.0a3.dev28+g124c7b785-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
    30705  2021-06-10 13:50   _bleio-stubs/__init__.pyi…
```

Finally, by eliminating `site.getsitepackages()`, this **may** fix
the doc building problem on readthedocs.
2021-06-10 09:27:33 -05:00
foamyguy 6737bbdcf3 stubs package with data_files 2021-06-01 20:38:56 -05:00
Diego Elio Pettenò 34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
Scott Shawcroft 794d5f5900
Correct version numbering 2020-05-13 14:45:09 -07:00
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
John Reese f831d84435 Update maintainer/email for stub package, bump rst2pyi dep 2019-06-02 15:08:48 -07:00
John Reese 7f7665c1c0 Use rst2pyi to generate type stubs and package 2019-05-25 21:32:06 -07:00