-
Notifications
You must be signed in to change notification settings - Fork 46
Srctools installation
Konclan edited this page Sep 3, 2022
·
1 revision
This installation is targeted towards Python 3.4+
cython
PyInstaller
-
importlib_resources
(install version 1.1.0 withpip install importlib_resources==1.1.0
) aenum
- Python 3.4+
- Git (optional)
- Visual Studio 2019-2020 (optional, necessary for compiling)
git clone https://github.com/TeamSpen210/srctools.git
- go to https://github.com/TeamSpen210/srctools and download srctools
- unzip and place in a desired location (remember this location)
Note: If you didn't use git, replace
/Users/[USERNAME]/srctools
with the path to your srctools folder
cd /Users/[USERNAME]/srctools
If you installed Visual Studio, you can run this directly to install srctools:
python3 setup.py install
If you did not install Visual Studio, you will have to make a slight modification to setup.py
Remove lines 5-13 of setup.py
Remove the following lines:
try:
from Cython.Build import cythonize
c_ext = cpp_ext = '.pyx'
except ImportError:
print('Cython not installed, not compiling Cython modules.')
c_ext = '.c'
cpp_ext = '.cpp'
def cythonize(mod):
return mod
And replace them with this:
def cythonize(m):
return []
cy_ext = cpp_ext = ''
python3 -m PyInstaller postcompiler.spec