summaryrefslogtreecommitdiff
blob: e6115fc6174b667f82ce3f57b44ac66e8f69cbcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env python
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# python.uselect mephx.x@gmail.com

from umodule import *

module = Module(name = "python", description = "Python Version Switcher", version = "0.1", author ="mephx.x@gmail.com") # We define the module
bin = Action (name = 'bin', description = "Change Python's Version", type = "sym") # Define a Symlinking Action

python = Link(alias = "python", target = "/usr/bin/python", prefix = "/usr/bin/", regexp = "python([0-9]+\.[0-9]+$)") 
python_config = Link(alias = "python-config", target = "/usr/bin/python-config", prefix = "/usr/bin/", regexp = "python([0-9]+\.[0-9]+)-config$")
python_config2 = Link(alias = "python-config", target = "/usr/bin/python-config", prefix = "/usr/bin/", regexp = "python([0-9]+\.[0-9]+)-config$")

python.add_link(python_config) # For inheritance
#python_config.add_link(python_config2) # For further inheritance test
bin.add_link(python) # Adding The Link to the action
module.add_action(bin) #Adding the action to the module