mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
fix stubgen and add pyi files to package
This commit is contained in:
parent
6e30ba871c
commit
190bb58367
0
quicktex/py.typed
Normal file
0
quicktex/py.typed
Normal file
6
setup.py
6
setup.py
@ -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…
Reference in New Issue
Block a user