setup.py 729 Bytes
Newer Older
jkvis's avatar
jkvis committed
1
2
3
4
5
6
7
from setuptools import setup, Extension

from setuptools.command.build_ext import build_ext
import subprocess

class git_clone_external(build_ext):
    def run(self):
jkvis's avatar
jkvis committed
8
        subprocess.check_call(['rm', '-rf', 'extractor-core'])
jkvis's avatar
jkvis committed
9
        subprocess.check_call(['git', 'clone', 'git@github.com:mutalyzer/extractor-core.git'])
jkvis's avatar
jkvis committed
10
11
12
        build_ext.run(self)


jkvis's avatar
jkvis committed
13
extractor = Extension('descriptionextractor', sources = ['extractor-module.cc',
jkvis's avatar
jkvis committed
14
15
                                                          'extractor-core/src/extractor.cc'])

jkvis's avatar
jkvis committed
16
setup(name = 'descriptionextractor',
jkvis's avatar
jkvis committed
17
18
19
20
21
      version = '3.0',
      cmdclass = {'build_ext': git_clone_external},
      description = 'This is the extractor package',
      ext_modules = [extractor]
)