Skip to content

Commit e2d0fd4

Browse files
Merge pull request #319 from keleshev/fix-include-pytyped
fix: Include py.typed module when building package
2 parents 5287423 + 5078b2e commit e2d0fd4

File tree

9 files changed

+19
-37
lines changed

9 files changed

+19
-37
lines changed

.github/workflows/pre-commit.yml

+2
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- uses: actions/setup-python@v3
1414
- uses: pre-commit/[email protected]
15+
with:
16+
extra_args: -a --hook-stage manual

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,6 @@ atlassian-ide-plugin.xml
173173
com_crashlytics_export_strings.xml
174174
crashlytics.properties
175175
crashlytics-build.properties
176+
177+
venv/
178+
env/

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66
### Fixes
77

8+
* Include py.typed module when building package. [Stavros Korokithakis]
9+
10+
11+
## v0.7.7 (2024-05-04)
12+
13+
### Fixes
14+
815
* Fix setuptools not finding the schema package (fixes #311) [Stavros Korokithakis]
916

1017

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include README.rst requirements.txt LICENSE-MIT *.py
2+
include schema/py.typed
23
include tox.ini

pyproject.toml

+2-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,2 @@
1-
[tool.black]
2-
line-length = 120
3-
target-version = ['py37']
4-
include = '\.pyi?$'
5-
exclude = '''
6-
(
7-
/(
8-
\.eggs # exclude a few common directories in the
9-
| \.git # root of the project
10-
| \.hg
11-
| \.mypy_cache
12-
| \.tox
13-
| \.venv
14-
| _build
15-
| buck-out
16-
| build
17-
| dist
18-
)/
19-
)
20-
'''
1+
[tool.ruff]
2+
lint.ignore = ["F403", "E501", "N802", "N803", "N806", "C901", "D100", "D102", "D102", "D10"]

schema.py schema/__init__.py

File renamed without changes.

py.typed schema/py.typed

File renamed without changes.

setup.cfg

-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,2 @@
11
[wheel]
22
universal = 1
3-
4-
[semantic_release]
5-
version_variable = schema.py:__version__
6-
7-
[flake8]
8-
exclude=wsgi.py,env/*,*/migrations/*,venv/*,local_settings.py,doc/*,webpush/*,*.html,setup.cfg
9-
ignore=E501,W503
10-
11-
[isort]
12-
include_trailing_comma = true
13-
line_length = 120
14-
force_grid_wrap = 0
15-
multi_line_output = 3
16-
skip=migrations,node_modules

setup.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import codecs
2+
import os
23
import sys
34

45
from setuptools import setup
56

6-
version_file = "schema.py"
7+
version_file = os.path.join("schema", "__init__.py")
8+
79
with open(version_file) as f:
810
for line in f.read().split("\n"):
911
if line.startswith("__version__ ="):
@@ -22,8 +24,7 @@
2224
license="MIT",
2325
keywords="schema json validation",
2426
url="https://github.com/keleshev/schema",
25-
py_modules=["schema"],
26-
package_data={"": ["py.typed"]}, # Include py.typed file
27+
packages=["schema"],
2728
include_package_data=True,
2829
long_description=codecs.open("README.rst", "r", "utf-8").read(),
2930
long_description_content_type="text/x-rst",

0 commit comments

Comments
 (0)