Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Include py.typed module when building package #319

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
with:
extra_args: -a --hook-stage manual
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,6 @@ atlassian-ide-plugin.xml
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties

venv/
env/
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

### Fixes

* Include py.typed module when building package. [Stavros Korokithakis]


## v0.7.7 (2024-05-04)

### Fixes

* Fix setuptools not finding the schema package (fixes #311) [Stavros Korokithakis]


Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include README.rst requirements.txt LICENSE-MIT *.py
include schema/py.typed
include tox.ini
22 changes: 2 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,2 @@
[tool.black]
line-length = 120
target-version = ['py37']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
)
'''
[tool.ruff]
lint.ignore = ["F403", "E501", "N802", "N803", "N806", "C901", "D100", "D102", "D102", "D10"]
File renamed without changes.
File renamed without changes.
14 changes: 0 additions & 14 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,16 +1,2 @@
[wheel]
universal = 1

[semantic_release]
version_variable = schema.py:__version__

[flake8]
exclude=wsgi.py,env/*,*/migrations/*,venv/*,local_settings.py,doc/*,webpush/*,*.html,setup.cfg
ignore=E501,W503

[isort]
include_trailing_comma = true
line_length = 120
force_grid_wrap = 0
multi_line_output = 3
skip=migrations,node_modules
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import codecs
import os
import sys

from setuptools import setup

version_file = "schema.py"
version_file = os.path.join("schema", "__init__.py")

with open(version_file) as f:
for line in f.read().split("\n"):
if line.startswith("__version__ ="):
Expand All @@ -22,8 +24,7 @@
license="MIT",
keywords="schema json validation",
url="https://github.com/keleshev/schema",
py_modules=["schema"],
package_data={"": ["py.typed"]}, # Include py.typed file
packages=["schema"],
include_package_data=True,
long_description=codecs.open("README.rst", "r", "utf-8").read(),
long_description_content_type="text/x-rst",
Expand Down
Loading