File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
2
2
#
3
3
# SPDX-License-Identifier: MIT
4
-
4
+ import os
5
+ import site
5
6
from datetime import datetime
7
+ from typing import List
8
+
6
9
from setuptools import setup
7
10
from pathlib import Path
8
11
import subprocess
25
28
pieces .pop ()
26
29
version = "-" .join (pieces )
27
30
31
+ def build_data_files_list () -> List [tuple ]:
32
+ result = []
33
+ for package in os .listdir ("circuitpython-stubs" ):
34
+ result .append ((site .getsitepackages ()[0 ] + "/" + package + "/" ,
35
+ ["circuitpython-stubs/{}/__init__.pyi" .format (package )]))
36
+ return result
37
+
28
38
setup (
29
39
name = "circuitpython-stubs" ,
30
40
description = "PEP 561 type stubs for CircuitPython" ,
34
44
35
45
version = version ,
36
46
license = "MIT" ,
37
- package_data = {"circuitpython-stubs" : stubs },
38
- packages = ["circuitpython-stubs" ],
47
+ data_files = build_data_files_list (),
39
48
setup_requires = ["setuptools>=38.6.0" ],
40
49
)
You can’t perform that action at this time.
0 commit comments