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

Do not reinstall in develop mode without setup.py #2273

Merged

Conversation

VincentVanlaer
Copy link

The detection logic for figuring out whether a editable install needs to be reinstalled only works for setuptools based builds using setup.py. If setup.py cannot be found the code will fail with an invocation error. Currently no standard mechanism exists to query a package installed in editable mode whether it should be reinstalled or not. Hence, this change skips reinstallation if setup.py cannot be found.

Fixes #2197

Contribution checklist:

(also see CONTRIBUTING.rst for details)

  • wrote descriptive pull request text
  • added/updated test(s)
  • updated/extended the documentation
  • added relevant issue keyword
    in message body
  • added news fragment in changelog folder
    • fragment name: <issue number>.<type>.rst for example (588.bugfix.rst)
    • <type> is must be one of bugfix, feature, deprecation, breaking, doc, misc
    • if PR has no issue: consider creating one first or change it to the PR number after creating the PR
    • "sign" fragment with -- by :user:`<your username>`.
    • please, use full sentences with correct case and punctuation, for example:
      Fixed an issue with non-ascii contents in doctest text files -- by :user:`superuser`.
    • also see examples
  • added yourself to CONTRIBUTORS (preserving alphabetical order)

Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

Blocked until the CI passes.

@VincentVanlaer
Copy link
Author

It seems the CI fails because python < 3.7 is not available anymore in the macos azure images, not really something I can do anything about except for just disabling these tests.

@gaborbernat
Copy link
Member

Yeah, we'll need to migrate to Github Actions, this PR will need to wait for that. Also, I'll be on holiday until the 3rd of December, so unless @asottile picks it up we'll not move on this, sorry. But we've put it in the queue.

@ssbarnea
Copy link
Member

I can help with GHA issue but I will still need someone to merge the fixes.

The detection logic for figuring out whether a editable install needs to
be reinstalled only works for setuptools based builds using setup.py.
If setup.py cannot be found the code will fail with an invocation error.
Currently no standard mechanism exists to query a package installed in
editable mode whether it should be reinstalled or not. Hence, this
change skips reinstallation if setup.py cannot be found.

Fixes tox-dev#2197
Otherwise install_pkg will not behave correctly when is_develop=True
@gaborbernat gaborbernat force-pushed the fix-developer-mode-without-setup.py branch from 217bf26 to 8c4d6af Compare December 28, 2021 23:05
@gaborbernat gaborbernat merged commit 72e2391 into tox-dev:master Dec 29, 2021
@VincentVanlaer VincentVanlaer deleted the fix-developer-mode-without-setup.py branch December 2, 2022 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

usedevelop without setup.py failure
3 participants