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

Feature/add possibility to overwrite the name of venv #675

Conversation

zhukovgreen
Copy link
Contributor

@zhukovgreen zhukovgreen commented Nov 2, 2020

Ref oamg/leapp-repository#613

Adds the same functionality as we did at oamg/leapp-repository#613. However, also adds a possibility to overwrite the python executable by the PYTHON_VENV variable (because otherwise, the feature doesn't make sense).

I don't think the naming PYTHON_VENV is good for referring to python executable, however, this is how it is called inside the https://github.com/oamg/leapp-repository/blob/master/Makefile#L28, so I keep the same naming here.

This feature allows overwriting the venv name by passing the
VENVNAME environment variable.

If the variable is not provided then tut will be used as a default value.

With this feature, you can create multiple python envs for easy testing,
i.e.

PYTHON_VENV=python3 VENVNAME=.venv_py3 make install-test
PYTHON_VENV=python2 VENVNAME=.venv_py2 make install-test

this will create python2 and python3 environments

$PYTHON_VENV is used in analogy to leapp-repository, to provide a path
to the python executable
This feature allows to ovewrite the venv name by passing the
VENVNAME environment variable

With this feature you can create multpiple python envs for easy testing,
i.e.

```
PYTHON_VENV=python3 VENVNAME=.venv_py3 make install-test
PYTHON_VENV=python2 VENVNAME=.venv_py2 make install-test
```

this will create python2 and python3 environments
@centos-ci
Copy link

Can one of the admins verify this patch?

@leapp-bot
Copy link
Collaborator

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the
Leapp Guidelines and must pass all tests in order to be mergable.

If you want to re-run tests or request review, you can use following commands as a comment:

  • leapp-ci build to run unit tests, copr build and e2e tests in OAMG CI
  • e2e tests to run unit tests, copr build and end-to-end tests in Murphy CI (OAMG members only) [OLD PIPELINE]
  • review please to notify leapp developers of review request

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra.

@zhukovgreen
Copy link
Contributor Author

@oamg/developers, please review. Thanks

@vinzenz vinzenz merged commit 90b67be into oamg:master Nov 2, 2020
drehak added a commit to drehak/leapp that referenced this pull request Feb 2, 2021
## Packaging
- Bump leapp-framework capability to 1.4

## Framework
### Fixes
- Replace functools.wraps with six.wraps (oamg#674)

### Enhancements
- Add a stable report identifier (oamg#669)
- Add a way to override default python version through environment variables (oamg#675)
- Add a possibility to overwrite virtualenv name through environment variables (oamg#675)

Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0
drehak added a commit to drehak/leapp that referenced this pull request Feb 2, 2021
## Packaging
- Bump leapp-framework capability to 1.4

## Framework
### Fixes
- Replace functools.wraps with six.wraps (oamg#674)

### Enhancements
- Add a stable report identifier (oamg#669)
- Add a way to override default python version through environment variables (oamg#675)
- Add a possibility to overwrite virtualenv name through environment variables (oamg#675)

Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date:      Tue Feb 2 15:57:58 2021 +0100
#
# On branch release/202102
# Your branch is up to date with 'drehak/release/202102'.
#
# No changes
@drehak drehak mentioned this pull request Feb 2, 2021
drehak added a commit to drehak/leapp that referenced this pull request Feb 4, 2021
## Packaging
- Add JSON schema of leapp reports for validation (oamg#681)
- Bump leapp-framework capability to 1.4 (oamg#684)

## Framework
### Fixes
- Fix Py2/Py3 issues for unit-tests relying on __wrapped__ for decorators (oamg#674)

### Enhancements
- Add a stable report identifier for each generated report (oamg#669)

## Additional changes interesting for devels
- Add a possibility to overwrite virtualenv name for testing  `$VENVNAME` (oamg#675)
- Add a way to override default python version using `$PYTHON_VENV` (oamg#675)

Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0
drehak added a commit to drehak/leapp that referenced this pull request Feb 4, 2021
## Packaging
- Add JSON schema of leapp reports for validation (oamg#681)
- Bump leapp-framework capability to 1.4 (oamg#684)

## Framework
### Fixes
- Fix Py2/Py3 issues for unit-tests relying on __wrapped__ for decorators (oamg#674)

### Enhancements
- Add a stable report identifier for each generated report (oamg#669)

## Additional changes interesting for devels
- Add a possibility to overwrite virtualenv name for testing  `$VENVNAME` (oamg#675)
- Add a way to override default python version using `$PYTHON_VENV` (oamg#675)

Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0
pirat89 pushed a commit that referenced this pull request Feb 4, 2021
## Packaging
- Add JSON schema of leapp reports for validation (#681)
- Bump leapp-framework capability to 1.4 (#684)

## Framework
### Fixes
- Fix Py2/Py3 issues for unit-tests relying on __wrapped__ for decorators (#674)

### Enhancements
- Add a stable report identifier for each generated report (#669)

## Additional changes interesting for devels
- Add a possibility to overwrite virtualenv name for testing  `$VENVNAME` (#675)
- Add a way to override default python version using `$PYTHON_VENV` (#675)

Related leapp-repository release: https://github.com/oamg/leapp-repository/releases/tag/v0.13.0
MichalHe pushed a commit to MichalHe/leapp that referenced this pull request Aug 12, 2021
Shamelessly copied from leapp to fix minor things later.
Copr build for dependent leapp pr is not being triggered yet and
no dependent-pr build id is passed to testing farm service yet.
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