Serving packages for multiple distribitions from a single PPA

August 03, 2015 at 02:21 PM | categories: pyxie, vivid, arduino, python, trusty, actors, ubuntu, iotoy, dfuprogrammer, kamaelia | View Comments

So, I created a PPA for my home projects - either things I've written, or things I use. ( link to launchpad ) Anyway, I use Ubuntu 14.04LTS, primarily for stability, but making things available for more recent versions of Ubuntu tends to make sense.

To cut a long story short, the way you can make packages available for later distributions is to copy the packages into those distributions. Obviously that will work better for packages that are effectively source packages (pure python ones) rather than binary packages.

The process is almost trivial:

  • Go to your PPA, specifically the detail for your packages.
  • Hit copy and select the packages you want to copy into a later ubuntu distribution
  • Select the distribution you wish to copy them to (eg Vivid for 15.04, etc)
  • Then tell it to copy then over the packages.

And that's pretty much it.

As a result, you can now get the following packages for 14.04.02LTS and 15.04 from my PPA:

  • pyxie - A "Little Python" to C++ compiler. Very much a WIP. Supports Arduino as a target platform. (WIP)
  • arduino-iotoy - IOToy interfaces for running on arduino (STABLE)
  • python-iotoy - Python library for working with IOToy devices - local and remote - and publishing on the network. (STABLE)
  • guild - My new Actor library. (Pun: An Actor's Guild) (STABLE)
  • guild.kamaelia - when "done" will contain a collection of components that were useful in Kamaelia, but suitable for use with Guild (WIP)

Older libraries there:

  • axon - Kamaelia's core concurrency library (STABLE)
  • kamaelia - Kamaelia - a collection of components that operate concurrently (STABLE)
  • rfidtag - A wrapper around TikiTag/TouchaTag tags. (Has a binary element, unknown as to whether will work on 15.04 - let me know?!) (STABLE)
  • waypoint - A tool for allowing opt-in tracking at events - for example to allow people to pick up a personalised programmer after the event. (STABLE)

Libraries/tools by others that I use:

Found this from this helpful post on stack overflow http://askubuntu.com/questions/30145/ppa-packaging-having-versions-of-packages-for-multiple-distros

Read and Post Comments

Ubuntu PPA Packages of sparkslabs projects

March 01, 2015 at 05:43 PM | categories: trusty, arduino, python, actors, ubuntu, iotoy, dfuprogrammer, kamaelia | View Comments

I've been meaning to do this for a long while now, but finally gotten around to it. I've set up an Ubuntu PPA for the respositories I have on github. The aim of this is to simplify sharing things with others.

My target distribution is Ubunty 14.04.1LTS

In order to install any of the packages under Ubuntu, you first add my new PPA, and update and install using apt-get.

ie Add my PPA to your machine:

sudo add-apt-repository ppa:sparkslabs/packages

Then do an update:

sudo apt-get update

You can the install any of things I've packaged up as follows:

  • Guild: sudo apt-get install guild
  • The arduino libraries for IOToy: sudo apt-get install arduino-iotoy
  • Python IOToy libraries: sudo apt-get install python-iotoy
  • dfu-programmer: sudo apt-get install dfu-programmer
  • The nascent Kamaelia compatibility layer for Guild: sudo apt-get install python-guild-kamaelia
  • Python RFID Tag Reader Module: sudo apt-get install python-rfidtag
  • Waypoint (used the RFID tag reader to enable opt-in tracking round a venue): sudo apt-get install python-waypoint
  • Axon: sudo apt-get install python-axon
  • Kamaelia: sudo apt-get install python-kamaelia

Mainly for my convenience, but will also make install docs for my projects simpler :-)

Read and Post Comments

Installing Python Behave On Ubuntu 14.04.1LTS

February 16, 2015 at 12:26 PM | categories: python, bdd, behave, packaging, ubuntu | View Comments

Brief notes on how I installed Behave - a behaviour driven development package on Ubuntu 14.04.1LTS.

First off, why? Well, the common answer for installing things would be "use pip" or "use virtualenv". I tend to prefer to use debian packages when installing things under Ubuntu - primarily because then I only have one packaging system to worry about. This works fine for lots of things since lots of things have sufficiently recent packages. In the case of something like Behave though, this doesn't have any package, so we need to build one for that, and its dependencies.

Partly as a note to self, and for anyone else who may be interested, this is how I did it. First of all we need the sources of behave and its dependencies:

hg clone https://bitbucket.org/stoneleaf/enum34
git clone git@github.com:r1chardj0n3s/parse
git clone git@github.com:jenisys/parse_type.git
git clone git@github.com:behave/behave

To package these up we need some other things too:

sudo apt-get install python-stdeb
sudo apt-get install devscripts

One of the dependencies is available as a package:

sudo apt-get install python-hamcrest

The just package up each dependency and install.

First of enum34:

cd enum34/
python setup.py sdist
cd dist/
py2dsc enum34-1.0.4.tar.gz
cd deb_dist/
cd enum34-1.0.4
debuild -uc -us
cd ..
sudo dpkg -i python-enum34_1.0.4-1_all.deb 
cd ../..
rm -rf dist
cd ..

Then parse:

cd parse
python setup.py sdist
cd dist/
py2dsc parse-1.6.5.tar.gz 
cd deb_dist/
cd parse-1.6.5
debuild -uc -us 
cd ..
sudo dpkg -i python-parse_1.6.5-1_all.deb 
cd ../..
rm -rf dist
cd ..

Then parse_type:

cd parse_type/
python setup.py sdist
cd dist/
py2dsc parse_type-0.3.5dev.tar.gz
cd deb_dist/
cd parse-type-0.3.5dev
debuild  -uc -us 
cd ..
sudo dpkg -i python-parse-type_0.3.5dev-1_all.deb 
cd ../..
rm -rf dist/
cd ..

And finally behave itself:

cd behave/
python setup.py sdist
cd dist/
py2dsc behave-1.2.6.dev0.tar.gz
cd deb_dist/
cd behave-1.2.6~dev0
debuild  -uc -us 
cd ..
sudo dpkg -i python-behave_1.2.6~dev0-1_all.deb
cd ../..
rm -rf dist/
cd ..
Read and Post Comments

Quick guide to packaging python libraries

February 09, 2015 at 06:22 PM | categories: python, packaging, ubuntu | View Comments

The short and simple guide to installing python packages for Ubuntu:

  • Install python-stdeb
  • Build an sdist version of your package, make sure it's all good
  • Run py2dsc on the library, debuild the resulting package
  • Install

That's probably a little terse, but gets over how simple this can be if you can ensure that your package's sdist builds cleanly.

Short example of steps involved:

sudo apt-get install python-stdeb

tar zxvf guild-0.1.0.tar.gz
cd guild-0.1.0/
python setup.py sdist
cd dist

py2dsc guild-0.1.0.tar.gz
cd deb_dist
cd guild-0.1.0
debuild -uc -us

cd ..
sudo dpkg -i python-guild_0.1.0-1_all.deb

(This has been languishing in my drafts folder for a while, so I've shortened to post)

Read and Post Comments