Skip to content

Allow editable installs #370

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 1 commit into from
Mar 31, 2021
Merged

Allow editable installs #370

merged 1 commit into from
Mar 31, 2021

Conversation

ramnes
Copy link
Contributor

@ramnes ramnes commented Mar 30, 2021

I hate to be that guy, but would you consider adding a dumb setup.py so that the library can be installed in editable mode with pip? :)

It baffles me that editable installs are still a hot topic in the packaging game. Here the simplest diff that can allow these I think, and it still saves time when testing changes against a real world codebase.

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #370 (c7d8975) into main (078b417) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #370   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        47           
  Lines         1483      1483           
=========================================
  Hits          1483      1483           

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 078b417...c7d8975. Read the comment docs.

@dbanty
Copy link
Collaborator

dbanty commented Mar 31, 2021

Pip can't use PEP517 for editable installs? Lame. I'm happy to make development easier if it doesn't mean extra maintenance burden (your PR looks fine). Before I do though, would you mind letting me in on the workflow that requires this? I do all my local development in my Poetry venv which I think is why I've never required this.

@ramnes
Copy link
Contributor Author

ramnes commented Mar 31, 2021

I don't use poetry (nor PEP517) for sftpgo-client, and it uses openapi-python-client to generate most of the codebase (but not all). I have both codebases as directories, each with their own virtual environment.

If I want to hack on openapi-python-client and see the diff it generates for sftpgo-client, at the moment I have to either reinstall openapi-python-client in stpgo-client's virtual environment at every change, or do the changes in sftpgo-client's virtual environment directly, but openapi-python-client isn't a git repository here, so I have to backport the changes later so that I can commit them.

With this PR, I can simply run pip install -e ../openapi-python-client inside sftpgo-client virtual environment and avoid all this fuss.

@dbanty dbanty merged commit 915183d into openapi-generators:main Mar 31, 2021
ramnes added a commit to ramnes/openapi-python-client that referenced this pull request Apr 1, 2021
…ring development (openapi-generators#370)"

It seems that hings are more complicated than that. This shim setup.py does
allow the project to be pip -e installed but you don't get the entrypoints,
making it completely useless.

This reverts commit 915183d.
dbanty pushed a commit that referenced this pull request Apr 1, 2021
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