~lifeless/ubuntu/maverick/pyrex/fixdepends

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Bazaar Package Importer
  • Author(s): Paul Brossier
  • Date: 2007-04-21 15:16:07 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070421151607-7u3ovhn5lmitwk8h
Tags: 0.9.5.1a-1
* New upstream release (closes: #411004)
* Provide only ${python:Provides} (closes: #399937)
* Drop Conflicts and Replaces against oldstable packages
* Bumpep Build-depends on debhelper to 5.0.37.2
* Added debian/pycompat, set to 2
* Moved DH_COMPAT=5 to debian/compat

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#   Pyrex setup file
 
3
#
 
4
 
1
5
from distutils.core import setup
2
6
from distutils.sysconfig import get_python_lib
3
7
import os
5
9
 
6
10
compiler_dir = os.path.join(get_python_lib(prefix=''), 'Pyrex/Compiler')
7
11
 
8
 
if os.name == "posix":
9
 
    scripts = ["bin/pyrexc"]
10
 
else:
11
 
    scripts = ["pyrexc.py"]
 
12
def packages():
 
13
    result = []
 
14
    def find_packages(dir, parent_names):
 
15
        for name in os.listdir(dir):
 
16
            subdir = os.path.join(dir, name)
 
17
            if os.path.isdir(subdir) and os.path.exists(os.path.join(subdir, "__init__.py")):
 
18
                pkg_names = parent_names + [name]
 
19
                result.append(".".join(pkg_names))
 
20
                find_packages(subdir, pkg_names)
 
21
    source_dir = os.path.dirname(__file__) or os.curdir
 
22
    find_packages(source_dir, [])
 
23
    return result
 
24
 
 
25
def scripts():
 
26
    if os.name == "posix":
 
27
        return ["bin/pyrexc"]
 
28
    else:
 
29
        return ["pyrexc.py"]
12
30
 
13
31
setup(
14
 
  name = 'Pyrex', 
15
 
  version = version,
16
 
  url = 'http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/',
17
 
  author = 'Greg Ewing',
18
 
  author_email = 'greg@cosc.canterbury.ac.nz',
19
 
  scripts = scripts,
20
 
  packages=[
21
 
    'Pyrex',
22
 
    'Pyrex.Compiler',
23
 
    'Pyrex.Distutils',
24
 
    'Pyrex.Mac',
25
 
    'Pyrex.Plex'
26
 
    ],
27
 
  data_files=[
28
 
    (compiler_dir, ['Pyrex/Compiler/Lexicon.pickle'])
 
32
    name = 'Pyrex', 
 
33
    version = version,
 
34
    url = 'http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/',
 
35
    author = 'Greg Ewing',
 
36
    author_email = 'greg.ewing@canterbury.ac.nz',
 
37
    scripts = scripts(),
 
38
    packages = packages(),
 
39
    data_files=[
 
40
        (compiler_dir, ['Pyrex/Compiler/Lexicon.pickle'])
29
41
    ]
30
 
  )
31
 
 
 
42
)