~lool/linaro-image-tools/testsuite-when-installed

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Loïc Minier
  • Date: 2011-01-28 16:31:19 UTC
  • mfrom: (265.1.15 setup-py)
  • Revision ID: lool@dooz.org-20110128163119-xjb99pc2p828ol7l
Merge lp:~lool/linaro-image-tools/setup-py-rework; rework setup.py and use
DistutilsExtra and add a do-release script to roll releases; LP: #683746.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
1
3
from distutils.core import setup
2
 
import os
3
 
import subprocess
4
 
 
5
 
 
6
 
def get_version():
7
 
    proc = subprocess.Popen(
8
 
        ["dpkg-parsechangelog"],
9
 
        cwd=os.path.abspath(os.path.dirname(__file__)),
10
 
        stdout=subprocess.PIPE)
11
 
    output, _ = proc.communicate()
12
 
    version = None
13
 
    for line in output.split("\n"):
14
 
        if line.startswith("Version: "):
15
 
            version = line.split(" ", 1)[1].strip()
16
 
    assert version is not None, (
17
 
        "Couldn't determine version number from debian changelog")
18
 
 
19
 
 
20
 
setup(
21
 
        name="hwpack",
22
 
        version=get_version(),
23
 
        packages=["hwpack", "linaro_media_create"],
 
4
# https://launchpad.net/python-distutils-extra
 
5
import DistUtilsExtra.auto
 
6
 
 
7
DistUtilsExtra.auto.setup(
 
8
        name="linaro-image-tools",
 
9
        version="0.4.1.1",
 
10
        description="Tools to create and write Linaro images",
 
11
        url="https://launchpad.net/linaro-image-tools",
 
12
        license="GPL v3 or later",
 
13
        author='Linaro Infrastructure team',
 
14
        author_email="linaro-dev@lists.linaro.org",
 
15
 
 
16
        scripts=[
 
17
            "linaro-hwpack-create", "linaro-hwpack-install",
 
18
            "linaro-media-create"],
24
19
     )