Compare commits

..
Author SHA1 Message Date
Mikaël Capelle 7467a2b11c Debug github action. 2022-05-05 18:27:05 +02:00
Mikaël Capelle eb420fcd79 Fix package generation. 2022-05-05 18:07:43 +02:00
+14 -2
View File
@@ -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=[