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

Include openapi-generator.jar even in wheel #26

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

eggplants
Copy link
Member

@eggplants eggplants commented Jan 22, 2025

fixes: #25

Poetry will only include files in the sdist file if format is not specified in tools.poetry.include.

So I added a setting to the format field to include openapi-generator.jar in both sdist (.tar.gz) and wheel (.whl).

ref:
https://python-poetry.org/docs/pyproject/#exclude-and-include

If no format is specified, include defaults to only sdist.
In contrast, exclude defaults to both sdist and wheel.

Test release in TestPyPI:
https://test.pypi.org/project/openapi-generator-cli/7.11.0.post0

Confirmed that openapi-generator.jar included in both .whl and .tar.gz when build distribution files by running poetry build.

$ poetry publish -r testpypi -v --build
Trying to detect current active python executable as specified in the config.
Found: /home/eggplants/.pyenv/versions/3.12.3/bin/python
Using virtualenv: /home/eggplants/.cache/pypoetry/virtualenvs/openapi-generator-cli-XnyH23gs-py3.12
Building openapi-generator-cli (7.11.0.post0)
  - Building sdist
  - Built openapi_generator_cli-7.11.0.post0.tar.gz
  - Building wheel
  - Built openapi_generator_cli-7.11.0.post0-py3-none-any.whl

Publishing openapi-generator-cli (7.11.0.post0) to testpypi
 - Uploading openapi_generator_cli-7.11.0.post0-py3-none-any.whl 100%
 - Uploading openapi_generator_cli-7.11.0.post0.tar.gz 100%
$ wget https://test-files.pythonhosted.org/packages/4f/6e/f8405c01825418b069785e3ad4fefa63b5800bc9f6fc230fc438a655a6e4/openapi_generator_cli-7.11.0.post0.tar.gz
--2025-01-23 00:11:43--  https://test-files.pythonhosted.org/packages/4f/6e/f8405c01825418b069785e3ad4fefa63b5800bc9f6fc230fc438a655a6e4/openapi_generator_cli-7.11.0.post0.tar.gz
Resolving test-files.pythonhosted.org (test-files.pythonhosted.org)... 146.75.112.223, 2a04:4e42:8c::223
Connecting to test-files.pythonhosted.org (test-files.pythonhosted.org)|146.75.112.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27099669 (26M) [application/octet-stream]
Saving to: ‘openapi_generator_cli-7.11.0.post0.tar.gz’

openapi_generator_cli-7.11.0.post 100%[===========================================================>]  25.84M  3.37MB/s    in 7.9s

2025-01-23 00:11:51 (3.27 MB/s) - ‘openapi_generator_cli-7.11.0.post0.tar.gz’ saved [27099669/27099669]

$ wget https://test-files.pythonhosted.org/packages/0d/f2/468a4905aad315ad206bf5a1e3ec9295bad75bde1a04aa6095cda9456762/openapi_generator_cli-7.11.0.post0-py3-none-any.whl
--2025-01-23 00:11:57--  https://test-files.pythonhosted.org/packages/0d/f2/468a4905aad315ad206bf5a1e3ec9295bad75bde1a04aa6095cda9456762/openapi_generator_cli-7.11.0.post0-py3-none-any.whl
Resolving test-files.pythonhosted.org (test-files.pythonhosted.org)... 146.75.112.223, 2a04:4e42:8c::223
Connecting to test-files.pythonhosted.org (test-files.pythonhosted.org)|146.75.112.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27113147 (26M) [application/octet-stream]
Saving to: ‘openapi_generator_cli-7.11.0.post0-py3-none-any.whl’

openapi_generator_cli-7.11.0.post 100%[===========================================================>]  25.86M  3.01MB/s    in 8.7s

2025-01-23 00:12:06 (2.97 MB/s) - ‘openapi_generator_cli-7.11.0.post0-py3-none-any.whl’ saved [27113147/27113147]
$ tar -tvf openapi_generator_cli-7.11.0.post0.tar.gz
-rw-r--r-- 0/0           11357 1970-01-01 09:00 openapi_generator_cli-7.11.0.post0/LICENSE
-rw-r--r-- 0/0            2634 1970-01-01 09:00 openapi_generator_cli-7.11.0.post0/README.md
-rw-r--r-- 0/0            1634 1970-01-01 09:00 openapi_generator_cli-7.11.0.post0/openapi_generator_cli/__init__.py
-rw-r--r-- 0/0        30291831 1970-01-01 09:00 openapi_generator_cli-7.11.0.post0/openapi_generator_cli/openapi-generator.jar
-rw-r--r-- 0/0               0 1970-01-01 09:00 openapi_generator_cli-7.11.0.post0/openapi_generator_cli/py.typed
-rw-r--r-- 0/0            2541 1970-01-01 09:00 openapi_generator_cli-7.11.0.post0/pyproject.toml
-rw-r--r-- 0/0            3850 1970-01-01 09:00 openapi_generator_cli-7.11.0.post0/PKG-INFO
$ unzip -l openapi_generator_cli-7.11.0.post0-py3-none-any.whl
Archive:  openapi_generator_cli-7.11.0.post0-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     1634  2016-01-01 00:00   openapi_generator_cli/__init__.py
 30291831  2016-01-01 00:00   openapi_generator_cli/openapi-generator.jar
        0  2016-01-01 00:00   openapi_generator_cli/py.typed
    11357  2016-01-01 00:00   openapi_generator_cli-7.11.0.post0.dist-info/LICENSE
     3850  2016-01-01 00:00   openapi_generator_cli-7.11.0.post0.dist-info/METADATA
       88  2016-01-01 00:00   openapi_generator_cli-7.11.0.post0.dist-info/WHEEL
       67  2016-01-01 00:00   openapi_generator_cli-7.11.0.post0.dist-info/entry_points.txt
      773  2016-01-01 00:00   openapi_generator_cli-7.11.0.post0.dist-info/RECORD
---------                     -------
 30309600                     8 files

@eggplants eggplants changed the title Include openapi-generator.jar even in wheel properly Include openapi-generator.jar even in wheel Jan 22, 2025
@eggplants eggplants requested a review from wing328 January 22, 2025 14:32
@wing328 wing328 merged commit 692e86a into OpenAPITools:master Jan 23, 2025
7 checks passed
@wing328
Copy link
Member

wing328 commented Jan 23, 2025

thanks for the fix, let's give it a try

@eggplants eggplants deleted the fix-25 branch January 23, 2025 09:16
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 this pull request may close these issues.

[BUG] Jar missing in v7.11.0 wheel
2 participants