...
 
Commits (3)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

---
environment:
matrix:
- PYTHON: "C:\\PYTHON34"
# 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 flake8
- python3 -mpip install random2
- python3 -mpip install py2exe
- python3 -mpip install pycotap
- python3 -mpip install six
- python3 -mpip install Pillow
- python3 -mpip install pygame
- 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
- echo %PATH%
build: off
test_script:
- set CMAKE_MAKE_PROGRAM=C:\strawberry\c\bin\gmake.exe
- set HARNESS_BREAK=1
- set HARNESS_VERBOSE=1
- set FCS_USE_TEST_RUN=1
- gmake pretest
- perl run-tests.pl
- 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
- 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
- ps: |
$apiUrl = 'https://ci.appveyor.com/api'
$project = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/shlomif/fc-solve"
$jobId = $project.build.jobs[0].jobId
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/fc-solve/pkg-build/fc-solve-for-pysol.zip" -OutFile fc-solve.zip
- 7z x fc-solve.zip
- move fcs-pysol dist\freecell-solver
- 7z a -r pysol_win_dist.7z dist\
- 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
- SET PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
- ISCC /Q setup.iss
artifacts:
- path: pysol_win_dist.7z
name: pysol_win_dist
- path: dist\PySolFC_*_setup.exe
name: pysol_win_installer
cache:
- C:\_P5 -> .appveyor.yml
- C:\strawberry -> .appveyor.yml
shallow_clone: true
*.pyc
/.tidyall.d/
/MANIFEST
/build/*
/data/cardsets/*
/data/html/*
/dist/*
/docs/all_games.html
/html
/html-src/html/*
/images
/locale/*
/po/it.po
/po/pl.po
/po/ru.po
/tests/individually-importing/*.py
/tests/unit-generated/*.py
-ci=4
-bl
-cti=0
[Flake8]
ignore = tests/individually-importing/*
select = **/*.py
[PerlTidy]
argv = -ci=4 -bl -cti=0
ignore = **/{cmpdigest,valgrind,verify}--*.t
select = **/*.{pl,pm,t}
dist: trusty
os:
- linux
- osx
before_install:
- if test "$TRAVIS_OS_NAME" = "linux" ; then sudo apt-get update -qq ; sudo apt-get install -y ack-grep cpanminus libperl-dev make perl python-glade2 python-gnome2 python-gnome2-dev python-gtk2 python-setuptools python-tk python3 python3-pip python3-setuptools python3-tk ; sudo dpkg-divert --local --divert /usr/bin/ack --rename --add /usr/bin/ack-grep ; fi
- if test "$TRAVIS_OS_NAME" = "osx" ; then brew update; fi
- if test "$TRAVIS_OS_NAME" = "osx" ; then brew list python &>/dev/null || brew install python; fi
- if test "$TRAVIS_OS_NAME" = "osx" ; then brew list python3 &>/dev/null || brew install python3; fi
- if test "$TRAVIS_OS_NAME" = "osx" ; then brew install pyenv-virtualenv; fi
- if test "$TRAVIS_OS_NAME" = "osx" ; then brew bundle ; brew link gettext --force ; export PATH="$PATH:/usr/local/bin" ; export DYLD_LIBRARY_PATH="/usr/local/opt/curl/lib:/usr/local/opt/openssl/lib:${DYLD_LIBRARY_PATH}" ; export PATH="/usr/local/opt/openssl/bin:$PATH" ; export LDFLAGS="$LDFLAGS -L/usr/local/opt/openssl/lib" ; export CPPFLAGS="$CPPFLAGS -I/usr/local/opt/openssl/include" ; export CPPFLAGS="$CPPFLAGS -I$(brew --prefix openssl)/include" PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig:$PKG_CONFIG_PATH" LDFLAGS="$LDFLAGS -L$(brew --prefix openssl)/lib" ;fi
install:
- sudo cpanm Code::TidyAll::Plugin::Flake8 Perl::Tidy Test::Code::TidyAll Test::Differences Test::TrailingSpace
- export PY_MODS='pycotap random2 six'
- "`which python3` -m pip install --upgrade flake8 $PY_MODS"
- "sudo /usr/bin/python3 -m pip install --upgrade $PY_MODS || true"
- "sudo `which python2` -m pip install --upgrade $PY_MODS"
- which python
- which python2
language: python
python:
- "3.6"
matrix:
exclude:
- os: osx
python: "3.6"
include:
- os: osx
language: generic
env: TOXENV=py35
script:
- "sh -x scripts/travis-ci-build"
- if test "$TRAVIS_OS_NAME" = "osx" ; then PYTHONPATH="`pwd`" python3 setup_osx.py py2app ; fi
- if test "$TRAVIS_OS_NAME" = "osx" ; then find . -iname '*.app' ; fi
- if test "$TRAVIS_OS_NAME" = "osx" ; then (cd dist; tar -cvf ../PySolFC.app.tar PySolFC.app/ ; ); xz PySolFC.app.tar ; fi
deploy:
provider: releases
api_key:
secure: SrKnXigL/oUHNbqpbGx0DB1o+LAEkfPA2QTBllXxg4V+1vGAHBT9FRecp8Do+no/zSPRttH+sPDEPBXMMAV0BWVKKw5Mxas/S5ulVkNdfxpTq1bKjI3EjZbVsS1zZlHe0P77TDFDAj8zyeiYecBM08suhd9OvScieiPlpFPE1UYp9vvNKaBgc66IRNnIDRBdktW4YLsgvkrpXnxGPy8gGwylsTeOzNs5/r5dzHswGdksJl46kqCIbV+s4/Xcx+BEnfibWzEFZmLQoGKhoukbSis3YXGIlERcgiVU6v7S2D4wbwUXSAKOj/Io7z/88Co2P3Qbm538kf/pjeR9+DaM1HsHQQcL0detCjjLog+ekKr2fM00QI1yRmqOiZtuXxTMpneYX73EBmPt4la4rjKmnlhS+NTxrynHcPZD8QopCPvoZ3sUD6dQCrbi8kcGxe13srfdJ3KjuWZXdedLIOgNELbj5o6GNivsanWna59yoJzChC5/H5Jjllncvzbp56TZfEkM1NJkE84jjSS8Sn2KLXjD0woHIsuUSkRNExrCt/6QmIub/QxZPUhwQ2J0xCv1IJPdd0XvO3gCqasG3UA2Q0OlP172x92ocOV/wm1/4wfoG6v/mn+bX5ZwvrsMmm+r3FKKlM8L3T33yFjMzgG/YMoRN8w7pXUIkdtZK8EEDVg=
# file: dist/PySolFC.app
file: PySolFC.app.tar.xz
on:
repo: shlomif/PySolFC
tags: true
skip_cleanup: true
......@@ -8,8 +8,14 @@ T. Kirk
Skomoroh <skomoroh@users.sourceforge.net>
author of PySolFC
Brian Lenihan <brianl@users.sourceforge.net>
OSX package maintainer
macOS package maintainer
Shlomi Fish ( http://www.shlomifish.org/ )
Continued PySolFC maintenance, port to python 3, test suite
(Note: he places all his changes under the MIT/Expat licence).
https://github.com/lufebe16
Added the Kivy toolkit
Roderik Ploszek ( https://github.com/Programator2 )
Fixes and enhancements
Games contributors
==================
......
brew "cpanminus"
brew "gettext"
brew "gnutls"
brew "openssl"
brew "tcl-tk"
# Contributing to PySol FC
You want to contribute? That's great! Welcome aboard. First of all see [these links](https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ.mdwn#i-want-to-contribute-to-an-open-source-project-but-how-which-one-can-i-contribute-to)
for general guidelines for contributing to open source.
# Contribution constraints
- The [Travis-CI build](https://travis-ci.org/shlomif/PySolFC) and [AppVeyor build](https://ci.appveyor.com/project/shlomif/pysolfc) (which also run the test suite) should pass on each commit.
- Your contributions should be under [GPLv3+](https://en.wikipedia.org/wiki/GNU_General_Public_License#Version_3) or a [compatible free software licence](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses), but please don't put them under the [AGPL](https://en.wikipedia.org/wiki/Affero_General_Public_License), which adds additional restrictions.
- The code should be compatible with both Python 2.7.x and Python 3.4.x-and-above.
# How you can contribute
- Translate PySol to a human language you know.
- Try to reproduce [open issues](https://github.com/shlomif/PySolFC/issues)
- Try to fix bugs.
- Add new games.
- Improve the documentation / online help
- [Refactor](https://en.wikipedia.org/wiki/Code_refactoring) the code.
- Add new features.
- Contribute graphics
- Improve the site
- Make a monetary donation.
- [Star](https://help.github.com/articles/about-stars/) or [Watch](https://help.github.com/articles/watching-and-unwatching-repositories/) the repository on GitHub
## Adding new games
First of all there is the "Solitaire Wizard" which may be used to generate many
custom variants. It lives in the Edit menu.
Otherwise, the games' sources live under
[the pysollib/games/](pysollib/games/) directory in the repository, and are
written in Python 2.7/3.x and you can try inheriting from an existing
variant [class](https://en.wikipedia.org/wiki/Class_%28computer_programming%29).
......@@ -4,7 +4,7 @@
## code
##
include pysol.py setup.py setup_osx.py setup.cfg MANIFEST.in Makefile
include COPYING README.md AUTHORS
include COPYING README.md AUTHORS README.android README.kivy
#recursive-include pysollib *.py
include pysollib/*.py pysollib/macosx/*.py pysollib/configobj/*.py
include pysollib/winsystems/*.py
......@@ -18,6 +18,17 @@ graft data/themes
recursive-exclude data/themes *.py
include scripts/build.bat scripts/create_iss.py scripts/mahjongg_utils.py
include scripts/pygettext.py scripts/all_games.py scripts/cardset_viewer.py
include scripts/cardconv scripts/cardsetsgiftobmp
include scripts/gen_individual_importing_tests.py
include tests/individually-importing/PLACEHOLDER
recursive-include tests/lib *.pm *.py
recursive-include tests/unit/data *
include tests/style/*.t
include tests/unit-generated/PLACEHOLDER
include .tidyallrc
include android/*.py
include android/mk*
include android/debian/*
#graft data/plugins
##
## data - docs
......
......@@ -5,7 +5,8 @@ override PYSOL_DEBUG=1
PYSOLLIB_FILES=pysollib/tk/*.py pysollib/tile/*.py pysollib/*.py \
pysollib/games/*.py pysollib/games/special/*.py \
pysollib/games/ultra/*.py pysollib/games/mahjongg/*.py
pysollib/games/ultra/*.py pysollib/games/mahjongg/*.py \
pysollib/kivy/*.py
.PHONY : all install dist all_games_html rules pot mo
......@@ -16,13 +17,13 @@ install:
python setup.py install
dist: all_games_html rules mo
python setup.py sdist
python3 setup.py sdist
rpm: all_games_html rules mo
python setup.py bdist_rpm
all_games_html:
PYTHONPATH=`pwd` ./scripts/all_games.py > docs/all_games.html
PYTHONPATH=`pwd` ./scripts/all_games.py html id doc/rules bare > docs/all_games.html
rules:
export PYTHONPATH=`pwd`; (cd html-src && ./gen-html.py)
......@@ -66,8 +67,9 @@ pretest:
@rm -f tests/individually-importing/*.py # To avoid stray files
python scripts/gen_individual_importing_tests.py
TEST_ENV = PYTHONPATH="`pwd`:`pwd`/tests/lib"
TEST_FILES = tests/style/*.t tests/board_gen/*.py tests/individually-importing/*.py
TEST_ENV_PATH = "`pwd`:`pwd`/tests/lib"
TEST_ENV = PYTHONPATH=$(TEST_ENV_PATH) PERL5LIB=$(TEST_ENV_PATH)
TEST_FILES = tests/style/*.t tests/unit-generated/*.py tests/individually-importing/*.py
define RUN_TESTS
$(TEST_ENV) $1 $(TEST_FILES)
......
Metadata-Version: 1.0
Name: PySolFC
Version: 2.1.2
Summary: a Python solitaire game collection
Home-page: http://pysolfc.sourceforge.net/
Author: Skomoroh
Author-email: skomoroh@gmail.com
License: GPL
Description: PySolFC is a collection of more than 1000 solitaire card games.
Its features include modern look and feel (uses Tile widget set), multiple
cardsets and tableau backgrounds, sound, unlimited undo, player statistics,
a hint system, demo games, a solitaire wizard, support for user written
plug-ins, an integrated HTML help browser, and lots of documentation.
Platform: UNKNOWN
Prerequisites (needs root):
On a 'freshly installed' Ubuntu 16.04 (32bit), the following
additional packages had to be installed:
- python-setuptools
- javasdk (ubuntu: default jdk)
- cython (ubuntu: cython)
- pip (ubuntu: python-pip)
- pexpect (ubuntu: python-pexpect)
- zlib headers (ubuntu: zlib1g-dev)
- virtualenv (python-virtualenv)
- zip,unzip
On a freshly installed debian stretch/xfce:
-> consult script files in directory android/debian.
On a 'simple' gentoo installation the following packages had to be
installed in addition:
- dev-python/pip
- dev-python/virtualenv
- dev-python/cython
- dev-media-libs/libsdl2
- dev-media-libs/sdl2-image
- dev-media-libs/sdl2-mixer
- dev-media-libs/sdl2-ttf
- dev-media-libs/gstreamer
- dev-vcs/git
- dev-java/ant
and python modules:
- python3 -m pip install requests --user.
- python3 -m pip install clint --user.
NOTES:
1) This information is supplied to give you a hint, when running into
problems.
2) All builds need an working (fairly fast) internet connection and
6 GB of free disk space.
Build with 'python-for-android' (as user):
go to the android directory, then
$ ./mkp4a.init [<sdkdir>] [<ndkdir>] # prepare sdk and p4a installation
$ ./mkkeystore # if you want to build a release version.
$ ./mkp4a.debug # build debug apk
$ ./mkp4a.release <passwd1> [<passwd2>] # build release apk
$ ./mkp4a.unsigned # build an unsigned release apk
The build system will download all required additional
packages (such as the android sdk and more). Do the first build will
take a while. All in all you will need up to 6 GB of free disk space.
If you have Android Studio installed, you may call mkp4a.init
with optional parameter <sdk-dir> and ev. in addition as
second parameter <ndk-dir> (if not default) to prevent them
from downloading a new. (Note that currently android ndk version
should be less 14, otherwise the build will fail).
Resulted apks will appear in directory android.
Cardsets:
Cardsets should be installed in ${HOME}/.PySolFC/cardsets/. On an
android device this is equivalent to /sdcard/.PySolFC/cardsets/.
Cardsets must use the bmp image format. Use scripts/cardsetsgiftobmp
(on a linux system) to convert them, before copying to the device.
Possible known build issues:
2) for android ndk: needs a Version <=13 (because needs ant support).
3) python-for-android, on downloading recipes:
('CA CERTIFICATE VALIDATION FAILED' when downloading python.2.7 or
some 'recipes')
Solution:
Try the download address with firefox. if it works, view the
site certificate and download (export) it from the browser.
Copy the resulting *.crt to /usr/local/ca-certificates and
run update-ca-certificates.
Introduction
------------
This is a version of the PySol FC open source project
(http://pysolfc.sourceforge.net)
Early investigations of the code showed, that it would not be
a too big effort to add a new user interface (UI).
The new UI using kivy has been designed to meet requirements
of tablet and smartphone devices. Most of the functionality
of the original version has been maintained
The new UI is selected via a new command line option '--kivy'.
The original user interfaces will continue to work. To run the
kivy version call:
$ python pysol.py --kivy
Images
------
The original images supplied by the collection are of type
gif. In kivy, that image type loads very slowly. Moreover, many
cards cannot be loaded, because of decoding errors.
To prevent these problems, the kivy version was
modified to not read any gif images.
Some cardsets have been translated to PNG, a format
that is processed by both the tk and the kivy versions.
Some others, for which transparency information is not
processed correctly even from the PBF images, have been translated
to the BMP image format (while keeping their GIF variant for
the tk version). BMP format is only processed by the
kivy version.
Additional cardsets are available from the SourceForge
project. To use them with kivy, they need to be converted to
the BMP format. A shell script, 'cardsetsgiftobmp' , has been added
to the scripts directory (it requires Bash and ImageMagick).
For all GIF images in the directories data/images and data/tiles ,
corresponding images in the PNG format have been added too.
LB170321.
# PySol Fan Club edition
This is an open source and portable (Windows, Linux and Mac OS X) collection
of Card Solitaire/Patience games written in Python. It is based on
of Card Solitaire/Patience games written in Python. Its homepage is
http://pysolfc.sourceforge.net/ .
This is a maintenance branch of PySol FC by [Shlomi
The maintenance branch of PySol FC on GitHub by [Shlomi
Fish](http://www.shlomifish.org/) and by some other
people, aiming to clean up the code, add features, fix bugs, port to Python
3, and implement other enhancements.
people, has gained official status, ported the code to Python 3,
and implemented some other enhancements.
[![Build Status](https://travis-ci.org/shlomif/PySolFC.svg)](https://travis-ci.org/shlomif/PySolFC)
- [![Build Status](https://travis-ci.org/shlomif/PySolFC.svg)](https://travis-ci.org/shlomif/PySolFC)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/04re7umgl3yuukmh?svg=true)](https://ci.appveyor.com/project/shlomif/pysolfc)
# Screenshots
......@@ -17,13 +18,12 @@ people, aiming to clean up the code, add features, fix bugs, port to Python
## Requirements.
- Python (2.4 or later) (NB: CPython 2.6.0 has a bug, use 2.6.1 instead)
- Python (2.7 or 3.x)
- Tkinter (Tcl/Tk 8.4 or later)
- For sound support (optional)
- PySol-Sound-Server: http://www.pysol.org/ (mp3, wav, tracker music)
or
- PyGame: http://www.pygame.org/ (mp3, ogg, wav, midi, tracker music)
- PySol-Sound-Server fork: https://github.com/shlomif/pysol-sound-server (mp3, wav, tracker music)
- (or: ) PyGame: http://www.pygame.org/ (mp3, ogg, wav, midi, tracker music)
- Other packages (optional):
- Tile (ttk): http://tktable.sourceforge.net/tile/ (0.8.0 or later)
......@@ -33,49 +33,51 @@ people, aiming to clean up the code, add features, fix bugs, port to Python
## Installation.
See: http://www.python.org/doc/current/inst/
We provide an [installer for Windows](https://sourceforge.net/projects/pysolfc/files/PySolFC/)
as well as an Android package on F-droid.
For installation from source, see: http://www.python.org/doc/current/inst/
### Running from source without installation.
You can run from the source directory:
$ python pysol.py
```
python pysol.py
```
After following steps similar to these (on
[Mageia Linux](http://www.mageia.org/) ):
#### Step 1 - install the dependencies
On Mageia you can do:
```
$ sudo urpmi git make pygtk2 pygtk2.0-libglade gnome-python-canvas tkinter
sudo urpmi git make pygtk2 pygtk2.0-libglade gnome-python-canvas tkinter
```
On Debian / Ubuntu / etc. you can do:
```
$ sudo apt-get install -y ack-grep cpanminus libperl-dev make perl python-glade2 python-gnome2 python-gnome2-dev python-gtk2 python-setuptools python-tk
sudo apt-get install -y ack-grep cpanminus libperl-dev make perl python-glade2 python-gnome2 python-gnome2-dev python-gtk2 python-setuptools python-tk
```
#### Step 2 - build PySol.
```
$ git clone https://github.com/shlomif/PySolFC.git
$ cd PySolFC
$ sudo urpmi tkinter
$ sudo urpmi pygtk2
$ sudo urpmi pygtk2.0-libglade
$ sudo urpmi gnome-python-canvas
$ gmake test
$ ln -s html-src html
$ ln -s data/images images
$ tar -xvf PySolFC-Cardsets-2.0.tar.bz2 # Need to be downloaded from sourceforge
$ mkdir -p ~/.PySolFC
$ rmdir ~/.PySolFC/cardsets
$ ln -s "`pwd`/PySolFC-Cardsets-2.0" ~/.PySolFC/cardsets
$ python pysol.py
git clone https://github.com/shlomif/PySolFC.git
cd PySolFC
# Now make sure you have installed the dependencies.
gmake test
gmake rules
ln -s data/images images
tar -xvf PySolFC-Cardsets-2.0.tar.bz2 # Need to be downloaded from sourceforge
mkdir -p ~/.PySolFC
rmdir ~/.PySolFC/cardsets
ln -s "`pwd`/PySolFC-Cardsets-2.0" ~/.PySolFC/cardsets
python pysol.py
```
<b>Note!</b> If you are using a Debian derivative (e.g: Debian, Ubuntu, or
......@@ -87,6 +89,72 @@ that are needed by pysol from source (without the debian modifications).
Please uninstall that package and use the cardsets archive from sourceforge.net
per the instructions above.
### Installing from source and running in a python venv (virtual environment)
At the moment, this only works on POSIX (Linux, FreeBSD and similar) systems.
Windows and Mac users - you'll need to chip in with a script for your system.
#### 1 - Install build prerequisites: six and random2
This is kind of stupid and maybe it can be fixed in the future, but for now:
```
pip install six
pip install random2
```
You may want to use your OS distribution package system instead, for example:
```
sudo apt-get install python-six
sudo apt-get install python-random2
```
#### 2 - Clone the source from version control
```
git clone git://github.com/shlomif/PySolFC.git
cd PySolFC
```
#### 3 - Create your virtual environment.
```
PKGDIR=/usr/local/packages/PySolFC # or whatever