Skip to content

Commit

Permalink
Update to Python 3.8
Browse files Browse the repository at this point in the history
This includes a multibuild update.

The sys.path manipulation in main.py had to be removed. It caused unexpected errors when loading extension dlls.
  • Loading branch information
tlecomte committed Nov 19, 2020
1 parent c547d7b commit 3ccc20f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ matrix:
- os: linux
dist: xenial # use Ubuntu 16.04 LTS will be the minimum required version for the AppImage
language: python
python: "3.6" # pin for Linux builds (on macos, the multibuild python is used instead)
python: "3.8" # pin for Linux builds (on macos, the multibuild python is used instead)
- os: osx
language: generic
env:
- MB_PYTHON_VERSION=3.6
- MB_PYTHON_VERSION=3.8
script:
- source ./.travis/install.sh
deploy:
Expand Down
18 changes: 9 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ sudo apt-get install -y git
sudo apt-get install -y libportaudio2
```

3. Install python 3.6 and related build tools (appropriate PyQt5 wheels for Linux are only available for Python 3.6+)
3. Install python 3.8 and related build tools
```
sudo apt-get install -y python3.6-dev
sudo apt-get install -y python3.8-dev
```

4. Clone the repository
Expand All @@ -43,30 +43,30 @@ git checkout origin/<branchName>
6. Update `pip`, `setuptools` and `virtualenv`

```
sudo python3.6 -m pip install --upgrade pip
sudo pip3.6 install --upgrade setuptools
sudo pip3.6 install --upgrade virtualenv
sudo python3.8 -m pip install --upgrade pip
sudo pip3.8 install --upgrade setuptools
sudo pip3.8 install --upgrade virtualenv
```

7. Create a virtualenv and activate it
```
virtualenv -p /usr/bin/python3.6 buildenv
virtualenv -p /usr/bin/python3.8 buildenv
source ./buildenv/bin/activate
```

8. Install Friture requirements (PyQt5, etc.)
```
pip3.6 install -r requirements.txt
pip3.8 install -r requirements.txt
```

9. Build Cython extensions
```
python3.6 setup.py build_ext --inplace
python3.8 setup.py build_ext --inplace
```

10. Run Friture
```
python3.6 main.py
python3.8 main.py
```

## Running Friture from source on Windows
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ environment:
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
matrix:
- PYTHON: "C:/Python36"
- PYTHON: "C:/Python38"
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
- ps: "ls C:/Python36/"
- ps: "ls C:/Python36/Scripts/"
- ps: "ls C:/Python38/"
- ps: "ls C:/Python38/Scripts/"
- "%PYTHON%/python --version"
- "%PYTHON%/Scripts/pip --version"
# Set the relevant python and pip location to the path
Expand Down
2 changes: 1 addition & 1 deletion choco/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="python" version="3.6.8" />
<package id="python" version="3.8.6" />
<!-- Microsoft Visual Build Tools and C++ workload for Cython, Numpy, etc. -->
<package id="visualstudio2017buildtools" version="15.9.4.0" />
<package id="visualstudio2017-workload-vctools" version="1.3.1" packageParameters="--add Microsoft.VisualStudio.Component.VC.140"/>
Expand Down
2 changes: 1 addition & 1 deletion friture.spec
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ if platform.system() == "Windows":
pathex = [os.path.join(x, 'PyQt5', 'Qt', 'bin') for x in getsitepackages()]

# add vcruntime140.dll - PyInstaller excludes it by default because it thinks it comes from c:\Windows
binaries = [('vcruntime140.dll', 'C:\\Python36\\vcruntime140.dll', 'BINARY')]
binaries = [('vcruntime140.dll', 'C:\\Python38\\vcruntime140.dll', 'BINARY')]
else:
pathex = []
binaries = []
Expand Down
4 changes: 0 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/usr/bin/env python
import sys

# allow this script to be executed as a child of another script (lsprofcalltree, for example)
sys.path.insert(0, '.')

from friture.analyzer import main

Expand Down

0 comments on commit 3ccc20f

Please sign in to comment.