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

py.typed is not included in wheel #89

Closed
sk- opened this issue Jul 5, 2024 · 1 comment · Fixed by #90
Closed

py.typed is not included in wheel #89

sk- opened this issue Jul 5, 2024 · 1 comment · Fixed by #90

Comments

@sk-
Copy link
Contributor

sk- commented Jul 5, 2024

In PR #54, the file py.typed was added, however it was not added to the list of pacakge_data files in setup.py, meaning it is not present in the wheel, as seen by the following command:

$ unzip -l ~/Downloads/puremagic-1.25-py3-none-any.whl
Archive:  /Users/user/Downloads/puremagic-1.25-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      102  06-19-2024 03:37   puremagic/__init__.py
       90  06-19-2024 03:37   puremagic/__main__.py
   143189  06-19-2024 03:37   puremagic/magic_data.json
    15622  06-19-2024 03:37   puremagic/main.py
     1086  06-19-2024 03:37   puremagic-1.25.dist-info/LICENSE
     5834  06-19-2024 03:37   puremagic-1.25.dist-info/METADATA
       92  06-19-2024 03:37   puremagic-1.25.dist-info/WHEEL
       10  06-19-2024 03:37   puremagic-1.25.dist-info/top_level.txt
      703  06-19-2024 03:37   puremagic-1.25.dist-info/RECORD
---------                     -------
   166728                     9 files

See this Github query for examples where py.typed is correctly added to the setup.py file.

sk- added a commit to sk-/puremagic that referenced this issue Jul 5, 2024
Fixes cdgriffith#89, by adding `py.typed` to `package_data`, this was validated by running locally the following commands:

```sh
$ pip wheel .
$ unzip -l puremagic-1.25-py3-none-any.whl
Archive:  puremagic-1.25-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      102  07-05-2024 13:59   puremagic/__init__.py
       90  07-05-2024 13:59   puremagic/__main__.py
   143189  07-05-2024 13:59   puremagic/magic_data.json
    15622  07-05-2024 13:59   puremagic/main.py
        0  07-05-2024 13:59   puremagic/py.typed
     1086  07-05-2024 14:02   puremagic-1.25.dist-info/LICENSE
     5854  07-05-2024 14:02   puremagic-1.25.dist-info/METADATA
       91  07-05-2024 14:02   puremagic-1.25.dist-info/WHEEL
       10  07-05-2024 14:02   puremagic-1.25.dist-info/top_level.txt
      775  07-05-2024 14:02   puremagic-1.25.dist-info/RECORD
---------                     -------
   166819                     10 files
```

Note how the `py.typed` file is now included in the generated wheel.
cdgriffith pushed a commit that referenced this issue Jul 11, 2024
Fixes #89, by adding `py.typed` to `package_data`, this was validated by running locally the following commands:
@cdgriffith cdgriffith mentioned this issue Jul 11, 2024
cdgriffith added a commit that referenced this issue Jul 11, 2024
- Adding #87 sndhdr update and HD/CD/DVD Image files (thanks to Andy - NebularNerd)
- Adding #88 Add .caf mime type (thanks to William Bonnaventure)
- Fixing #89 add py.typed to package_data (thanks to Sebastian Kreft)

---------

Co-authored-by: Sebastian Kreft <[email protected]>
Co-authored-by: Andy <[email protected]>
Co-authored-by: William Bonnaventure <[email protected]>
@cdgriffith
Copy link
Owner

Thanks for the fixes, addressed in 1.27!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants