Skip to content

Add option to generate clients without Poetry #120

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

Closed
dbanty opened this issue Aug 4, 2020 · 6 comments · Fixed by #275
Closed

Add option to generate clients without Poetry #120

dbanty opened this issue Aug 4, 2020 · 6 comments · Fixed by #275
Labels
✨ enhancement New feature or improvement

Comments

@dbanty
Copy link
Collaborator

dbanty commented Aug 4, 2020

Is your feature request related to a problem? Please describe.
Originally requested by @TMiguelT in #119 . The request is the ability to install a generated client with just pip (not Poetry).

Describe the solution you'd like
Instead of generating a pyproject.toml file with Poetry metadata, create a setup.py/requirements.txt to be used with Pip.

Describe alternatives you've considered
Additional common package management tools that might be worth adding support for are:

  1. Pipenv
  2. Flit
  3. Twine
@dbanty dbanty added the ✨ enhancement New feature or improvement label Aug 4, 2020
@pawamoy
Copy link

pawamoy commented Aug 4, 2020

In my case, I simply want to generate the client code, not the packaging stuff (poetry/pip/else). I'm actually generating clients from several OpenAPI specs and merging them into one package. I'm more than OK dealing myself with the packaging configuration, especially since I have a template for this :) So having an option to skip all the packaging files would be nice as well :)

@multimeric
Copy link

True, for the most part the project metadata isn't that important to me since I'll just edit it, but having the dependencies listed is fairly important.

@multimeric
Copy link

multimeric commented Aug 5, 2020

Actually I wonder, if you add the [build-system] section (described here), which should be there anyway, it might just work automatically with PEP-517 compliant build tools ie recent setuptools.

@dbanty
Copy link
Collaborator Author

dbanty commented Aug 5, 2020

build-system will be included in clients generated by 0.5.0 so they are pip-installable. In a future version we'll add an option to generate with no metadata (and potentially other types of metadata).

@dbanty
Copy link
Collaborator Author

dbanty commented Aug 5, 2020

@Tsludorf I think generating with no metadata will also interest you, as you generate clients directly into your consuming projects.

@dtkav
Copy link
Contributor

dtkav commented Sep 4, 2020

I added the setup.py from poetry build in my fork because I make heavy use of editable installs (pip -e) in order to mount this project into a docker container and iterate on it without needing to reinstall (or rebuild the container).

My workflow might be niche, so I'm happy to track it in my fork. I wanted to mention it in case:

  1. Other folks know of a way to do editable installs like pip -e but with poetry
  2. It's a useful user-story of why having a setup.py file would be helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or improvement
Projects
None yet
4 participants