Skip to content

feat: re-install dev package on setup file changes #187

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

P403n1x87
Copy link
Contributor

This change enables tracking changes in setup files so that the dev package can be re-installed if needed, when the -s option is passed to the run command.

This change enables tracking changes in setup files so that the dev
package can be re-installed if needed, when the -s option is passed to
the run command.
@P403n1x87 P403n1x87 added the no-changelog This does not need a user visible changelog label Aug 17, 2022
@P403n1x87 P403n1x87 requested a review from a team as a code owner August 17, 2022 10:46
@P403n1x87 P403n1x87 removed the no-changelog This does not need a user visible changelog label Aug 17, 2022
@P403n1x87 P403n1x87 changed the title feat: re-instal dev package on setup file changes feat: re-install dev package on setup file changes Aug 17, 2022
@@ -25,6 +26,7 @@

DEFAULT_RIOT_PATH = ".riot"
DEFAULT_RIOT_ENV_PREFIX = "venv_py"
SETUP_FILES = ["setup.py", "pyproject.toml"]
Copy link
Contributor

Choose a reason for hiding this comment

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

setup.cfg?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I think pip looks for just setup.py and/or pyproject.toml, but setup.cfg should probably be hashed as well, if present 🤔

Copy link
Member

Choose a reason for hiding this comment

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

do we want to add setup.cfg here? probably a good idea since it can contain install/build requirements

... would that mean we also care about requirements.txt? or any variation of those?

@P403n1x87 P403n1x87 requested a review from a team August 26, 2022 09:27
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

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

should we just fail instead if -s is passed and we noticed a change?

what about c-extensions? we would definitely want to rebuild in those cases?

would this become any easier if we removed -s and made that the default behavior? e.g. riot run <venv> would only build the base venv if it doesn't exist, otherwise you use riot generate or can pass in an explicit option like riot run --rebuild?

@@ -25,6 +26,7 @@

DEFAULT_RIOT_PATH = ".riot"
DEFAULT_RIOT_ENV_PREFIX = "venv_py"
SETUP_FILES = ["setup.py", "pyproject.toml"]
Copy link
Member

Choose a reason for hiding this comment

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

do we want to add setup.cfg here? probably a good idea since it can contain install/build requirements

... would that mean we also care about requirements.txt? or any variation of those?

@@ -25,6 +26,7 @@

DEFAULT_RIOT_PATH = ".riot"
DEFAULT_RIOT_ENV_PREFIX = "venv_py"
SETUP_FILES = ["setup.py", "pyproject.toml"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
SETUP_FILES = ["setup.py", "pyproject.toml"]
SETUP_FILES = ["setup.py", "pyproject.toml", "setup.cfg"]

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.

4 participants