-
Notifications
You must be signed in to change notification settings - Fork 107
Created venv builders for linux/windows and req flashers + use documentation #38
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
Changes from all commits
88f5df7
20ce789
875bd6d
166e89e
ca66bc1
e720854
925ad85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,4 +7,5 @@ __pycache__ | |
| build/ | ||
| dist/ | ||
| *.pyc | ||
| /apache_skywalking.egg-info/ | ||
| /apache_skywalking.egg-info/ | ||
| **/venv/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| 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 | ||
|
Comment on lines
+1
to
+23
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And it seems to be created automatically in the script, so don't need to check in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to your doc, if the developers can |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| #!/bin/sh | ||
|
|
||
| echo "Building requirements.txt" | ||
|
|
||
| ../../venv/bin /python -m pip freeze > ../../requirements.txt | ||
|
|
||
| echo "requirements.txt created" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| :: | ||
| :: Licensed to the Apache Software Foundation (ASF) under one or more | ||
| :: contributor license agreements. See the NOTICE file distributed with | ||
| :: this work for additional information regarding copyright ownership. | ||
| :: The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| :: (the "License"); you may not use this file except in compliance with | ||
| :: the License. You may obtain a copy of the License at | ||
| :: | ||
| :: http://www.apache.org/licenses/LICENSE-2.0 | ||
| :: | ||
| :: Unless required by applicable law or agreed to in writing, software | ||
| :: distributed under the License is distributed on an "AS IS" BASIS, | ||
| :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| :: See the License for the specific language governing permissions and | ||
| :: limitations under the License. | ||
| :: | ||
|
|
||
| echo "Building requirements.txt" | ||
|
|
||
| ..\..\venv\Scripts\python.exe -m pip freeze > ..\..\requirements.txt | ||
|
|
||
| echo "requirements.txt created" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| #!/bin/sh | ||
|
|
||
| echo "Creating virtual environment" | ||
| python3 -m venv '../../venv' | ||
| echo "Virtual env created" | ||
|
|
||
| ../../venv/bin/python -m pip install --upgrade pip | ||
| echo "Pip upgrade complete. Installing packages from requirements.txt" | ||
| ../../venv/bin/python -m pip install ../../requirements.txt |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| Write-Output "Creating virtual environment" | ||
|
|
||
| & python -m venv '..\..\venv' | ||
|
|
||
| Write-Output "Virtual env created" | ||
|
|
||
| $PYEXE= Join-Path -Path $PSScriptRoot -ChildPath '..\..\venv\Scripts\python.exe' | ||
| & $PYEXE -m pip install --upgrade pip | ||
|
|
||
| Write-Output "Pip upgrade complete. Installing packages from requirements.txt" | ||
|
|
||
| & $PYEXE -m pip install -r ..\..\requirements.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.
IIRC this can be automatically determined right?
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.
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