Skip to content

fix: Include nested packages in generated setup.py (closes #575) #576

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

Merged
merged 2 commits into from
Jan 29, 2022

Conversation

tedo-benchling
Copy link
Contributor

When openapi-python-client is used to with the
--meta=setup option the generated setup.py needs to
use setuptools.find_packages() to find the top-level
and all of the nested pacakges in the directory
so that distributions include them

…#575)

When openapi-python-client is used to with the
--meta=setup option the generated setup.py needs to
use setuptools.find_packages() to find the top-level
and all of the nested pacakges in the directory
so that distributions include them
@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #576 (26f7aca) into main (65cf25b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #576   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         1713      1713           
=========================================
  Hits          1713      1713           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65cf25b...26f7aca. Read the comment docs.

@tedo-benchling
Copy link
Contributor Author

tedo-benchling commented Jan 25, 2022

Before:

Archive:  dist/foo_api_client-1.0.0.dev0-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      121  01-08-2022 00:43   foo_api_client/__init__.py
     1660  01-08-2022 00:43   foo_api_client/client.py
       25  01-08-2022 00:43   foo_api_client/py.typed
      984  01-08-2022 00:43   foo_api_client/types.py
     4296  01-25-2022 18:57   foo_api_client-1.0.0.dev0.dist-info/METADATA
       92  01-25-2022 18:57   foo_api_client-1.0.0.dev0.dist-info/WHEEL
       41  01-25-2022 18:57   foo_api_client-1.0.0.dev0.dist-info/top_level.txt
      874  01-25-2022 18:57   foo_api_client-1.0.0.dev0.dist-info/RECORD
---------                     -------
     8093                     8 files

After

Archive:  dist/foo_api_client-1.0.0.dev0-py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      121  01-08-2022 00:43   foo_api_client/__init__.py
     1660  01-08-2022 00:43   foo_api_client/client.py
       25  01-08-2022 00:43   foo_api_client/py.typed
      984  01-08-2022 00:43   foo_api_client/types.py
       47  01-08-2022 00:43   foo_api_client/api/__init__.py
        0  01-08-2022 00:43   foo_api_client/api/admin/__init__.py
     1237  01-08-2022 00:43   foo_api_client/api/admin/healthz.py
        0  01-08-2022 00:43   foo_api_client/api/myapi/__init__.py
     1555  01-08-2022 00:43   foo_api_client/api/myapi/api_v1.py
     1535  01-08-2022 00:43   foo_api_client/api/myapi/api_v2.py
      469  01-08-2022 00:43   foo_api_client/models/__init__.py
     2605  01-08-2022 00:43   foo_api_client/models/parameters.py
      176  01-08-2022 00:43   foo_api_client/models/parameters_convert_to.py
     1306  01-08-2022 00:43   foo_api_client/models/parameters_target_s3_data.py
     2505  01-08-2022 00:43   foo_api_client/models/params.py
     1286  01-08-2022 00:43   foo_api_client/models/params_target_s3_data.py
      156  01-08-2022 00:43   foo_api_client/models/output_format.py
     4296  01-25-2022 19:20   foo_api_client-1.0.0.dev0.dist-info/METADATA
       92  01-25-2022 19:20   foo_api_client-1.0.0.dev0.dist-info/WHEEL
       41  01-25-2022 19:20   foo_api_client-1.0.0.dev0.dist-info/top_level.txt
     2559  01-25-2022 19:20   foo_api_client-1.0.0.dev0.dist-info/RECORD
---------                     -------
    22655                     21 files

Copy link
Collaborator

@dbanty dbanty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I'm mostly leaning on your experience since I don't use setup.py 😁

@dbanty dbanty changed the title Use find_packages() to get nested packages (closes #575) fix: Include nested packages in generated setup.py (closes #575) Jan 29, 2022
@dbanty dbanty added this to the 0.11.1 milestone Jan 29, 2022
@dbanty dbanty merged commit 3152663 into openapi-generators:main Jan 29, 2022
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.

2 participants