fix stubgen and add pyi files to package

hotfix/mipmap-alpha-fix
Andrew Cassidy 3 years ago
parent 6e30ba871c
commit 190bb58367

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import os
import sys
import glob
import subprocess
from setuptools import setup, Extension, find_packages
@ -99,6 +100,9 @@ class CMakeBuild(build_ext):
)
# Find stub files
stubs = [path.replace('quicktex/', '') for path in glob.glob('quicktex/**/*.pyi', recursive=True)]
# The information here can also be placed in setup.cfg - better separation of
# logic and declaration, and simpler if you include description/version in a file.
setup(
@ -113,6 +117,8 @@ setup(
cmdclass={"build_ext": CMakeBuild},
packages=find_packages('.'),
package_dir={'': '.'},
package_data={'': ['py.typed'] + stubs},
include_package_data=True,
install_requires=["Pillow", "click"],
extras_require={
"tests": ["nose", "parameterized"],

@ -40,7 +40,7 @@ if __name__ == "__main__":
for mod in modules:
new_mod = mod.replace(prefix, '')
contents.replace(mod, new_mod)
contents = contents.replace(mod, new_mod)
# write out to the new location
py_module = ext_module.replace(prefix, '')

Loading…
Cancel
Save