mirror of
https://github.com/ModOrganizer2/pystubs-generation.git
synced 2026-07-27 14:07:13 -07:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7467a2b11c | ||
|
|
eb420fcd79 |
+14
-2
@@ -11,8 +11,10 @@
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
from collections import defaultdict
|
||||
from pathlib import Path
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
def read(*names, **kwargs):
|
||||
@@ -34,18 +36,28 @@ def find_version(*file_paths):
|
||||
raise RuntimeError("Unable to find version string.")
|
||||
|
||||
|
||||
def find_package_data(path: str):
|
||||
package_data: dict[str, list[str]] = defaultdict(lambda: [])
|
||||
for stubfile in Path(path).glob("**/*.pyi"):
|
||||
package_data[stubfile.parent.as_posix().replace("/", ".")].append(stubfile.name)
|
||||
return dict(package_data)
|
||||
|
||||
|
||||
long_description = read("README.md")
|
||||
|
||||
package_data = find_package_data("mobase-stubs")
|
||||
|
||||
setup(
|
||||
name="mobase-stubs",
|
||||
url="https://github.com/ModOrganizer2/mo2-pystubs-generation",
|
||||
author="Holt59",
|
||||
author_email="capelle.mikael@gmail.com",
|
||||
description="PEP561 stub files for the mobase python API",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
version=find_version("mobase-stubs", "__init__.pyi"),
|
||||
packages=find_packages(),
|
||||
packages=list(package_data.keys()),
|
||||
package_data=package_data,
|
||||
install_requires=[],
|
||||
python_requires="==3.10.*",
|
||||
classifiers=[
|
||||
|
||||
Reference in New Issue
Block a user