...
 
Commits (4)
......@@ -9,13 +9,16 @@ verify_ssl = true
name = "pywheels"
[packages]
python-osc = "*"
zeroconf = "*"
six = "*"
docopt = "*"
netifaces = "*"
"PyQt5" = "*"
ipaddress = "*"
configparser = "*"
zeroconf = "==0.19.1"
PySide = "==1.2.2"
python2_osc = {git = "https://github.com/kjcole/python2-osc.git"}
[dev-packages]
[requires]
python_version = "3.7"
python_version = "2.7"
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# VCS
......
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# kwidgets.py
......@@ -35,9 +35,8 @@
"""Construct SVG version of Kyma widgets from JSON dump data"""
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PySide.QtCore import *
from PySide.QtGui import *
# Font
#
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright 2016 Kevin Cole <kevin.cole@novawebcoop.org> 2016.05.13
......@@ -21,7 +21,7 @@
"""Symbolic Sound Paca Emulator"""
from itertools import zip_longest
from itertools import izip_longest
import sys
import os.path # File and directory manipulations
......@@ -68,7 +68,7 @@ def grouper(iterable, fillvalue=None):
"Collect data into fixed-length chunks or blocks"
# grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx"
args = [iter(iterable)] * 2
return zip_longest(*args, fillvalue=fillvalue)
return izip_longest(*args, fillvalue=fillvalue)
class Paca(object):
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# config.py
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Dump Paca
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# list.py
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# list.py
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# shell.py
......@@ -27,8 +27,11 @@
import os
import sys
import cmd # command interpreter w/ tab completion
import readline # Command line history
import atexit # Interpreter exit handlers
try: # For normal operating systems...
import readline # Command line history
except ImportError: # For the special child (M$)...
import pyreadline as readline # Command line history
from .lister import listpaca
from .config import configure
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Paca OSC Simulator
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# vcs.py
......@@ -39,9 +39,8 @@ import json
from .finder import find_pacas
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PySide.QtCore import *
from PySide.QtGui import *
__appname__ = "Pac-u-lator"
__module__ = "VCS"
......
#!/usr/bin/env python3
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Pac-u-lator - a Paca OSC Emulator
......
#!/bin/bash
pipenv run python3 paculator.py "$@"
pipenv run python2 paculator.py "$@"
#!/bin/bash
# Written by Kevin Cole <kevin.cole@novawebdevelopment.com> 2018.01.02 (kjc)
# Last modified by Kevin Cole <kevin.cole@novawebdevelopment.com> 2019.05.29
#
# 2019.05.29 KJC - use pipenv and Python 2
#
# Install the Debian packages needed
#
echo "Installing Debian packages:"
......@@ -13,36 +16,29 @@ sudo apt install python3 python3-setuptools python3-wheel python3-pip \
# Install the Python packages needed in a virtual environment
#
echo "Installing virtualenv, virtualenv-clone, and virtualenvwrapper to"
echo " /usr/local/lib/python3.5/dist-packages/ ..."
sudo -H pip3 install virtualenv virtualenv-clone virtualenvwrapper
mkdir ~/.virtualenvs/
virtualenv --python=/usr/bin/python3 ~/.virtualenvs/paculator
echo "Installing pipenv"
echo " /usr/local/lib/python2.7/dist-packages/ ..."
sudo -H pip2 install pipenv
pipenv --python=/usr/bin/python2 update
# Install Python packages to the local virtual environment, either for
# Ubuntu or Raspbian. Pure Debian users should be able to figure out
# what to do. The rest of you... good luck.
#
if [[ $(lsb_release -is) == "Ubuntu" ]]; then
echo "Installing python-osc, PyQt5, zeroconf, and docopt to"
echo " ~/.virtualenvs/paculator/lib/python3.5/dist-packages/ ..."
source ~/.virtualenvs/paculator/bin/activate
pip3 install -r ubuntu.requirements
elif [[ $(lsb_release -is) == "Raspbian" ]]; then
echo "Installing additional Raspbian package dependency: python3-sip"
sudo apt install python3-sip
echo "Installing docopt, zeroconf, and python-osc to"
echo " ~/.virtualenvs/paculator/lib/python3.5/dist-packages/ ..."
source ~/.virtualenvs/paculator/bin/activate
pip3 install -r raspbian.requirements
echo "Kludging installation of PyQt5 and sip to:"
echo " ~/.virtualenvs/paculator/lib/python3.5/dist-packages/ ..."
pushd ~/.virtualenvs/paculator/lib/python3.4/site-packages
cp -rv /usr/lib/python3/dist-packages/sip* .
cp -rv /usr/lib/python3/dist-packages/PyQt5* .
popd
if [[ $(lsb_release -is) != "Raspbian" ]]; then
echo "Installing PyQt5 to the virual environment..."
pipenv --python=/usr/bin/python2 install PyQt5
#else
# echo "Installing additional Raspbian package dependency: python3-sip"
# sudo apt install python3-sip
#
# echo "Kludging installation of PyQt5 and sip to:"
# echo " ~/.virtualenvs/paculator/lib/python3.5/dist-packages/ ..."
# pushd ~/.virtualenvs/paculator/lib/python3.4/site-packages
# cp -rv /usr/lib/python3/dist-packages/sip* .
# cp -rv /usr/lib/python3/dist-packages/PyQt5* .
# popd
else
echo "I don't know what distribution this is. Good luck to you."
fi
......@@ -57,4 +53,5 @@ cp paculator.conf ~/.config/
#
echo "Installing a 'starter' Kyma Sound (TM) JSON dump to ~/.local/share/paca/"
mkdir -p ~/.local/share/paca
cp dumps/kyma.json ~/.local/share/paca/
cp dumps/row_your_boat.json ~/.local/share/paca/
ln -s ~/.local/share/paca/row_your_boat.json ~/.local/share/paca/kyma.json