forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
46 lines (39 loc) · 1.46 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
# SPDX-License-Identifier: MIT
import os
import site
from datetime import datetime
from typing import Dict, List
from setuptools import setup
from pathlib import Path
STD_PACKAGES = set(('array', 'math', 'os', 'random', 'struct', 'sys', 'ssl', 'time'))
stub_root = Path("circuitpython-stubs")
stubs = [p.relative_to(stub_root).as_posix() for p in stub_root.glob("*.pyi")]
def local_scheme(version):
return ""
packages = set(os.listdir("circuitpython-stubs")) - STD_PACKAGES
package_dir = dict((f"{package}-stubs", f"circuitpython-stubs/{package}")
for package in packages)
print("package dir is", package_dir)
def build_package_data() -> Dict[str, List[str]]:
result = {}
for package in packages:
result[f"{package}-stubs"] = ["*.pyi", "*/*.pyi"]
return result
package_data=build_package_data()
setup(
name="circuitpython-stubs-foamyguy-1",
description="PEP 561 type stubs for CircuitPython",
url="https://github.com/adafruit/circuitpython",
maintainer="CircuitPythonistas",
maintainer_email="circuitpython@adafruit.com",
author_email="circuitpython@adafruit.com",
use_scm_version={"local_scheme": local_scheme},
license="MIT",
packages=list(package_data.keys()),
package_data=package_data,
package_dir = package_dir,
setup_requires=["setuptools>=38.6.0"],
zip_safe=False,
)