Browse Source

Fix building under windows

master 1.0
John Smith 3 weeks ago
parent
commit
dadaed4288
  1. 8
      bootstrap.ps1
  2. 0
      setup.bat
  3. 10
      setup.py

8
bootstrap.ps1

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
$url = "https://www.python.org/ftp/python/3.11.5/python-3.11.5-amd64.exe"
$url = "https://www.python.org/ftp/python/3.11.9/python-3.11.9-amd64.exe"
$output = "python311_installer.exe"
$install_dir = "C:\Python311"
@ -27,5 +27,11 @@ Start-Process "$install_dir\python.exe" -ArgumentList "-m pip install packaging" @@ -27,5 +27,11 @@ Start-Process "$install_dir\python.exe" -ArgumentList "-m pip install packaging"
Write-Output "Installing setuptools"
Start-Process "$install_dir\python.exe" -ArgumentList "-m pip install setuptools" -Wait
Write-Output "Installing requests"
Start-Process "$install_dir\python.exe" -ArgumentList "-m pip install requests" -Wait
Write-Output "Installing chardet"
Start-Process "$install_dir\python.exe" -ArgumentList "-m pip install chardet" -Wait
Write-Output "Installing py2exe"
Start-Process "$install_dir\python.exe" -ArgumentList "-m pip install py2exe" -Wait

10
setup.py

@ -15,6 +15,8 @@ sys.argv.append("py2exe") @@ -15,6 +15,8 @@ sys.argv.append("py2exe")
PYTHON_PATH = r"C:\Python311"
WINDOWS_PATH = r"C:\Windows"
SETUP_DICT = {
"console": [{
@ -30,14 +32,18 @@ SETUP_DICT = { @@ -30,14 +32,18 @@ SETUP_DICT = {
("", glob(os.path.join(WINDOWS_PATH, r"SYSTEM32\msvcp100.dll"))),
("", glob(os.path.join(WINDOWS_PATH, r"SYSTEM32\msvcr100.dll"))),
("", glob(os.path.join(os.getcwd(), r"speedtest.ini"))),
("", glob(os.path.join(os.getcwd(), r"urls.txt"))),
("library", glob(os.path.join(os.getcwd(), r"library/commons.py"))),
("library", glob(os.path.join(os.getcwd(), r"library/inputimeout.py"))),
],
"options": {
"py2exe": {
"bundle_files": 3,
"excludes": ["tcl", "tk", "tkinter", "idna", "lib2to3", "xmlrpc", "multiprocessing", "urllib3", "chardet",
"asyncio", "pydoc_data", "requests", "unittest", "pydoc", "lzma", "bz2"],
"includes": ["charset_normalizer"],
"excludes": ["tcl", "tk", "tkinter", "lib2to3", "xmlrpc", "multiprocessing", "asyncio", "pydoc_data", "unittest", "pydoc", "lzma", "bz2"],
"dll_excludes": ["tcl86.dll", "tk86.dll"],
"compressed": True,
"optimize": 2

Loading…
Cancel
Save