File: setup.py

package info (click to toggle)
cluster3 1.59+ds-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye, sid
  • size: 3,616 kB
  • sloc: ansic: 9,948; python: 2,018; perl: 1,566; makefile: 132
file content (54 lines) | stat: -rwxr-xr-x 1,529 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/python3

from distutils.core import setup, Extension, Command
import sys
import os.path
import shutil
import sys

shutil.copyfile(os.path.join('python','MANIFEST.python'),'MANIFEST')

extra_link_args = []
if sys.platform != 'darwin':
    extra_link_args = ['-s']


extension = Extension("Pycluster._cluster",
                      ["src/cluster.c", "python/clustermodule.c"],
                      include_dirs=['src'],
                      extra_link_args=extra_link_args
                      )

class test_Pycluster(Command):
    "Run all of the tests for the package."

    user_options = []

    def initialize_options(self):
        shutil.copyfile(os.path.join('python','test','test_Cluster.py'),
                        'test_Cluster.py')

    def finalize_options(self):
        pass

    def run(self):
        import unittest
        import test_Cluster
        test_Cluster.TestCluster.module = 'Pycluster'
        suite = unittest.TestLoader().loadTestsFromModule(test_Cluster)
        runner = unittest.TextTestRunner(sys.stdout, verbosity = 2)
        runner.run(suite)


setup(name="Pycluster",
      version="1.59",
      description="The C Clustering Library",
      author="Michiel de Hoon",
      author_email="michiel.dehoon 'AT' riken.jp",
      url="http://bonsai.hgc.jp/~mdehoon/software/software.html",
      license="Python License",
      package_dir = {'Pycluster':'python'},
      packages = ['Pycluster'],
      ext_modules=[extension],
      cmdclass={"test" : test_Pycluster},
      )