mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
AppVeyor fix: change py2exe to pyinstaller
py2exe seems abandoned and still requires python < 3.4 while attrs does not support such an old python version anymore. * https://ci.appveyor.com/project/shlomif/pysolfc/builds/35127928 To accommodate pyinstaller's directory layout, dist was changed to dist/pysol in scripts/create_iss.py. scripts/build.bat had become unmaintained and outdated.
This commit is contained in:
parent
95a0d7d007
commit
a8a262a68c
5 changed files with 23 additions and 37 deletions
|
@ -1,23 +1,25 @@
|
|||
---
|
||||
environment:
|
||||
matrix:
|
||||
- PYTHON: "C:\\PYTHON34"
|
||||
- PYTHON: "C:\\Python37"
|
||||
# Shamelessly taken from https://github.com/plicease/Dist-Zilla-PluginBundle-Author-Plicease/blob/master/.appveyor.yml
|
||||
# Thanks!
|
||||
install:
|
||||
- choco install strawberryperl
|
||||
- copy %PYTHON%\python.exe %PYTHON%\python3.exe
|
||||
- SET PATH=%PYTHON%;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
|
||||
- python3 -mpip install Pillow attrs configobj flake8 flake8-import-order py2exe pycotap pygame pysol-cards random2 setuptools six
|
||||
- SET PATH=%PYTHON%;%PYTHON%\Scripts;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
|
||||
- python3 -mpip install Pillow attrs configobj flake8 flake8-import-order
|
||||
pycotap pygame pyinstaller pysol-cards random2 setuptools six
|
||||
- perl -v
|
||||
- copy C:\msys64\mingw64\bin\mingw32-make.exe C:\msys64\mingw64\bin\make.exe
|
||||
- SET PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
|
||||
- SET PERL5LIB=C:/_P5/lib/perl5
|
||||
- SET PERL_LOCAL_LIB_ROOT=C:/_P5
|
||||
- SET PERL_MB_OPT=--install_base C:/_P5
|
||||
- SET PERL_MM_OPT=INSTALL_BASE=C:/_P5
|
||||
- perl -v
|
||||
- cpanm --notest Code::TidyAll::Plugin::Flake8 File::Find::Object Perl::Tidy Task::FreecellSolver::Testing Test::Code::TidyAll Test::TrailingSpace
|
||||
- cpanm --notest Code::TidyAll::Plugin::Flake8 File::Find::Object
|
||||
Perl::Tidy Task::FreecellSolver::Testing Test::Code::TidyAll
|
||||
Test::TrailingSpace
|
||||
- echo %PATH%
|
||||
build: off
|
||||
test_script:
|
||||
|
@ -30,13 +32,14 @@ test_script:
|
|||
- gmake rules
|
||||
- gmake pot
|
||||
- gmake mo
|
||||
- python3 setup.py py2exe
|
||||
- appveyor DownloadFile https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/PySolFC-Cardsets-2.0/PySolFC-Cardsets-2.0.tar.bz2/download -FileName cardsets.tar.bz2
|
||||
- tar xf cardsets.tar.bz2
|
||||
- xargs -ta scripts\cardsets_to_bundle -I file cp -rt dist\data\ PySolFC-Cardsets-2.0\file
|
||||
- pyinstaller pysol.py --windowed --icon=data\pysol.ico
|
||||
- python3 setup.py install_data -d dist\pysol
|
||||
- appveyor DownloadFile https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/minimal/PySolFC-Cardsets--Minimal-2.0.1.tar.xz/download -FileName cardsets.tar.xz
|
||||
- 7z x cardsets.tar.xz -so | 7z x -si -ttar
|
||||
- mv PySolFC-Cardsets--Minimal-2.0.1/cardset-* dist/pysol/data
|
||||
- appveyor DownloadFile https://sourceforge.net/projects/pysolfc/files/PySol-Music/PySol-Music-4.50/pysol-music-4.50.tar.xz/download -FileName music.tar.xz
|
||||
- 7z x music.tar.xz -so | 7z x -si -ttar
|
||||
- move pysol-music-4.50\data\music dist\data\music
|
||||
- move pysol-music-4.50\data\music dist\pysol\data\music
|
||||
# - ps: |
|
||||
# $apiUrl = 'https://ci.appveyor.com/api'
|
||||
# $project = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/shlomif/fc-solve"
|
||||
|
@ -48,8 +51,8 @@ test_script:
|
|||
- SET FC_SOLVE_VER=5.20.0
|
||||
- appveyor DownloadFile https://netix.dl.sourceforge.net/project/fc-solve/fc-solve/DO-NOT-USE--fc-solve-for-pysol/fc-solve-for-pysol--v%FC_SOLVE_VER%.zip -FileName fc-solve.zip
|
||||
- 7z x fc-solve.zip
|
||||
- move fcs-pysol dist\freecell-solver
|
||||
- 7z a -r pysol_win_dist.7z dist\
|
||||
- move fcs-pysol dist\pysol\freecell-solver
|
||||
- 7z a -r pysol_win_dist.7z dist\pysol\
|
||||
- SET PYTHONPATH=%cd%
|
||||
- python3 scripts\create_iss.py
|
||||
- appveyor DownloadFile https://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe -FileName vcredist_x86.exe
|
||||
|
@ -58,7 +61,7 @@ test_script:
|
|||
artifacts:
|
||||
- path: pysol_win_dist.7z
|
||||
name: pysol_win_dist
|
||||
- path: dist\PySolFC_*_setup.exe
|
||||
- path: dist\pysol\PySolFC_*_setup.exe
|
||||
name: pysol_win_installer
|
||||
cache:
|
||||
# - C:\_P5 -> .appveyor.yml
|
||||
|
|
|
@ -18,7 +18,7 @@ include data/pysol.desktop
|
|||
include data/pysolfc.glade
|
||||
graft data/themes
|
||||
recursive-exclude data/themes *.py
|
||||
include scripts/build.bat scripts/create_iss.py scripts/mahjongg_utils.py
|
||||
include scripts/create_iss.py scripts/mahjongg_utils.py
|
||||
include scripts/all_games.py scripts/cardset_viewer.py
|
||||
include scripts/cardconv
|
||||
include scripts/gen_individual_importing_tests.py
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
rem simple script for building windows package
|
||||
|
||||
cd ..
|
||||
rm -rf dist
|
||||
mkdir dist
|
||||
cp -r locale dist
|
||||
cp -r freecell-solver dist
|
||||
python setup.py py2exe
|
||||
cp -r d:\Python\tcl\tile0.7.8 dist\tcl
|
||||
cp -r data\music dist\data
|
||||
python scripts\create_iss.py
|
||||
"d:\Program Files\Inno Setup 5\ISCC.exe" setup.iss
|
||||
pause
|
|
@ -14,7 +14,7 @@ prog_name = 'PySol Fan Club edition'
|
|||
|
||||
dirs_list = []
|
||||
files_list = []
|
||||
for root, dirs, files in os.walk('dist'):
|
||||
for root, dirs, files in os.walk(os.path.join('dist', 'pysol')):
|
||||
if files:
|
||||
files_list.append(root)
|
||||
dirs_list.append(root)
|
||||
|
@ -32,7 +32,7 @@ DefaultGroupName=%(prog_name)s
|
|||
UninstallDisplayIcon={app}\\pysol.exe
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
SourceDir=dist
|
||||
SourceDir=dist\\pysol
|
||||
OutputDir=.
|
||||
OutputBaseFilename=PySolFC_%(prog_version)s_setup
|
||||
DisableWelcomePage=no
|
||||
|
@ -47,16 +47,17 @@ Name: "{userdesktop}\\%(prog_name)s"; Filename: "{app}\\pysol.exe"
|
|||
|
||||
print('[Dirs]', file=out)
|
||||
for d in dirs_list[1:]:
|
||||
print('Name: "{app}%s"' % d.replace('dist', ''), file=out)
|
||||
print('Name: "{app}%s"' % d.replace(os.path.join('dist', 'pysol'), ''),
|
||||
file=out)
|
||||
|
||||
print(file=out)
|
||||
print('[Files]', file=out)
|
||||
print('Source: "*"; DestDir: "{app}"', file=out)
|
||||
for d in files_list[1:]:
|
||||
d = d.replace('dist\\', '')
|
||||
d = d.replace(os.path.join('dist', 'pysol', ''), '')
|
||||
print('Source: "%s\\*"; DestDir: "{app}\\%s"' % (d, d), file=out)
|
||||
|
||||
print('Source: "..\\vcredist_x86.exe"; DestDir: {tmp}; \
|
||||
print('Source: "..\\..\\vcredist_x86.exe"; DestDir: {tmp}; \
|
||||
Flags: deleteafterinstall', file=out)
|
||||
print('[Run]\n\
|
||||
Filename: {tmp}\\vcredist_x86.exe; \
|
||||
|
|
5
setup.py
5
setup.py
|
@ -8,9 +8,6 @@ from pysollib.settings import VERSION
|
|||
|
||||
from setuptools import setup
|
||||
|
||||
if os.name == 'nt':
|
||||
import py2exe # noqa: F401
|
||||
|
||||
|
||||
def get_data_files(source, destination):
|
||||
"""Iterates over all files under the given tree, to install them to the
|
||||
|
@ -103,8 +100,6 @@ kw = {
|
|||
}
|
||||
|
||||
if os.name == 'nt':
|
||||
kw['windows'] = [{'script': 'pysol.py',
|
||||
'icon_resources': [(1, 'data/pysol.ico')], }]
|
||||
kw['packages'].remove('pysollib.pysolgtk')
|
||||
|
||||
setup(**kw)
|
||||
|
|
Loading…
Add table
Reference in a new issue