Skip to content

Commit 22d9041

Browse files
committed
Add missing type related changes and update doc config
1 parent d96f103 commit 22d9041

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
recursive-include wcmatch *.py
1+
recursive-include wcmatch *.py py.typed
22
recursive-include tests *.py
33
recursive-include requirements *.txt
44
recursive-include docs/src/markdown *.md *.png *.gif *.html

mkdocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ theme:
2222
features:
2323
- navigation.tabs
2424
- navigation.top
25+
- naviagtion.instant
26+
pymdownx:
27+
sponsor: "https://github.com/sponsors/facelessuser"
2528

2629
nav:
2730
- Home:
@@ -42,7 +45,7 @@ nav:
4245

4346
markdown_extensions:
4447
- markdown.extensions.toc:
45-
slugify: !!python/name:pymdownx.slugs.uslugify
48+
slugify: !!python/object/apply:pymdownx.slugs.slugify {kwds: {case: lower}}
4649
permalink: ""
4750
- markdown.extensions.admonition:
4851
- markdown.extensions.smarty:

requirements/docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mkdocs_pymdownx_material_extras==1.4
1+
mkdocs_pymdownx_material_extras==1.5.4
22
mkdocs-git-revision-date-localized-plugin
33
mkdocs-minify-plugin
44
pyspelling

setup.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@
33
"""Setup package."""
44
from setuptools import setup, find_packages
55
import os
6-
import imp
7-
import traceback
86

97

108
def get_version():
119
"""Get version and version_info without importing the entire module."""
1210

13-
path = os.path.join(os.path.dirname(__file__), 'wcmatch')
14-
fp, pathname, desc = imp.find_module('__meta__', [path])
15-
try:
16-
vi = imp.load_module('__meta__', fp, pathname, desc).__version_info__
17-
return vi._get_canonical(), vi._get_dev_status()
18-
except Exception:
19-
print(traceback.format_exc())
20-
finally:
21-
fp.close()
11+
import importlib.util
12+
13+
path = os.path.join(os.path.dirname(__file__), 'wcmatch', '__meta__.py')
14+
spec = importlib.util.spec_from_file_location("__meta__", path)
15+
module = importlib.util.module_from_spec(spec)
16+
spec.loader.exec_module(module)
17+
vi = module.__version_info__
18+
return vi._get_canonical(), vi._get_dev_status()
2219

2320

2421
def get_requirements(req):
@@ -54,6 +51,7 @@ def get_description():
5451
author_email='Isaac.Muse@gmail.com',
5552
url='https://github.com/facelessuser/wcmatch',
5653
packages=find_packages(exclude=['tests', 'tools']),
54+
package_data={"wcmatch": ["py.typed"]},
5755
install_requires=get_requirements("requirements/setup.txt"),
5856
license='MIT License',
5957
classifiers=[
@@ -67,6 +65,7 @@ def get_description():
6765
'Programming Language :: Python :: 3.8',
6866
'Programming Language :: Python :: 3.9',
6967
'Programming Language :: Python :: 3.10',
70-
'Topic :: Software Development :: Libraries :: Python Modules'
68+
'Topic :: Software Development :: Libraries :: Python Modules',
69+
'Typing :: Typed'
7170
]
7271
)

wcmatch/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)