mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
Move more metadata to pyproject.toml
This commit is contained in:
parent
29590e0323
commit
421876ab0f
@ -49,5 +49,8 @@ quicktex = "quicktex.__main__:main"
|
||||
|
||||
[tool.setuptools]
|
||||
zip-safe = false
|
||||
packages = { find = { include = ["quicktex*"] } } # only include quicktex and not tests
|
||||
package-data = { '*' = ['py.typed', '*.pyi'] } # include stubs
|
||||
package-dir = { '' = '.' } # without this line, C++ source files get included in the bdist
|
||||
|
||||
[tool.setuptools_scm]
|
||||
|
12
setup.py
12
setup.py
@ -1,17 +1,13 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import glob
|
||||
import subprocess
|
||||
|
||||
from setuptools import setup, Extension, find_packages
|
||||
from setuptools import setup, Extension
|
||||
from setuptools.command.build_ext import build_ext
|
||||
|
||||
project_path = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
with open(os.path.join(project_path, 'README.md')) as f:
|
||||
readme = f.read()
|
||||
|
||||
|
||||
# A CMakeExtension needs a sourcedir instead of a file list.
|
||||
# The name must be the _single_ output extension from the CMake build.
|
||||
@ -111,16 +107,10 @@ 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(
|
||||
use_scm_version=True,
|
||||
ext_modules=[CMakeExtension("_quicktex")],
|
||||
cmdclass={"build_ext": CMakeBuild},
|
||||
packages=find_packages(where='.', include=['quicktex*']),
|
||||
package_dir={'': '.'},
|
||||
package_data={'': ['py.typed'] + stubs},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user