-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
30 lines (25 loc) · 932 Bytes
/
setup.py
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
from setuptools import setup, find_packages, Extension
from setuptools.command.build_ext import build_ext
import os
import shutil
class my_build_ext(build_ext):
def build_extension(self, ext):
"""Simply copy the first source file to the destination
I did my best at doing something sensical after looking at the
distutils sources. I don't handle inplace or anything like
that.
"""
fullname = self.get_ext_fullname(ext.name)
ext_filename = os.path.join(self.build_lib,
self.get_ext_filename(fullname))
shutil.copy(ext.sources[0], ext_filename)
setup(
cmdclass = {'build_ext':my_build_ext},
name = "ViVid",
version = "1.0",
author = "Mert Dikmen",
author_email = "mertdikmen@gmail.com",
license = "NCSA",
packages = ['vivid'],
ext_modules = [Extension('vivid._vivid', ['vivid/_vivid.so'])]
)