Created venv builders for linux/windows and req flashers + use documentation - #38
Conversation
kezhenxu94
left a comment
There was a problem hiding this comment.
The newly-added files require a license header, you can copy one from the existing files
Done, but as one of my files is a batch file, the comments use |
NO worries, ATM I just check 3 directories |
|
Thanks, I'll take a detailed look later |
|
@zkscpqm do we have a corresponding script for Mac OS? |
I'd like to say that the Linux scripts will work for MacOS too, but I don't have access to a Mac Environment to test. The shebang is set to |
Sure, that's what I mean because I'm trying to test it locally (with a Mac), I'll test with the Linux script then |
| ### Steps to get an operational virtual environment: | ||
|
|
||
| 1. `git clone https://github.com/apache/skywalking-python.git` | ||
| 2. `cd skywalking-python/scripts` (*make sure you actually go into the directory since the scripts use relative paths*) |
There was a problem hiding this comment.
nit: I hope the script itself can tackle the paths by some extra work, that would be more friendly to the developers
| 2. `cd skywalking-python/scripts` (*make sure you actually go into the directory since the scripts use relative paths*) | ||
| 3. Run the script for your relevant OS to create a virtual environment folder in the project root (*skywalking-python/venv*) and install all the necessary requirements | ||
|
|
||
| **Make sure that when the `python` command is executed on your workstation, the binary it references is python 3.5 or newer!** |
There was a problem hiding this comment.
IIRC this can be automatically determined right?
There was a problem hiding this comment.
I'll have to double-check but I think you can determine either python3 or perhaps python37 but IDK about specifically python35-python38. And sometimes python3 is not implemented as an option (on my PC, writing python3 in PowerShell redirects me to the Microsoft Store :D
… linux venv bin path
| blindspin==2.0.1 | ||
| certifi==2020.6.20 | ||
| chardet==3.0.4 | ||
| colorama==0.4.3 | ||
| crayons==0.3.1 | ||
| deprecation==2.1.0 | ||
| docker==4.2.2 | ||
| grpcio==1.30.0 | ||
| grpcio-tools==1.30.0 | ||
| idna==2.10 | ||
| packaging==20.4 | ||
| protobuf==3.12.2 | ||
| PyMySQL==0.9.3 | ||
| pyparsing==2.4.7 | ||
| pypiwin32==223 | ||
| pywin32==228 | ||
| requests==2.24.0 | ||
| six==1.15.0 | ||
| testcontainers==3.0.3 | ||
| urllib3==1.25.9 | ||
| websocket-client==0.57.0 | ||
| Werkzeug==1.0.1 | ||
| wrapt==1.12.1 |
There was a problem hiding this comment.
Do you think that we should check in this file? I saw this is Windows-specific, and in my side, it should be Mac-specific, this file keeps changing from developer to developer
There was a problem hiding this comment.
And it seems to be created automatically in the script, so don't need to check in
There was a problem hiding this comment.
The point of this file is for the build script to work. If you don't have this file, the other 4 scripts are pointless. It tells them what libraries need to be installed in the virtual env so that the dev doesn't have to go file-to-file to see what they need to install
There was a problem hiding this comment.
If we don't check it in, a new developer/user who is just downloading the source will not have a way to set up their venv
There was a problem hiding this comment.
According to your doc, if the developers can 2. Execute the build_requirements script relevant to your OS. to generate the requirements.txt, why should we check the requirements.txt in? Other developers can also execute the same script to generate it, right?
|
@zkscpqm and I found a dead lock in your scripts, |
left a comment
There was a problem hiding this comment.
LGTM, thanks for your contribution and patience very much @zkscpqm
Scripts folder to hold auxilliary, non-application helpers.
Initial contents:
build_requirements (win/linux): This will have a look at your virtual environment packages and flash them to a "requirements.txt" file. This file will then allow developers to set up their virtual environment easily
setup (win/linux): This will create a separate clean virtual environment for the project and only the necessary packages (outlined in requirements.txt) will be installed.
Updated the gitignore file to ignore the virtual environment
Updated README file with instructions on building and updating the requirements