-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
devcontainer: Base python 3.10.2 devcontainer #2880
base: develop
Are you sure you want to change the base?
Conversation
Use VSCode devcontainer infrastructure to allow remote or containerized development to avoid install multiple depenencied on host machine Installed: - python 3.10.2 ( base official Docker image on debian Bullseye ) - Puppet PDK - PHP 7.4 Signed-off-by: Helio Chissini de Castro <helio@kde.org>
- Avoid use configure. As we are inside container using non-root user, there's no necessity to add an extra virtualenv, so we are installing dependencies using pip requirements. - Add sudo capacity to container - Remove pdk and php for now. There's no immediate reason to have it and introduce it was a mistake on beginning Signed-off-by: Helio Chissini de Castro <helio@kde.org>
@heliocastro Thank you++ |
// "puppet.puppet-vscode", | ||
], | ||
// "postCreateCommand": "./configure --dev", | ||
"postStartCommand": "pip install -r requirements.txt -r requirements-dev.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may not be the best command. We use these only as constraints and no longer as plain requirements. See
Line 28 in 1dc4b61
# Requirement arguments passed to pip and used by default or with --dev. |
So IMHO running configure --dev
(on all OSes) would be a better option.
I tried, but then this happens, even if i go up to python 3.8. The repos on aboutcode are somehow not behaving properly: INFO: pip is looking at multiple versions of scancode-toolkit to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of scancode-toolkit[packages] to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of scancode-toolkit[dev] to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement setuptools>=40.0 (from pytest-rerunfailures)
ERROR: No matching distribution found for setuptools>=40.0
Traceback (most recent call last):
File "/workspaces/scancode-toolkit/etc/configure.py", line 76, in call
subprocess.check_call(
File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '"/workspaces/scancode-toolkit/bin/pip" install --upgrade --no-build-isolation --no-index --find-links https://thirdparty.aboutcode.org/pypi --editable .[dev] --editable .[packages] --constraint requirements.txt --constraint requirements-dev.txt' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/workspaces/scancode-toolkit/etc/configure.py", line 331, in <module>
pip_install(requirement_args, quiet=quiet)
File "/workspaces/scancode-toolkit/etc/configure.py", line 216, in pip_install
call(cmd)
File "/workspaces/scancode-toolkit/etc/configure.py", line 84, in call
raise Exception('Failed to run {}\n{}'.format(cmd, str(e)))
Exception: Failed to run "/workspaces/scancode-toolkit/bin/pip" install --upgrade --no-build-isolation --no-index --find-links https://thirdparty.aboutcode.org/pypi --editable .[dev] --editable .[packages] --constraint requirements.txt --constraint requirements-dev.txt
Command '"/workspaces/scancode-toolkit/bin/pip" install --upgrade --no-build-isolation --no-index --find-links https://thirdparty.aboutcode.org/pypi --editable .[dev] --editable .[packages] --constraint requirements.txt --constraint requirements-dev.txt' returned non-zero exit status 1.
[142841 ms] postStartCommand failed with exit code 1. Skipping any further user-provided commands. |
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install common python tools for development | ||
RUN pip install \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need all of these? The minimal set of development tools in use are otherwise included in the [tests]extra and installed with ./configure --dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do if we are still relying on PIP as considering some packages will need to handle python wheel buildings.
As i heard you are working on an pip-less env, maybe this is not needed anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gentle ping.. I would like to merge this and there are a few pending nit pickings for your consideration!
"dockerfile": "Dockerfile", | ||
}, | ||
"settings": { | ||
"puppet.installType": "pdk", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is puppet part of the environment?
This should be fixed now with the 31.x release. |
"editor.formatOnSave": true, | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these specific to a developer's local setup?
Use VSCode devcontainer infrastructure to allow remote or containerized
development to avoid install multiple depenencies on host machine
Installed:
Signed-off-by: Helio Chissini de Castro helio@kde.org