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

No pyi files in strongtyping-stubs 3.11.1 on PyPI #120

Open
ramblehead opened this issue Jul 6, 2023 · 4 comments
Open

No pyi files in strongtyping-stubs 3.11.1 on PyPI #120

ramblehead opened this issue Jul 6, 2023 · 4 comments
Assignees
Labels
enhancement_medium A feature or request which should be adopted with medium priority

Comments

@ramblehead
Copy link

Both "Source Distribution" (strongtyping-3.11.1.tar.gz) and "Built Distribution" (strongtyping-3.11.1-py3-none-any.whl) do not include any strongtyping-stubs/**/*.pyi files. Thus, no type hints when installing from PyPI.

This issue appears to be related to setuptools. Adding package_data param to setup() function seems to solve it:

setup(
    name="strongtyping",
    version="3.11.2",
    description="Decorator which checks whether the function is called with the correct type of parameter
    long_description=README,
    long_description_content_type="text/markdown",
    url="https://strongtyping.readthedocs.io/en/latest/",
    author="FelixTheC",
    author_email="[email protected]",
    license="MIT",
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3.11",
    ],
    packages=packages,
    package_data={'strongtyping-stubs': ['**/*.py', '**/*.pyi']},
    python_requires=">=3.11",
    include_package_data=True,
)
@FelixTheC FelixTheC self-assigned this Jul 6, 2023
@FelixTheC FelixTheC added the enhancement_medium A feature or request which should be adopted with medium priority label Jul 6, 2023
@FelixTheC
Copy link
Owner

Thanks a lot for this issues I will prepare a fix ASAP.

@FelixTheC
Copy link
Owner

fixed with release 3.11.3

@ramblehead
Copy link
Author

ramblehead commented Jul 7, 2023

It looks like 3.11.3 still does not have strongtyping-stubs/**/*.pyi 😅

In your last commit strongtyping-stubs/__init__.py has been deleted. Therefore find_packages() no longer recognises it as a package.

Can be fixed with the following setup (notice packages and package_data param changes):

setup(
    name="strongtyping",
    version="3.11.3",
    description="Decorator which checks whether the function is called with the correct type of parameters",
    long_description=README,
    long_description_content_type="text/markdown",
    url="https://strongtyping.readthedocs.io/en/latest/",
    author="FelixTheC",
    author_email="[email protected]",
    license="MIT",
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3.11",
    ],
    packages=packages + ["strongtyping-stubs"],
    package_data={"strongtyping-stubs": ["**/*.pyi"]},
    python_requires=">=3.11",
    include_package_data=True,
)

(See https://mypy.readthedocs.io/en/latest/installed_packages.html#making-pep-561-compatible-packages)

@FelixTheC
Copy link
Owner

That's interresting cause I recreated it with mypy again. I will have a look into it again. Thanks for your Support and your patience.

@FelixTheC FelixTheC reopened this Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement_medium A feature or request which should be adopted with medium priority
Projects
None yet
Development

No branches or pull requests

2 participants